org.semanticweb.owlapi.model
Interface OWLOntologyFactory

All Known Implementing Classes:
AbstractInMemOWLOntologyFactory, EmptyInMemOWLOntologyFactory, ParsableOWLOntologyFactory

public interface OWLOntologyFactory

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group Date: 25-Oct-2006

An ontology factory is responsible from creating new ontologies and creating ontologies from ontology document IRIs.


Nested Class Summary
static interface OWLOntologyFactory.OWLOntologyCreationHandler
          An OWLOntologyCreationHandler gets notified when the factory has created an empty ontology (during the loading process).
 
Method Summary
 boolean canCreateFromDocumentIRI(IRI documentIRI)
          Determines if the factory can create an ontology for the specified ontology document IRI.
 boolean canLoad(OWLOntologyDocumentSource documentSource)
          Determines if the factory can load an ontology for the specified input souce
 OWLOntology createOWLOntology(OWLOntologyID ontologyID, IRI documentIRI, OWLOntologyFactory.OWLOntologyCreationHandler handler)
          Creates an (empty) ontology.
 OWLOntology loadOWLOntology(OWLOntologyDocumentSource documentSource, OWLOntologyFactory.OWLOntologyCreationHandler handler)
          Creates and loads an OWLOntology.
 void setOWLOntologyManager(OWLOntologyManager owlOntologyManager)
           
 

Method Detail

setOWLOntologyManager

void setOWLOntologyManager(OWLOntologyManager owlOntologyManager)

createOWLOntology

OWLOntology createOWLOntology(OWLOntologyID ontologyID,
                              IRI documentIRI,
                              OWLOntologyFactory.OWLOntologyCreationHandler handler)
                              throws OWLOntologyCreationException
Creates an (empty) ontology.

Parameters:
ontologyID - The ID of the ontology to create. This MUST NOT BE null.
documentIRI - The document IRI of the ontology
handler - The ontology creation handler that will be notified when the ontology has been created. @return The newly created ontology
Returns:
The created ontology
Throws:
OWLOntologyCreationException - if the ontology could not be created.

loadOWLOntology

OWLOntology loadOWLOntology(OWLOntologyDocumentSource documentSource,
                            OWLOntologyFactory.OWLOntologyCreationHandler handler)
                            throws OWLOntologyCreationException
Creates and loads an OWLOntology. be loaded into the ontology.

Parameters:
documentSource - The input source
handler - A pointer to an OWLOntologyCreationHandler which will be notified immediately after an emtpty ontology has been created, but before the source data is read and the ontology is loaded with axioms.
Returns:
The newly created and loaded ontology
Throws:
OWLOntologyCreationException - if the ontology could not be created.

canCreateFromDocumentIRI

boolean canCreateFromDocumentIRI(IRI documentIRI)
Determines if the factory can create an ontology for the specified ontology document IRI.

Parameters:
documentIRI - The document IRI
Returns:
true if the factory can create an ontology given the specified document IRI, or false if the factory cannot create an ontology given the specified document IRI.

canLoad

boolean canLoad(OWLOntologyDocumentSource documentSource)
Determines if the factory can load an ontology for the specified input souce

Parameters:
documentSource - The input source from which to load the ontology
Returns:
true if the factory can load from the specified input source.