org.intuitel.slom
public class SLOM extends Object
The SLOM object is a Java representation of the SLOM format defined by the INTUITEL project. A SLOM object can be created from its OWL/RDF representation, or it can be the result of a transformation from a supported format. In any case, the serialization is executed by a Serizalizer object.
As created from a file, the SLOM object already contains the course information, which can be read but not edited. Acording to the SLOM specification, the course metadata is organized as:
Internally, the SLOM object works with CM and CCM objects which can be accessed via getCCM and getCM methods. These objects work with the OWLAPI library and could be used for editing purposes, despite developers are encouraged not to do so.
Further information of the SLOM format can be found at the INTUITEL project page, at deliverable D4.1
Serializer
Constructor and Description |
---|
SLOM(File SLOM_file)
Creates the SLOM object from a SLOM package.
|
SLOM(InputStream cm,
InputStream ccm)
Creates the SLOM object from its respective CM and CCM.
|
Modifier and Type | Method and Description |
---|---|
org.semanticweb.owlapi.model.OWLOntology |
getCCM()
Returns the OWLOntology object that represents the CCM.
|
org.semanticweb.owlapi.model.OWLOntology |
getCM()
Returns the OWLOntology object that represents the CM.
|
CognitiveContentMap |
getCognitiveContentMap()
Returns the ContentCognitiveMap object of this SLOM.
|
CognitiveMap |
getCognitiveMap()
Returns the CognitiveMap object of this SLOM.
|
ArrayList<ConceptContainer> |
getConceptContainers()
Returns the list of the ConceptContainers.
|
ArrayList<KnowledgeObject> |
getKnowledgeObjects()
Returns the list of the KnowledgeObjects.
|
ArrayList<MacroLP> |
getMacroLPs()
This method returns the list of the MacroLPs.
|
List<MicroLP> |
getMicroLPs()
Returns the list of the MicroLPs.
|
List<MicroLP> |
getMicroLPs(ConceptContainer conceptContainer)
Returns the list of the MicroLPs in a ConceptContainer.
|
static String |
isValidSLOM(File SLOM_file)
Determines if the received file contains a SLOM package.
|
static String |
isValidSLOM(InputStream cm,
InputStream ccm)
Determines if the received file contains a SLOM package.
|
void |
writeCCM(OutputStream os)
Writes the content of the CCM as OWL/RDF.
|
void |
writeCM(OutputStream os)
Writes the content of the CM as OWL/RDF.
|
public SLOM(File SLOM_file) throws BadFileException, IOException
SLOM_file
- The file that contains the SLOM packageBadFileException
IOException
public SLOM(InputStream cm, InputStream ccm) throws BadFileException, IOException
cm
- The content of the CM fileccm
- The content of the CCM fileBadFileException
IOException
public ArrayList<MacroLP> getMacroLPs()
Returns the MacroLP objects contained in this SLOM course
public ArrayList<ConceptContainer> getConceptContainers()
Returns the ConceptContainer objects in this SLOM course
public ArrayList<KnowledgeObject> getKnowledgeObjects()
Returns the KnowledgeObject objects in this SLOM course
public List<MicroLP> getMicroLPs()
Returns the MicroLP objects in this SLOM course
public List<MicroLP> getMicroLPs(ConceptContainer conceptContainer)
Returns the MicroLP objects, from this SLOM course, that are used in a given ConceptContainer
conceptContainer
- The conceptContainer to search inpublic org.semanticweb.owlapi.model.OWLOntology getCM()
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.
getCognitiveMap()
public CognitiveMap getCognitiveMap()
getCM()
public org.semanticweb.owlapi.model.OWLOntology getCCM()
The internal representation of the ContentCognitiveMap 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.
getCognitiveContentMap()
public CognitiveContentMap getCognitiveContentMap()
getCCM()
public static String isValidSLOM(InputStream cm, InputStream ccm) throws IOException
The decision is based on the SLOM format definition, further information can be found at the INTUITEL project page, at deliverable D4.1
cm
- the CM content of the SLOM to validateccm
- the CCM content of the SLOM to validateIOException
SLOMError
public static String isValidSLOM(File SLOM_file) throws IOException
The decision is based on the SLOM format definition, further information can be found at the INTUITEL project page, at deliverable D4.1
SLOM_file
- The SLOM package to validate.IOException
SLOMError
public void writeCM(OutputStream os)
This method is a wrapper of the write method provided by CognitiveMap objects.
os
- The OutputStream where the information will be writtenCognitiveMap
public void writeCCM(OutputStream os)
This method is a wrapper of the write method provided by CognitiveContentMap objects.
os
- The OutputStream where the information will be writtenCognitiveContentMap
Copyright © 2014. All rights reserved.