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

      • addBlueprint

        public void addBlueprint​(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