Package org.semanticweb.owlapi.model
Interface OWLOntologyFactory
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
OWLOntologyFactoryImpl
An ontology factory is responsible from creating new ontologies and creating ontologies from
ontology document IRIs.
- Since:
- 2.0.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
AnOWLOntologyCreationHandler
gets notified when the factory has created an empty ontology (during the loading process). -
Method Summary
Modifier and TypeMethodDescriptionboolean
canAttemptLoading
(OWLOntologyDocumentSource documentSource) Determines if the factory can load an ontology for the specified input source.boolean
canCreateFromDocumentIRI
(IRI documentIRI) Determines if the factory can create an ontology for the specified ontology document IRI.createOWLOntology
(OWLOntologyManager manager, OWLOntologyID ontologyID, IRI documentIRI, OWLOntologyFactory.OWLOntologyCreationHandler handler) Creates an (empty) ontology.loadOWLOntology
(OWLOntologyManager manager, OWLOntologyDocumentSource documentSource, OWLOntologyFactory.OWLOntologyCreationHandler handler, OWLOntologyLoaderConfiguration configuration) Creates and loads anOWLOntology
.default void
setLock
(ReadWriteLock lock) Override the lock in the ontology builder; this is a workaround for #806
-
Method Details
-
createOWLOntology
OWLOntology createOWLOntology(OWLOntologyManager manager, OWLOntologyID ontologyID, IRI documentIRI, OWLOntologyFactory.OWLOntologyCreationHandler handler) throws OWLOntologyCreationException Creates an (empty) ontology.- Parameters:
manager
- the ontology manager to set.ontologyID
- The ID of the ontology to create. This MUST NOT BEnull
.documentIRI
- The document IRI of the ontologyhandler
- The ontology creation handler that will be notified when the ontology has been created.- Returns:
- The newly created ontology
- Throws:
OWLOntologyCreationException
- if the ontology could not be created.
-
loadOWLOntology
OWLOntology loadOWLOntology(OWLOntologyManager manager, OWLOntologyDocumentSource documentSource, OWLOntologyFactory.OWLOntologyCreationHandler handler, OWLOntologyLoaderConfiguration configuration) throws OWLOntologyCreationException Creates and loads anOWLOntology
.- Parameters:
manager
- the ontology manager to set.documentSource
- The document source that provides the means of getting a representation of a document.handler
- A pointer to anOWLOntologyCreationHandler
which will be notified immediately after and empty ontology has been created, but before the source data is read and the ontology is loaded with axioms.configuration
- A configuration object which can be used to pass various options to the loader.- Returns:
- The newly created and loaded ontology.
- Throws:
OWLOntologyCreationException
- if the ontology could not be created
-
canCreateFromDocumentIRI
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, orfalse
if the factory cannot create an ontology given the specified document IRI.
-
canAttemptLoading
Determines if the factory can load an ontology for the specified input source.- Parameters:
documentSource
- The input source from which to load the ontology- Returns:
true
if the factory can load from the specified input source.
-
setLock
Override the lock in the ontology builder; this is a workaround for #806- Parameters:
lock
- overriding lock instance to use
-