org.intuitel.slom
public class CognitiveContentMap extends Object
The SLOM course description in a SLOM package is provided by two OWL files, representing the CognitiveMap and the CognitiveContentMap. Where:
This class provides a Java representation of the CognitiveContentMap part, based on the use of the OWLOntology object of the OWLAPI library. This Java class is internally used to create the SLOM object, but developers are discouraged to directly use this class.
Further information of the SLOM format can be found at the INTUITEL project page, at deliverable D4.1
Constructor and Description |
---|
CognitiveContentMap(InputStream ccmIn,
Iterator<org.semanticweb.owlapi.util.SimpleIRIMapper> iriMaps)
Builds the CCM object from owl content.
|
Modifier and Type | Method and Description |
---|---|
void |
configureKnowledgeObjects(ArrayList<KnowledgeObject> kos)
Configures the KnowledgeObject in the list received as parameter.
|
void |
configureMicroLP(List<KnowledgeObject> KOs,
MicroLP mlp)
Configures the MicroLP received as parameter.
|
org.semanticweb.owlapi.model.IRI |
getCCMIRI()
Returns the CCM IRI, as read from the owl file
|
Set<KnowledgeObjectRelationship> |
getKnowledgeObjectRelationships()
Search the OWLOntology for KO relationships and return them.
|
ArrayList<KnowledgeObject> |
getKnowledgeObjects()
Search KnowledgeObjects in this CCM and return a list of them.
|
ArrayList<MicroLP> |
getMicroLPs()
Search MicroLearningPathways in this CCM and return a list of them.
|
ArrayList<MicroLP> |
getMicroLPs(Set<KnowledgeObjectRelationship> KORelationships)
Search MicroLearningPathways in this CCM filtered by KORels, and returns a list of them.
|
org.semanticweb.owlapi.model.OWLOntology |
getOWLOntology()
Returns the OWLOntology object that represents the CCM.
|
static boolean |
isValidCCM(InputStream ccmIn,
Iterator<org.semanticweb.owlapi.util.SimpleIRIMapper> iriMaps)
Determines if the received file contains a CCM description.
|
void |
printOWLAxioms()
Prints in the standard output all the axioms in the CCM.
|
void |
write(OutputStream os)
Writes the content of the CCM as OWL/RDF.
|
public CognitiveContentMap(InputStream ccmIn, Iterator<org.semanticweb.owlapi.util.SimpleIRIMapper> iriMaps)
The CCM object is build by reading the information from the OWL content passed as parameter.
ccmIn
- the CCM as OWL contentiriMaps
- a container with a IRI mapping to use while loading the owl contentpublic org.semanticweb.owlapi.model.OWLOntology getOWLOntology()
The internal representation of the CognitiveContentMap is based on the OWLAPI library. This method provides access to the OWLOntology object.
The OWLOntology object can be used by developers to execute advanced operation on the SLOM content, such as reasoning, complex queries, etc.
public void printOWLAxioms()
Reads all the axioms at the CCM and print them at the standard output. Useful for debuggin purposes
public org.semanticweb.owlapi.model.IRI getCCMIRI()
public static boolean isValidCCM(InputStream ccmIn, Iterator<org.semanticweb.owlapi.util.SimpleIRIMapper> iriMaps)
The decision is based on the SLOM format definition, further information can be found at the INTUITEL project page, at deliverable D4.1
ccmIn
- the CCM content to validateiriMaps
- a container with a IRI mapping to use while loading the owl contentpublic void write(OutputStream os)
This method uses a RDFXMLOntologyFormat to serialized the ontology information and write it in the os OutputStream.
os
- The OutputStream where the information will be writtenpublic ArrayList<KnowledgeObject> getKnowledgeObjects()
This method queries the Axioms of the CCM OWLOntology and finds the KnowledgeObjects. For each KO found, builds the KnowledgeObject Java representation object and adds it into an ArrayList, then returns this ArrayList.
This provides a high abstraction level mean to read the content of the CCM.
KnowledgeObject
public void configureKnowledgeObjects(ArrayList<KnowledgeObject> kos)
For each KnowledgeObject in the received list, queries the Axioms in the OWLOntology and reads all the properties assigned to the KnowledgeObject. With them, configures the Java representation of the KnowledgeObject.
This method is used for the initial configuration of the SLOM object, and developers are discouraged to use this method directly.
kos
- A list with the KnowledgeObjects to configurepublic Set<KnowledgeObjectRelationship> getKnowledgeObjectRelationships()
This method queries the Axioms of the CCM OWLOntology and finds the relationships between KnowledgeObjects. For each of the relationships found, builds the KnowledgeObjectRelationship object and adds it into a Set, then returns this Set.
This provides a high abstraction level mean to read the content of the CCM.
KnowledgeObjectRelationship
,
KnowledgeObject
public ArrayList<MicroLP> getMicroLPs()
This method queries the Axioms of the CCM OWLOntology and finds the MicroLearningPathways. For each MicroLearningPathway found, builds the MicroLP Java representation object and adds it into an ArrayList, then returns this ArrayList.
This provides a high abstraction level mean to read the content of the CCM.
MicroLP
public ArrayList<MicroLP> getMicroLPs(Set<KnowledgeObjectRelationship> KORelationships)
This method receives a Set of KnowledgeObjectRelationship and retrieves from them the list of MicroLP defined at these KnowledgeObjectRelationships. For each MicroLearningPathway identified, builds the MicroLP Java representation object and adds it into an ArrayList, then returns this ArrayList.
This provides a high abstraction level mean to read the content of the CCM.
KORelationships
- A set with the KORelationships used as filterMicroLP
public void configureMicroLP(List<KnowledgeObject> KOs, MicroLP mlp)
Adds to the mlp those KnowledgeObject from KOs that belong to the MicroLP.
This method is used for the initial configuration of the SLOM object, and developers are discouraged to use this method directly.
KOs
- A list of KOs to include in the MicroLPmlp
- The MicroLP to configureMicroLP
,
KnowledgeObject
Copyright © 2014. All rights reserved.