org.intuitel.slom
public class CognitiveMap 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 CognitiveMap 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 |
---|
CognitiveMap(InputStream cmIn,
Iterator<org.semanticweb.owlapi.util.SimpleIRIMapper> iriMaps)
Builds the CM object from owl content.
|
Modifier and Type | Method and Description |
---|---|
void |
configureMacroLP(List<ConceptContainer> CCs,
MacroLP mlp)
Configures the MacroLP received as parameter.
|
org.semanticweb.owlapi.model.IRI |
getCMIRI()
Returns the CM IRI, as read from the owl file
|
Set<ConceptContainerRelationship> |
getConceptContainerRelationships()
Search the OWLOntology for CC relationships and return them.
|
ArrayList<ConceptContainer> |
getConceptContainers()
Search ConceptContainers in this CM and return a list of them.
|
ArrayList<ConceptContainer> |
getConceptContainers(ArrayList<MacroLP> alMacroLPs)
Search ConceptContainers in this CM, filter by MacroLP and return the results.
|
ArrayList<MacroLP> |
getMacroLPs()
Search MacroLearningPathways in this CM and return a list of them.
|
ArrayList<MacroLP> |
getMacroLPs(Set<ConceptContainerRelationship> setCCRelationships)
Search MacroLearningPathways in this CM filtered by CCRels, and returns a list of them.
|
org.semanticweb.owlapi.model.OWLOntology |
getOWLOntology()
Returns the OWLOntology object that represents the CM.
|
static boolean |
isValidCM(InputStream cmIn,
Iterator<org.semanticweb.owlapi.util.SimpleIRIMapper> iriMaps)
Determines if the received file contains a CM description.
|
void |
printOWLAxioms()
Prints in the standard output all the axioms in the CM.
|
void |
write(OutputStream os)
Writes the content of the CM as OWL/RDF.
|
public CognitiveMap(InputStream cmIn, Iterator<org.semanticweb.owlapi.util.SimpleIRIMapper> iriMaps)
The CM object is build by reading the information from the OWL content passed as parameter.
cmIn
- the CM 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 CognitiveMap 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 configureMacroLP(List<ConceptContainer> CCs, MacroLP mlp)
Adds to the mlp those ConceptContainer from CCs that belong to the MacroLP.
This method is used for the initial configuration of the SLOM object, and developers are discouraged to use this method directly.
CCs
- A list of CCs to include in the MacroLPmlp
- The MacroLP to configureMacroLP
,
ConceptContainer
public ArrayList<ConceptContainer> getConceptContainers(ArrayList<MacroLP> alMacroLPs)
This method queries the Axioms of the CM OWLOntology and finds the ConceptContainers. Then, filters the results and select those CCs that part of any of the MacroLP received as parameters. Finally, builds the ConceptContainer Java representation objects and adds them into an ArrayList, then returns this ArrayList.
This provides a high abstraction level mean to read the content of the CM.
alMacroLPs
- the list of MacroLP used as filterConceptContainer
,
MacroLP
public ArrayList<MacroLP> getMacroLPs(Set<ConceptContainerRelationship> setCCRelationships)
This method receives a Set of ConceptContainerRelationships and retrieves from them the list of MacroLP that defined at these ConceptContainerRelationships. For each MacroLearningPathway identified, builds the MacroLP 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 CM.
setCCRelationships
- a Set with the CCRelaionships used as filterMacroLP
public ArrayList<MacroLP> getMacroLPs()
This method queries the Axioms of the CM OWLOntology and finds the MacroLearningPathways. For each MacroLearningPathway found, builds the MacroLP 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 CM.
MacroLP
public ArrayList<ConceptContainer> getConceptContainers()
This method queries the Axioms of the CM OWLOntology and finds the ConceptContainers. For each CC found, builds the ConceptContainer 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 CM.
ConceptContainer
public void printOWLAxioms()
Reads all the axioms at the CM and print them at the standard output. Useful for debuggin purposes
public Set<ConceptContainerRelationship> getConceptContainerRelationships()
This method queries the Axioms of the CM OWLOntology and finds the relationships between concept containers. For each of the relationships found, builds the ConceptContainerRelationship object and adds it into a Set, then returns this Set.
This provides a high abstraction level mean to read the content of the CM.
ConceptContainerRelationship
,
ConceptContainer
public org.semanticweb.owlapi.model.IRI getCMIRI()
public static boolean isValidCM(InputStream cmIn, 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
cmIn
- the CM 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 writtenCopyright © 2014. All rights reserved.