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 String
CLASS_INTERFACE_DEFINITION
static String
LINKING_HAS_INTERFACE
static String
LINKING_HAS_STD_BODY
static String
LINKING_IMPLEMENTS_STD
static String
LITERAL_DESCRIPTION
static String
LITERAL_IF_CATEGORY
static String
LITERAL_IF_GENDER
static String
LITERAL_OCCURRENCE_MAX
static String
LITERAL_OCCURRENCE_MIN
static String
RESOURCE_INTERFACE_NS
the 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 void
addBlueprint(fi.tut.mei.capabilityQueryLib.model.Blueprint blueprint)
Add information of the given blueprint to the ontology.org.apache.jena.ontology.Individual
addInterfaceDefinition(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceImplRDCT itf)
map an interface definition from an object to an ontologyvoid
clearInterfaceDefinitions()
clear all saved interface definitionsorg.apache.jena.ontology.Individual
createStandardOnto(fi.tut.mei.resdescapi.rdapi.model.rd.InterfaceStdCT std)
org.apache.jena.ontology.Individual
createStdBodyOnto(fi.tut.mei.resdescapi.rdapi.model.rd.StdBody stdBody)
Delete from hereorg.apache.jena.ontology.OntModel
getOntology()
Return the ontology model of the creator.void
writeOntology(OutputStream out)
Write the current ontology to the given output stream in the RDF/XML format.void
writeOntology(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
-
-