Class OntologyCreator


  • public class OntologyCreator
    extends Object
    A class for creating a resource instances ontology.
    Author:
    hylli
    • 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 written
        format - output format. Possible values: "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE", "TURTLE", (and "TTL") and "N3".
        Throws:
        org.apache.jena.riot.RiotException - unrecognized format