public interface OWLOntologyManager extends OWLOntologySetProvider, HasDataFactory, HasGetOntologyById, HasApplyChanges, HasApplyChange, HasAddAxioms, HasAddAxiom, HasRemoveAxioms, HasRemoveAxiom, HasContainsOntology, HasOntologyChangeListeners, HasOntologyConfigurator, HasOntologyLoaderConfiguration, HasOntologyWriterConfiguration, Serializable
OWLOntologyManager manages a set of ontologies. It is the main
point for creating, loading and accessing ontologies. OWLOntologyManager also manages the mapping betweem an ontology
and its ontology document.| Modifier and Type | Method and Description |
|---|---|
void |
addImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener) |
void |
addIRIMapper(OWLOntologyIRIMapper mapper)
Deprecated.
use getIRIMappers().add() instead
|
void |
addMissingImportListener(MissingImportListener listener)
In the case where silent missing imports handling is enabled, a listener
can be attached via this method so that there is a mechanism that allows
clients to be informed of the reason when an import cannot be loaded.
|
void |
addOntologyChangeListener(OWLOntologyChangeListener listener,
OWLOntologyChangeBroadcastStrategy strategy)
Adds an ontology change listener, which listens to ontology changes.
|
void |
addOntologyChangeProgessListener(OWLOntologyChangeProgressListener listener)
Adds an ontology change progress listener.
|
void |
addOntologyChangesVetoedListener(OWLOntologyChangesVetoedListener listener) |
void |
addOntologyLoaderListener(OWLOntologyLoaderListener listener)
Adds an ontology loaded listener to this manager.
|
void |
addOntologyStorer(OWLStorerFactory storer)
Deprecated.
use getOntologyStorers().add() instead
|
void |
clearIRIMappers()
Deprecated.
use getIRIMappers().clear() instead
|
void |
clearOntologies()
Clear all ontologies, listeners and maps from the manager.
|
void |
clearOntologyStorers()
Deprecated.
use getOntologyStorers().clear() instead
|
boolean |
contains(IRI ontologyIRI)
Determines if there is an ontology with the specified IRI, and no version
IRI, that is managed by this manager
|
boolean |
contains(OWLOntology ontology) |
boolean |
contains(OWLOntologyID id)
Determines if there is an ontology with the specified id that is managed
by this manager
|
boolean |
containsVersion(IRI ontologyVersionIRI)
Determines if there is an ontology with the specified version IRI, that
is managed by this manager.
|
OWLOntology |
copyOntology(OWLOntology toCopy,
OntologyCopy settings)
Copy an ontology from another manager to this one.
|
default OWLOntology |
createOntology()
Creates a new (empty) ontology that does not have an ontology IRI (and
therefore does not have a version IRI).
|
default OWLOntology |
createOntology(Collection<OWLAxiom> axioms)
Creates a new ontology that is initialised to contain specific axioms.
|
default OWLOntology |
createOntology(Collection<OWLAxiom> axioms,
IRI ontologyIRI)
Creates a new ontology that has the specified ontology IRI and is
initialised to contain specific axioms.
|
default OWLOntology |
createOntology(IRI ontologyIRI)
Creates a new (empty) ontology that has the specified ontology IRI (and
no version IRI).
|
default OWLOntology |
createOntology(IRI ontologyIRI,
Collection<OWLOntology> ontologies)
Creates a new ontology that has the specified ontology IRI and is
initialised to contain the axioms that are contained in the specified
ontologies.
|
default OWLOntology |
createOntology(IRI ontologyIRI,
Collection<OWLOntology> ontologies,
boolean copyLogicalAxiomsOnly)
Creates a new ontology that has the specified ontology IRI and is
initialised to contain the axioms that are contained in the specified
ontologies.
|
OWLOntology |
createOntology(IRI ontologyIRI,
java.util.stream.Stream<OWLOntology> ontologies,
boolean copyLogicalAxiomsOnly)
Creates a new ontology that has the specified ontology IRI and is
initialised to contain the axioms that are contained in the specified
ontologies.
|
OWLOntology |
createOntology(OWLOntologyID ontologyID)
Creates a new (empty) ontology that has the specified ontology ID.
|
default OWLOntology |
createOntology(java.util.stream.Stream<OWLAxiom> axioms)
Creates a new ontology that is initialised to contain specific axioms.
|
OWLOntology |
createOntology(java.util.stream.Stream<OWLAxiom> axioms,
IRI ontologyIRI)
Creates a new ontology that has the specified ontology IRI and is
initialised to contain specific axioms.
|
java.util.stream.Stream<OWLOntology> |
directImports(OWLOntology ontology)
Stream of loaded ontologies that the specified ontology is
related to via the directlyImports relation as defined in Section 3.4 of
the OWL 2 Structural specification
|
default Set<OWLOntology> |
getDirectImports(OWLOntology ontology)
Deprecated.
use the stream method
|
OWLOntology |
getImportedOntology(OWLImportsDeclaration declaration)
Given an imports declaration, obtains the ontology that this import has
been resolved to.
|
default Set<OWLOntology> |
getImports(OWLOntology ontology)
Deprecated.
use the stream method
|
default Set<OWLOntology> |
getImportsClosure(OWLOntology ontology)
Deprecated.
use the stream method
|
PriorityCollection<OWLOntologyIRIMapper> |
getIRIMappers() |
default OWLDocumentFormat |
getNonnullOntologyFormat(OWLOntology ontology)
Gets the ontology format for the specified ontology, ensuring it is not
null (an error is thrown if the ontology has no format).
|
default Set<OWLOntology> |
getOntologies(OWLAxiom axiom)
Deprecated.
use the stream method
|
OWLOntology |
getOntology(IRI ontologyIRI)
Gets a previously loaded/created ontology that has the specified ontology
IRI and no version IRI.
|
OWLOntology |
getOntology(OWLOntologyID ontologyID)
Gets a previously loaded/created ontology that has the specified ontology
ID
|
IRI |
getOntologyDocumentIRI(OWLOntology ontology)
Gets the document IRI for a given ontology.
|
PriorityCollection<OWLOntologyFactory> |
getOntologyFactories() |
OWLDocumentFormat |
getOntologyFormat(OWLOntology ontology)
Gets the ontology format for the specified ontology.
|
default Set<OWLOntologyID> |
getOntologyIDsByVersion(IRI ontologyVersionIRI)
Deprecated.
use the stream method
|
PriorityCollection<OWLParserFactory> |
getOntologyParsers() |
PriorityCollection<OWLStorerFactory> |
getOntologyStorers() |
List<OWLOntology> |
getSortedImportsClosure(OWLOntology ontology)
Gets the topologically ordered imports closure.
|
default Set<OWLOntology> |
getVersions(IRI ontology)
Deprecated.
use
versions(IRI) |
java.util.stream.Stream<OWLOntology> |
imports(OWLOntology ontology)
Gets the set of ontologies that are in the transitive closure of the
directly imports relation.
|
java.util.stream.Stream<OWLOntology> |
importsClosure(OWLOntology ontology)
Imports closure stream for the specified ontology.
|
OWLOntology |
loadOntology(IRI ontologyIRI)
Loads an ontology that is assumed to have the specified
ontologyIRI as its IRI or version IRI. |
default OWLOntology |
loadOntologyFromOntologyDocument(File file)
Loads an ontology from an ontology document contained in a local file.
|
default OWLOntology |
loadOntologyFromOntologyDocument(InputStream inputStream)
Loads an ontology from an ontology document obtained from an input
stream.
|
default OWLOntology |
loadOntologyFromOntologyDocument(IRI documentIRI)
Loads an ontology from an ontology document specified by an IRI.
|
default OWLOntology |
loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource)
A convenience method that load an ontology from an input source.
|
OWLOntology |
loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource,
OWLOntologyLoaderConfiguration config)
A convenience method that load an ontology from an input source with
specified configuration.
|
default void |
makeLoadImportRequest(OWLImportsDeclaration declaration)
Requests that the manager loads an imported ontology that is described by
an imports statement.
|
void |
makeLoadImportRequest(OWLImportsDeclaration declaration,
OWLOntologyLoaderConfiguration configuration)
Requests that the manager loads an imported ontology that is described by
an imports statement.
|
default java.util.stream.Stream<OWLOntology> |
ontologies(OWLAxiom axiom)
Gets the ontologies that are managed by this manager that contain the
specified axiom.
|
java.util.stream.Stream<OWLOntologyID> |
ontologyIDsByVersion(IRI ontologyVersionIRI)
Gets a set of OWLOntologyIDs representing ontologies that are managed by
this manager.
|
void |
removeImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener) |
void |
removeIRIMapper(OWLOntologyIRIMapper mapper)
Deprecated.
use getIRIMappers().remove() instead
|
void |
removeMissingImportListener(MissingImportListener listener)
Removes a previously added missing import listener.
|
default void |
removeOntology(OWLOntology ontology)
Attempts to remove an ontology.
|
void |
removeOntology(OWLOntologyID ontologyID)
Attempts to remove an ontology.
|
void |
removeOntologyChangeProgessListener(OWLOntologyChangeProgressListener listener)
Removes a previously added ontology change listener.
|
void |
removeOntologyChangesVetoedListener(OWLOntologyChangesVetoedListener listener) |
void |
removeOntologyLoaderListener(OWLOntologyLoaderListener listener)
Removes a previously added ontology loaded listener.
|
void |
removeOntologyStorer(OWLStorerFactory storer)
Deprecated.
use getOntologyStorers().remove() instead
|
default void |
saveOntology(OWLOntology ontology)
Saves the specified ontology.
|
default void |
saveOntology(OWLOntology ontology,
IRI documentIRI)
Saves the specified ontology, using the specified document IRI to
determine where/how the ontology should be saved.
|
default void |
saveOntology(OWLOntology ontology,
OutputStream outputStream)
Saves the specified ontology, to the specified output stream
|
default void |
saveOntology(OWLOntology ontology,
OWLDocumentFormat ontologyFormat)
Saves the specified ontology in the specified ontology format to its
document URI.
|
void |
saveOntology(OWLOntology ontology,
OWLDocumentFormat ontologyFormat,
IRI documentIRI)
Saves the specified ontology to the specified document IRI in the
specified ontology format.
|
default void |
saveOntology(OWLOntology ontology,
OWLDocumentFormat ontologyFormat,
OutputStream outputStream)
Saves the specified ontology to the specified output stream in the
specified ontology format.
|
void |
saveOntology(OWLOntology ontology,
OWLDocumentFormat ontologyFormat,
OWLOntologyDocumentTarget documentTarget)
Saves the specified ontology to the specified output target in the
specified ontology format.
|
default void |
saveOntology(OWLOntology ontology,
OWLOntologyDocumentTarget documentTarget)
Saves the specified ontology to the specified
OWLOntologyDocumentTarget. |
void |
setDefaultChangeBroadcastStrategy(OWLOntologyChangeBroadcastStrategy strategy)
Sets the default strategy that is used to broadcast ontology changes.
|
void |
setIRIMappers(Set<OWLOntologyIRIMapper> mappers)
Set the collection of IRI mappers.
|
void |
setOntologyDocumentIRI(OWLOntology ontology,
IRI documentIRI)
Overrides the current document IRI for a given ontology.
|
void |
setOntologyFactories(Set<OWLOntologyFactory> factories)
Set the collection of ontology factories.
|
void |
setOntologyFormat(OWLOntology ontology,
OWLDocumentFormat ontologyFormat)
Sets the format for the specified ontology.
|
void |
setOntologyParsers(Set<OWLParserFactory> parsers)
Set the collection of parsers.
|
void |
setOntologyStorers(Set<OWLStorerFactory> storers)
Set the list of ontology storers.
|
default java.util.stream.Stream<OWLOntology> |
versions(IRI ontology)
Gets the versions (if any) of the ontology that have the specified IRI
|
getOntologies, ontologiesgetOWLDataFactoryapplyChanges, applyChangesapplyChangeaddAxioms, addAxiomsaddAxiomremoveAxioms, removeAxiomsremoveAxiomaddOntologyChangeListener, removeOntologyChangeListenergetOntologyConfigurator, setOntologyConfiguratorgetOntologyLoaderConfiguration, setOntologyLoaderConfigurationgetOntologyWriterConfiguration, setOntologyWriterConfigurationvoid clearOntologies()
@Deprecated default Set<OWLOntology> getOntologies(OWLAxiom axiom)
axiom - The axiomsdefault java.util.stream.Stream<OWLOntology> ontologies(OWLAxiom axiom)
axiom - The axioms@Deprecated default Set<OWLOntology> getVersions(IRI ontology)
versions(IRI)ontology - The ontology IRIdefault java.util.stream.Stream<OWLOntology> versions(IRI ontology)
ontology - The ontology IRIboolean contains(OWLOntology ontology)
ontology - ontology to checkboolean contains(IRI ontologyIRI)
ontologyIRI - The IRI of the ontology to test for (the version IRI is assumed to
be null)true if there is an ontology with the specified IRI, and
no version IRI, that is managed by this manager, otherwise
false.boolean contains(OWLOntologyID id)
contains in interface HasContainsOntologyid - The id of the ontology to test fortrue if there is an ontology with the specified id that
is managed by this manager, otherwise false.boolean containsVersion(IRI ontologyVersionIRI)
ontologyVersionIRI - The version IRI of the ontology to test for (the ontology IRI may
be anything)true if there is an ontology with the specified version
IRI, that is managed by this manager, otherwise false.@Deprecated default Set<OWLOntologyID> getOntologyIDsByVersion(IRI ontologyVersionIRI)
ontologyVersionIRI - The version IRI to match against all of the known ontologies.java.util.stream.Stream<OWLOntologyID> ontologyIDsByVersion(IRI ontologyVersionIRI)
ontologyVersionIRI - The version IRI to match against all of the known ontologies.@Nullable OWLOntology getOntology(IRI ontologyIRI)
ontologyIRI - The IRI of the ontology to be retrieved.null if this manager does not manage an ontology with the
specified IRI and no version IRI.@Nullable OWLOntology getOntology(OWLOntologyID ontologyID)
getOntology in interface HasGetOntologyByIdontologyID - The ID of the ontology to retrievenull if this
manager does not manage an ontology with the specified ontology
ID.@Nullable OWLOntology getImportedOntology(OWLImportsDeclaration declaration)
declaration - The declaration that points to the imported ontology.null if the imports declaration could not be resolved to
an ontology, because the ontology was not loaded or has been
removed from this manager@Deprecated default Set<OWLOntology> getDirectImports(OWLOntology ontology)
ontology - The ontology whose direct imports are to be retrieved.java.util.stream.Stream<OWLOntology> directImports(OWLOntology ontology)
ontology - The ontology whose direct imports are to be retrieved.@Deprecated default Set<OWLOntology> getImports(OWLOntology ontology)
ontology - The ontology whose imports are to be retrieved.OWLOntologyies that are in the transitive
closure of the directly imports relation of this ontology. If,
for what ever reason, an imported ontology could not be loaded,
then it will not be contained in the returned set of ontologies.
If the ontology is not managed by this manager then the empty set
will be returned.java.util.stream.Stream<OWLOntology> imports(OWLOntology ontology)
ontology - The ontology whose imports are to be retrieved.OWLOntologyies that are in the transitive
closure of the directly imports relation of this ontology. If,
for what ever reason, an imported ontology could not be loaded,
then it will not be contained in the returned set of ontologies.
If the ontology is not managed by this manager then the empty set
will be returned.@Deprecated default Set<OWLOntology> getImportsClosure(OWLOntology ontology)
ontology - The ontology whose imports closure is to be retrieved.Set of ontologies that contains the imports closure for
the specified ontology. This set will also include the specified
ontology. Example: if A imports B and B imports C, then calling
this method with A will return the set consisting of A, B and C.
If, for what ever reason, an imported ontology could not be
loaded, then it will not be contained in the returned set of
ontologies. If the ontology is not managed by this manager then
the empty set will be returned.java.util.stream.Stream<OWLOntology> importsClosure(OWLOntology ontology)
ontology - The ontology whose imports closure is to be retrieved.List<OWLOntology> getSortedImportsClosure(OWLOntology ontology)
ontology - The ontology whose imports closure is to be determined.default OWLOntology createOntology() throws OWLOntologyCreationException
OWLOntologyCreationException - if there was a problem creating the ontologydefault OWLOntology createOntology(Collection<OWLAxiom> axioms) throws OWLOntologyCreationException
axioms - The axioms that should be copied into the new ontologyOWLOntologyCreationException - if there was a problem creating the new ontology.OWLOntologyChangeException - if there was a problem copying the axioms.default OWLOntology createOntology(java.util.stream.Stream<OWLAxiom> axioms) throws OWLOntologyCreationException
axioms - The axioms that should be copied into the new ontologyOWLOntologyCreationException - if there was a problem creating the new ontology.OWLOntologyChangeException - if there was a problem copying the axioms.default OWLOntology createOntology(Collection<OWLAxiom> axioms, IRI ontologyIRI) throws OWLOntologyCreationException
ontologyIRI - The IRI of the new ontology. OWLOntologyIRIMappers. If no
mappers are installed or the ontology IRI was not mapped to a
document IRI by any of the installed mappers, then the ontology
document IRI will be set to the value of ontologyIRI.axioms - The axioms that should be copied into the new ontologyOWLOntologyCreationException - if there was a problem creating the new ontology, if the new
ontology already exists in this manager.OWLOntologyChangeException - if there was a problem copying the axioms.OWLOntologyAlreadyExistsException - if the manager already contains an ontology with the specified
ontologyIRI.OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is mapped to a ontology
document IRI for which there already exists a mapping in this
manager.OWLOntology createOntology(java.util.stream.Stream<OWLAxiom> axioms, IRI ontologyIRI) throws OWLOntologyCreationException
ontologyIRI - The IRI of the new ontology. OWLOntologyIRIMappers. If no
mappers are installed or the ontology IRI was not mapped to a
document IRI by any of the installed mappers, then the ontology
document IRI will be set to the value of ontologyIRI.axioms - The axioms that should be copied into the new ontologyOWLOntologyCreationException - if there was a problem creating the new ontology, if the new
ontology already exists in this manager.OWLOntologyChangeException - if there was a problem copying the axioms.OWLOntologyAlreadyExistsException - if the manager already contains an ontology with the specified
ontologyIRI.OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is mapped to a ontology
document IRI for which there already exists a mapping in this
manager.default OWLOntology createOntology(IRI ontologyIRI) throws OWLOntologyCreationException
OWLOntologyIRIMappers. If no mappers
are installed or the ontology IRI was not mapped to a document IRI by any
of the installed mappers, then the ontology document IRI will be set to
the value of ontologyIRI.ontologyIRI - The IRI of the ontology to be created. The ontology IRI will be
mapped to a document IRI in order to determine the type of
ontology factory that will be used to create the ontology. If this
mapping is null then a default (in memory) implementation
of the ontology will most likely be created.OWLOntologyCreationException - If the ontology could not be created.OWLOntologyAlreadyExistsException - if the manager already contains an ontology with the specified
ontologyIRI (and no version IRI).OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is mapped to a ontology
document IRI for which there already exists a mapping in this
manager.OWLOntology createOntology(OWLOntologyID ontologyID) throws OWLOntologyCreationException
ontologyID - The ID of the ontology to be created. OWLOntologyIRIMappers. If no
mappers are installed or the ontology IRI was not mapped to a
document IRI by any of the installed mappers, then the ontology
document IRI will be set to the value of ontologyIRI.OWLOntologyCreationException - If the ontology could not be created.OWLOntologyAlreadyExistsException - if the manager already contains an ontology with the specified
ontologyID (and no version IRI).OWLOntologyDocumentAlreadyExistsException - if the specified ontologyID is mapped to a ontology
document IRI for which there already exists a mapping in this
manager.default OWLOntology createOntology(IRI ontologyIRI, Collection<OWLOntology> ontologies, boolean copyLogicalAxiomsOnly) throws OWLOntologyCreationException
OWLOntologyIRIMappers. If no mappers
are installed or the ontology IRI was not mapped to a document IRI by any
of the installed mappers, then the ontology document IRI will be set to
the value of ontologyIRI.ontologyIRI - The IRI of the new ontology.ontologies - The ontologies whose axioms should be copied into the new ontologycopyLogicalAxiomsOnly - If set to true only logical axioms are copied into the new
ontology. If set to false then all axioms (including
annotation axioms) are copied into the new ontology.OWLOntologyCreationException - if there was a problem creating the new ontology, if the new
ontology already exists in this manager.OWLOntologyAlreadyExistsException - if the manager already contains an ontology with the specified
ontologyIRI (and no ontology version IRI).OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is mapped to a ontology
document IRI for which there already exists a mapping in this
manager.OWLOntology createOntology(IRI ontologyIRI, java.util.stream.Stream<OWLOntology> ontologies, boolean copyLogicalAxiomsOnly) throws OWLOntologyCreationException
OWLOntologyIRIMappers. If no mappers
are installed or the ontology IRI was not mapped to a document IRI by any
of the installed mappers, then the ontology document IRI will be set to
the value of ontologyIRI.ontologyIRI - The IRI of the new ontology.ontologies - The ontologies whose axioms should be copied into the new ontologycopyLogicalAxiomsOnly - If set to true only logical axioms are copied into the new
ontology. If set to false then all axioms (including
annotation axioms) are copied into the new ontology.OWLOntologyCreationException - if there was a problem creating the new ontology, if the new
ontology already exists in this manager.OWLOntologyAlreadyExistsException - if the manager already contains an ontology with the specified
ontologyIRI (and no ontology version IRI).OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is mapped to a ontology
document IRI for which there already exists a mapping in this
manager.default OWLOntology createOntology(IRI ontologyIRI, Collection<OWLOntology> ontologies) throws OWLOntologyCreationException
OWLOntologyIRIMappers. If no mappers
are installed or the ontology IRI was not mapped to a document IRI by any
of the installed mappers, then the ontology document IRI will be set to
the value of ontologyIRI.ontologyIRI - The IRI of the new ontology.ontologies - The ontologies whose axioms should be copied into the new ontologyOWLOntologyCreationException - if there was a problem creating the new ontology, if the new
ontology already exists in this manager.OWLOntologyAlreadyExistsException - if the manager already contains an ontology with the specified
ontologyIRI (and no version IRI).OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is mapped to a ontology
document IRI for which there already exists a mapping in this
manager.OWLOntology copyOntology(OWLOntology toCopy, OntologyCopy settings) throws OWLOntologyCreationException
toCopy - ontology to copysettings - settings for the copyOWLOntologyCreationException - if this manager cannot add the new ontologyOWLOntology loadOntology(IRI ontologyIRI) throws OWLOntologyCreationException
ontologyIRI as its IRI or version IRI. OWLOntologyIRIMapper
objects. By default, if no custom OWLOntologyIRIMappers have been
registered using the getIRIMappers() PriorityCollection
PriorityCollection.add(Serializable...) method, or no mapping can
be found, the ontology document IRI is taken to be the specified ontology
IRI.ontologyIRI - The IRI that identifies the ontology. It is expected that the
ontology will also have this IRI (although the OWL API will
tolerated situations where this is not the case).OWLOntology representation of the ontology that was
loaded.OWLOntologyCreationException - If there was a problem in creating and loading the ontology.UnparsableOntologyException - if the ontology was being parsed from a document and the document
contained syntax errors.UnloadableImportException - if the ontology imports ontologies and one of the imports could
not be loaded for what ever reason. If the
MissingImportHandlingStrategy is set to
MissingImportHandlingStrategy.SILENT then this exception
will not be thrown. The UnloadableImportException
contains information about the import declaration that triggered
the import and the cause of this exception is an
OWLOntologyCreationException which contains information
about why the import could not be loaded.OWLOntologyCreationIOException - if there was an IOException when trying to load the
ontology.OWLOntologyAlreadyExistsException - if the manager already contains an ontology with the specified
ontologyIRI (where the ontology doesn't have a version
IRI).OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is mapped to a ontology
document IRI for which there already exists a mapping in this
manager.default OWLOntology loadOntologyFromOntologyDocument(IRI documentIRI) throws OWLOntologyCreationException
loadOntology(IRI) method, no mapping is
performed on the specified IRI.documentIRI - The ontology document IRI where the ontology will be loaded from.OWLOntologyCreationException - If there was a problem in creating and loading the ontology.UnparsableOntologyException - if the ontology was being parsed from a document and the document
contained syntax errors.UnloadableImportException - if the ontology imports ontologies and one of the imports could
not be loaded for what ever reason. If the
MissingImportHandlingStrategy is set to
MissingImportHandlingStrategy.SILENT then this exception
will not be thrown. The UnloadableImportException
contains information about the import declaration that triggered
the import and the cause of this exception is an
OWLOntologyCreationException which contains information
about why the import could not be loaded.OWLOntologyCreationIOException - if there was an IOException when trying to load the
ontology.OWLOntologyDocumentAlreadyExistsException - if the specified documentIRI is already the document IRI
for a loaded ontology.OWLOntologyAlreadyExistsException - if the manager already contains an ontology whose ontology IRI
and version IRI is the same as the ontology IRI and version IRI
of the ontology contained in the document pointed to by
documentIRI.default OWLOntology loadOntologyFromOntologyDocument(File file) throws OWLOntologyCreationException
file - The file that contains a representation of an ontologyOWLOntologyCreationException - If there was a problem in creating and loading the ontology.UnparsableOntologyException - if the ontology could not be parsed.UnloadableImportException - if the ontology imports ontologies and one of the imports could
not be loaded for what ever reason. If the
MissingImportHandlingStrategy is set to
MissingImportHandlingStrategy.SILENT then this exception
will not be thrown. The UnloadableImportException
contains information about the import declaration that triggered
the import and the cause of this exception is an
OWLOntologyCreationException which contains information
about why the import could not be loaded.OWLOntologyCreationIOException - if there was an IOException when trying to load the
ontology.OWLOntologyDocumentAlreadyExistsException - if the IRI of the specified file is already the document IRI for
a loaded ontology.OWLOntologyAlreadyExistsException - if the manager already contains an ontology whose ontology IRI
and version IRI is the same as the ontology IRI and version IRI
of the ontology contained in the document pointed to by
documentIRI.default OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException
inputStream - The input stream that can be used to obtain a representation of an
ontologyOWLOntologyCreationException - If there was a problem in creating and loading the ontology.UnparsableOntologyException - if the ontology could not be parsed.UnloadableImportException - if the ontology imports ontologies and one of the imports could
not be loaded for what ever reason. If the
MissingImportHandlingStrategy is set to
MissingImportHandlingStrategy.SILENT then this exception
will not be thrown. The UnloadableImportException
contains information about the import declaration that triggered
the import and the cause of this exception is an
OWLOntologyCreationException which contains information
about why the import could not be loaded.OWLOntologyCreationIOException - if there was an IOException when trying to load the
ontology.OWLOntologyAlreadyExistsException - if the manager already contains an ontology whose ontology IRI
and version IRI is the same as the ontology IRI and version IRI
of the ontology obtained from parsing the content of the input
stream.default OWLOntology loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource) throws OWLOntologyCreationException
documentSource - The input source that describes where the ontology should be
loaded from.OWLOntologyCreationException - If there was a problem in creating and loading the ontology.UnparsableOntologyException - if the ontology was being parsed from a document and the document
contained syntax errors.UnloadableImportException - if the ontology imports ontologies and one of the imports could
not be loaded for what ever reason. If the
MissingImportHandlingStrategy is set to
MissingImportHandlingStrategy.SILENT then this exception
will not be thrown. The UnloadableImportException
contains information about the import declaration that triggered
the import and the cause of this exception is an
OWLOntologyCreationException which contains information
about why the import could not be loaded.OWLOntologyCreationIOException - if there was an IOException when trying to load the
ontology.OWLOntologyDocumentAlreadyExistsException - if the document IRI of the input source is already the document
IRI for a loaded ontology.OWLOntologyAlreadyExistsException - if the manager already contains an ontology whose ontology IRI
and version IRI is the same as the ontology IRI and version IRI
of the ontology contained in the document represented by the
input source.OWLOntology loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource, OWLOntologyLoaderConfiguration config) throws OWLOntologyCreationException
documentSource - The input source that describes where the ontology should be
loaded from.config - the configuration to useOWLOntologyCreationException - If there was a problem in creating and loading the ontology.UnparsableOntologyException - if the ontology was being parsed from a document and the document
contained syntax errors.UnloadableImportException - if the ontology imports ontologies and one of the imports could
not be loaded for what ever reason. If the
MissingImportHandlingStrategy is set to
MissingImportHandlingStrategy.SILENT then this exception
will not be thrown. The UnloadableImportException
contains information about the import declaration that triggered
the import and the cause of this exception is an
OWLOntologyCreationException which contains information
about why the import could not be loaded.OWLOntologyCreationIOException - if there was an IOException when trying to load the
ontology.OWLOntologyDocumentAlreadyExistsException - if the document IRI of the input source is already the document
IRI for a loaded ontology.OWLOntologyAlreadyExistsException - if the manager already contains an ontology whose ontology IRI
and version IRI is the same as the ontology IRI and version IRI
of the ontology contained in the document represented by the
input source.default void removeOntology(OWLOntology ontology)
ontology - The ontology to be removed. If this manager does not manage the
ontology then nothing happens.void removeOntology(OWLOntologyID ontologyID)
ontologyID - The ontology to be removed. If this manager does not manage the
ontology then nothing happens.IRI getOntologyDocumentIRI(OWLOntology ontology)
ontology - The ontology whose document IRI is to be obtained.UnknownOWLOntologyException - If the specified ontology is not managed by this manager.void setOntologyDocumentIRI(OWLOntology ontology, IRI documentIRI)
ontology - The ontology that has already been loaded.documentIRI - The new ontology document IRIUnknownOWLOntologyException - If the specified ontology is not managed by this manager.@Nullable OWLDocumentFormat getOntologyFormat(OWLOntology ontology)
ontology - The ontology whose format is to be obtained.null if the ontology has
no format (e.g., programmatically created ontology)default OWLDocumentFormat getNonnullOntologyFormat(OWLOntology ontology)
getOntologyFormat(OWLOntology).ontology - The ontology whose format is to be obtained.void setOntologyFormat(OWLOntology ontology, OWLDocumentFormat ontologyFormat)
ontology - The ontology whose format is to be set.ontologyFormat - The format for the specified ontology.UnknownOWLOntologyException - If the specified ontology is not managed by this manager.default void saveOntology(OWLOntology ontology) throws OWLOntologyStorageException
ontology - The ontology to be saved.OWLOntologyStorageException - An exception will be thrown if there is a problem with saving the
ontology, or the ontology can't be saved in the format it was
loaded from.UnknownOWLOntologyException - if this manager does not manage the specified ontologydefault void saveOntology(OWLOntology ontology, IRI documentIRI) throws OWLOntologyStorageException
ontology - The ontology to be saved.documentIRI - The document IRI where the ontology should be saved toOWLOntologyStorageException - If the ontology cannot be savedUnknownOWLOntologyException - if the specified ontology is not managed by this manager.default void saveOntology(OWLOntology ontology, OutputStream outputStream) throws OWLOntologyStorageException
ontology - The ontology to be saved.outputStream - The output stream where the ontology will be saved toOWLOntologyStorageException - If there was a problem saving this ontology to the specified
output streamUnknownOWLOntologyException - if this manager does not manage the specified ontology.default void saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat) throws OWLOntologyStorageException
ontology - The ontology to be saved.ontologyFormat - The format in which the ontology should be saved.OWLOntologyStorageException - If the ontology cannot be saved.UnknownOWLOntologyException - if the specified ontology is not managed by this managervoid saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat, IRI documentIRI) throws OWLOntologyStorageException
ontology - The ontology to be savedontologyFormat - The format in which to save the ontologydocumentIRI - The document IRI where the ontology should be saved toOWLOntologyStorageException - If the ontology could not be saved.UnknownOWLOntologyException - if the specified ontology is not managed by the manager.default void saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat, OutputStream outputStream) throws OWLOntologyStorageException
ontology - The ontology to be savedontologyFormat - The format in which to save the ontologyoutputStream - The output stream where the ontology will be saved to.OWLOntologyStorageException - If the ontology could not be saved.UnknownOWLOntologyException - if the specified ontology is not managed by the manager.default void saveOntology(OWLOntology ontology, OWLOntologyDocumentTarget documentTarget) throws OWLOntologyStorageException
OWLOntologyDocumentTarget.ontology - The ontology to be saved.documentTarget - The output target where the ontology will be saved to.OWLOntologyStorageException - If the ontology could not be saved.UnknownOWLOntologyException - if the specified ontology is not managed by this manager.void saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat, OWLOntologyDocumentTarget documentTarget) throws OWLOntologyStorageException
ontology - The ontology to be saved.ontologyFormat - The output format in which to save the ontologydocumentTarget - The output target where the ontology will be saved toOWLOntologyStorageException - If the ontology could not be saved.UnknownOWLOntologyException - If the specified ontology is not managed by this manager.@Deprecated void addIRIMapper(OWLOntologyIRIMapper mapper)
mapper - the mapper to add@Deprecated void removeIRIMapper(OWLOntologyIRIMapper mapper)
mapper - the mapper to remove@Deprecated void clearIRIMappers()
@Deprecated void addOntologyStorer(OWLStorerFactory storer)
storer - the storer to add@Deprecated void removeOntologyStorer(OWLStorerFactory storer)
storer - the storer to remove@Deprecated void clearOntologyStorers()
void setIRIMappers(Set<OWLOntologyIRIMapper> mappers)
mappers - the mappers to be injectedPriorityCollection<OWLOntologyIRIMapper> getIRIMappers()
void setOntologyParsers(Set<OWLParserFactory> parsers)
parsers - the factories to be injectedPriorityCollection<OWLParserFactory> getOntologyParsers()
void setOntologyFactories(Set<OWLOntologyFactory> factories)
factories - the factories to be injectedPriorityCollection<OWLOntologyFactory> getOntologyFactories()
void setOntologyStorers(Set<OWLStorerFactory> storers)
storers - The storers to be usedPriorityCollection<OWLStorerFactory> getOntologyStorers()
void addOntologyChangeListener(OWLOntologyChangeListener listener, OWLOntologyChangeBroadcastStrategy strategy)
listener - The listener to be added.strategy - The strategy that should be used for broadcasting changes to the
listener.void addImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener)
listener - the listener to addvoid removeImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener)
listener - the listener to removevoid addOntologyChangesVetoedListener(OWLOntologyChangesVetoedListener listener)
listener - the listener to addvoid removeOntologyChangesVetoedListener(OWLOntologyChangesVetoedListener listener)
listener - the listener to removevoid setDefaultChangeBroadcastStrategy(OWLOntologyChangeBroadcastStrategy strategy)
strategy - The strategy to be used for broadcasting changes. This strategy
will override any previously set broadcast strategy.DefaultChangeBroadcastStrategy,
EDTChangeBroadcastStrategydefault void makeLoadImportRequest(OWLImportsDeclaration declaration)
declaration - The declaration that describes the import to be loaded.UnloadableImportException - if there was a problem creating and loading the import and silent
missing imports handling is not turned on. If silent missing
import handling is turned on then this exception will not be
thrown.void makeLoadImportRequest(OWLImportsDeclaration declaration, OWLOntologyLoaderConfiguration configuration)
declaration - The declaration that describes the import to be loaded.configuration - The configuration object that passes arguments to the mechanism
used for loading.UnloadableImportException - if there was a problem creating and loading the import and silent
missing imports handling is not turned on. If silent missing
import handling is turned on then this exception will not be
thrown.void addMissingImportListener(MissingImportListener listener)
listener - The listener to be added.void removeMissingImportListener(MissingImportListener listener)
listener - The listener to be removed.void addOntologyLoaderListener(OWLOntologyLoaderListener listener)
listener - The listener to be added.void removeOntologyLoaderListener(OWLOntologyLoaderListener listener)
listener - The listener to be removed.void addOntologyChangeProgessListener(OWLOntologyChangeProgressListener listener)
listener - The listener to be added.void removeOntologyChangeProgessListener(OWLOntologyChangeProgressListener listener)
listener - The listener to be removed.Copyright © 2017 The University of Manchester. All Rights Reserved.