public class OWLOntologyFactoryImpl extends Object implements OWLOntologyFactory
OWLOntologyFactory.OWLOntologyCreationHandler
Constructor and Description |
---|
OWLOntologyFactoryImpl(OWLOntologyBuilder ontologyBuilder) |
Modifier and Type | Method and Description |
---|---|
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
source.
|
OWLOntology |
createOWLOntology(OWLOntologyManager manager,
OWLOntologyID ontologyID,
IRI documentIRI,
OWLOntologyFactory.OWLOntologyCreationHandler handler)
Creates an (empty) ontology.
|
OWLOntology |
loadOWLOntology(OWLOntologyManager manager,
OWLOntologyDocumentSource documentSource,
OWLOntologyFactory.OWLOntologyCreationHandler handler,
OWLOntologyLoaderConfiguration configuration)
Creates and loads an
OWLOntology . |
void |
setLock(ReadWriteLock lock)
Override the lock in the ontology builder; this is a workaround for #806
|
@Inject public OWLOntologyFactoryImpl(OWLOntologyBuilder ontologyBuilder)
ontologyBuilder
- ontology builderpublic boolean canCreateFromDocumentIRI(@Nonnull IRI documentIRI)
OWLOntologyFactory
canCreateFromDocumentIRI
in interface OWLOntologyFactory
documentIRI
- The document IRItrue
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.@Nonnull public OWLOntology createOWLOntology(@Nonnull OWLOntologyManager manager, @Nonnull OWLOntologyID ontologyID, @Nonnull IRI documentIRI, @Nonnull OWLOntologyFactory.OWLOntologyCreationHandler handler)
OWLOntologyFactory
createOWLOntology
in interface OWLOntologyFactory
manager
- the ontology manager to set.ontologyID
- The ID of the ontology to create. This MUST NOT BE null
.documentIRI
- The document IRI of the ontologyhandler
- The ontology creation handler that will be notified when the
ontology has been created. @return The newly created ontologypublic boolean canLoad(@Nonnull OWLOntologyDocumentSource documentSource)
OWLOntologyFactory
canLoad
in interface OWLOntologyFactory
documentSource
- The input source from which to load the ontologytrue
if the factory can load from the specified input
source.@Nonnull public OWLOntology loadOWLOntology(@Nonnull OWLOntologyManager manager, @Nonnull OWLOntologyDocumentSource documentSource, @Nonnull OWLOntologyFactory.OWLOntologyCreationHandler handler, @Nonnull OWLOntologyLoaderConfiguration configuration) throws OWLOntologyCreationException
OWLOntologyFactory
OWLOntology
.loadOWLOntology
in interface OWLOntologyFactory
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 an OWLOntologyCreationHandler
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.OWLOntologyCreationException
- if the ontology could not be createdpublic void setLock(ReadWriteLock lock)
OWLOntologyFactory
setLock
in interface OWLOntologyFactory
lock
- overriding lock instance to useCopyright © 2020 The University of Manchester. All rights reserved.