Package fi.tut.mei.resdescapi.ontology
Class OntologyCreator
- java.lang.Object
-
- fi.tut.mei.resdescapi.ontology.OntologyCreator
-
public class OntologyCreator extends Object
A class for creating a resource instances ontology.- Author:
- hylli
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASS_INTERFACE_DEFINITIONstatic StringLINKING_HAS_INTERFACEstatic StringLINKING_HAS_STD_BODYstatic StringLINKING_IMPLEMENTS_STDstatic StringLITERAL_DESCRIPTIONstatic StringLITERAL_IF_CATEGORYstatic StringLITERAL_IF_GENDERstatic StringLITERAL_OCCURRENCE_MAXstatic StringLITERAL_OCCURRENCE_MINstatic StringRESOURCE_INTERFACE_NSthe resource interface model ontology name space url
-
Constructor Summary
Constructors Constructor Description OntologyCreator(String uri)Construct a OntoloyCreator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBlueprint(fi.tut.mei.capabilityQueryLib.model.Blueprint blueprint)Add information of the given blueprint to the ontology.org.apache.jena.ontology.IndividualaddInterfaceDefinition(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceImplRDCT itf)map an interface definition from an object to an ontologyvoidclearInterfaceDefinitions()clear all saved interface definitionsorg.apache.jena.ontology.IndividualcreateStandardOnto(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceStdCT std)org.apache.jena.ontology.IndividualcreateStdBodyOnto(fi.tut.mei.resdescapi.rdapi.model.rd.StdBody stdBody)Delete from hereorg.apache.jena.ontology.OntModelgetOntology()Return the ontology model of the creator.voidwriteOntology(OutputStream out)Write the current ontology to the given output stream in the RDF/XML format.voidwriteOntology(OutputStream out, String format)Write the current ontology to the given output stream in
-
-
-
Field Detail
-
RESOURCE_INTERFACE_NS
public static final String RESOURCE_INTERFACE_NS
the resource interface model ontology name space url- See Also:
- Constant Field Values
-
CLASS_INTERFACE_DEFINITION
public static final String CLASS_INTERFACE_DEFINITION
- See Also:
- Constant Field Values
-
LINKING_IMPLEMENTS_STD
public static final String LINKING_IMPLEMENTS_STD
- See Also:
- Constant Field Values
-
LINKING_HAS_STD_BODY
public static final String LINKING_HAS_STD_BODY
- See Also:
- Constant Field Values
-
LINKING_HAS_INTERFACE
public static final String LINKING_HAS_INTERFACE
- See Also:
- Constant Field Values
-
LITERAL_DESCRIPTION
public static final String LITERAL_DESCRIPTION
- See Also:
- Constant Field Values
-
LITERAL_IF_GENDER
public static final String LITERAL_IF_GENDER
- See Also:
- Constant Field Values
-
LITERAL_IF_CATEGORY
public static final String LITERAL_IF_CATEGORY
- See Also:
- Constant Field Values
-
LITERAL_OCCURRENCE_MIN
public static final String LITERAL_OCCURRENCE_MIN
- See Also:
- Constant Field Values
-
LITERAL_OCCURRENCE_MAX
public static final String LITERAL_OCCURRENCE_MAX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OntologyCreator
public OntologyCreator(String uri)
Construct a OntoloyCreator.- Parameters:
uri- URI for the ontology that will be created with this.
-
-
Method Detail
-
createStdBodyOnto
public org.apache.jena.ontology.Individual createStdBodyOnto(fi.tut.mei.resdescapi.rdapi.model.rd.StdBody stdBody)
Delete from here
-
createStandardOnto
public org.apache.jena.ontology.Individual createStandardOnto(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceStdCT std)
-
clearInterfaceDefinitions
public void clearInterfaceDefinitions()
clear all saved interface definitions
-
addInterfaceDefinition
public org.apache.jena.ontology.Individual addInterfaceDefinition(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceImplRDCT itf)
map an interface definition from an object to an ontology- Parameters:
itf- interface implementation- Returns:
-
addBlueprint
public void addBlueprint(fi.tut.mei.capabilityQueryLib.model.Blueprint blueprint)
Add information of the given blueprint to the ontology. .- Parameters:
blueprint- blueprint whose information will be added.
-
getOntology
public org.apache.jena.ontology.OntModel getOntology()
Return the ontology model of the creator.- Returns:
- creator's ontology model
-
writeOntology
public void writeOntology(OutputStream out)
Write the current ontology to the given output stream in the RDF/XML format.- Parameters:
out- where the ontology will be written
-
writeOntology
public void writeOntology(OutputStream out, String format) throws org.apache.jena.riot.RiotException
Write the current ontology to the given output stream in- Parameters:
out- where the ontology will be writtenformat- output format. Possible values: "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE", "TURTLE", (and "TTL") and "N3".- Throws:
org.apache.jena.riot.RiotException- unrecognized format
-
-