de.dfleischhacker.uni.thesis.utils.ontology
Class OntologyManager

java.lang.Object
  extended by de.dfleischhacker.uni.thesis.utils.ontology.OntologyManager

public class OntologyManager
extends java.lang.Object

This class provides methods to generate ontologies. It is possible to generate ontologies from a given OWL file. Furthermore, the OntologyManager is able to write ontologies to files.


Constructor Summary
OntologyManager()
           
 
Method Summary
static Ontology createOntology(java.net.URI uri)
          Creates an Ontology object and adds the OWLOntologyManager used to do this into the wrapper class.
static Ontology loadOntology(java.lang.String filename)
          Loads the given file as ontology.
static Ontology loadOntology(java.net.URI uri)
          Loads the file from the given physical URI as ontology.
static void writeOntology(Ontology onto, java.lang.String filename)
          Writes the given ontology into a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OntologyManager

public OntologyManager()
Method Detail

loadOntology

public static Ontology loadOntology(java.lang.String filename)
                             throws org.semanticweb.owl.model.OWLOntologyCreationException
Loads the given file as ontology. The filename has to be absolute. If no schema (schema://) is given in the URI it is assumed that the filename identifies a local file and the file:// schema will be added. It is assumed that the schema is missing if there is no "://" in filename.

Parameters:
filename - absolute URI of ontology as string
Returns:
ontology loaded from URI
Throws:
org.semanticweb.owl.model.OWLOntologyCreationException

loadOntology

public static Ontology loadOntology(java.net.URI uri)
                             throws org.semanticweb.owl.model.OWLOntologyCreationException
Loads the file from the given physical URI as ontology.

Parameters:
uri - physical URI of ontology
Returns:
ontology loaded from URI
Throws:
org.semanticweb.owl.model.OWLOntologyCreationException

writeOntology

public static void writeOntology(Ontology onto,
                                 java.lang.String filename)
                          throws org.semanticweb.owl.model.UnknownOWLOntologyException,
                                 org.semanticweb.owl.model.OWLOntologyStorageException
Writes the given ontology into a file. The RDF/XML format is used to represent this ontology

Parameters:
onto - ontology to write to file
filename - filname to use
Throws:
org.semanticweb.owl.model.UnknownOWLOntologyException
org.semanticweb.owl.model.OWLOntologyStorageException

createOntology

public static Ontology createOntology(java.net.URI uri)
                               throws org.semanticweb.owl.model.OWLOntologyCreationException
Creates an Ontology object and adds the OWLOntologyManager used to do this into the wrapper class.

Parameters:
uri - URI to identify the ontology
Throws:
org.semanticweb.owl.model.OWLOntologyCreationException