public class OWLOntologyManagerImpl extends Object implements OWLOntologyManager, OWLOntologyFactory.OWLOntologyCreationHandler, Serializable
| Constructor and Description |
|---|
OWLOntologyManagerImpl(OWLDataFactory dataFactory,
ReadWriteLock readWriteLock) |
OWLOntologyManagerImpl(OWLDataFactory dataFactory,
ReadWriteLock readWriteLock,
PriorityCollectionSorting sorting) |
| Modifier and Type | Method and Description |
|---|---|
ChangeApplied |
addAxiom(OWLOntology ont,
OWLAxiom axiom)
A convenience method that adds a single axiom to an ontology.
|
ChangeApplied |
addAxioms(OWLOntology ont,
Stream<? extends OWLAxiom> axioms)
A convenience method that adds a set of axioms to an ontology.
|
void |
addImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener) |
void |
addIRIMapper(OWLOntologyIRIMapper mapper)
Add an IRI mapper to the manager
|
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)
Adds an ontology change listener, which listens to all changes for all
ontologies.
|
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)
Add astorer to the manager
|
ChangeApplied |
applyChange(OWLOntologyChange change)
A convenience method that applies just one change to an ontology.
|
ChangeDetails |
applyChangesAndGetDetails(List<? extends OWLOntologyChange> changes)
Applies a list ontology changes to a collection of ontologies.
|
void |
clearIRIMappers()
Clear the manager mappers
|
void |
clearOntologies()
Clear all ontologies, listeners and maps from the manager.
|
void |
clearOntologyStorers()
Clear the manager storers
|
boolean |
contains(IRI iri)
Determines if there is an ontology that has the specified ontology IRI, regardless of version
IRI.
|
boolean |
contains(OWLOntology ontology) |
boolean |
contains(OWLOntologyID id)
Determines if there is an ontology with the specified id that is managed by this manager;
this method works only with non anonymous ids.
|
boolean |
containsVersion(IRI iri)
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.
|
OWLOntology |
createOntology(IRI ontologyIRI,
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.
|
OWLOntology |
createOntology(Stream<OWLAxiom> axioms,
IRI ontologyIRI)
Creates a new ontology that has the specified ontology IRI and is initialised to contain
specific axioms.
|
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
|
OWLOntology |
getImportedOntology(OWLImportsDeclaration declaration)
Given an imports declaration, obtains the ontology that this import has been resolved to.
|
PriorityCollection<OWLOntologyIRIMapper> |
getIRIMappers() |
OWLOntology |
getOntology(IRI iri)
Gets a previously loaded/created ontology that has the specified ontology IRI, regardless of
version IRI.
|
OWLOntology |
getOntology(OWLOntologyID id)
Get a previously loaded/created ontology that has the specified ontology ID.
|
OntologyConfigurator |
getOntologyConfigurator() |
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.
|
OWLOntologyLoaderConfiguration |
getOntologyLoaderConfiguration() |
PriorityCollection<OWLParserFactory> |
getOntologyParsers() |
PriorityCollection<OWLStorerFactory> |
getOntologyStorers() |
OWLOntologyWriterConfiguration |
getOntologyWriterConfiguration() |
OWLDataFactory |
getOWLDataFactory()
Gets a data factory which can be used to create OWL API objects such as
classes, properties, individuals, axioms etc.
|
List<OWLOntology> |
getSortedImportsClosure(OWLOntology ontology)
Gets the topologically ordered imports closure.
|
Stream<OWLOntology> |
imports(OWLOntology ontology)
Gets the stream of ontologies that are in the transitive closure of the directly imports
relation.
|
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. |
OWLOntology |
loadOntologyFromOntologyDocument(File file)
Loads an ontology from an ontology document contained in a local file.
|
OWLOntology |
loadOntologyFromOntologyDocument(InputStream inputStream)
Loads an ontology from an ontology document obtained from an input stream.
|
OWLOntology |
loadOntologyFromOntologyDocument(IRI documentIRI)
Loads an ontology from an ontology document specified by an IRI.
|
OWLOntology |
loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource)
A convenience method that load an ontology from an input source.
|
OWLOntology |
loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource,
OWLOntologyLoaderConfiguration conf)
A convenience method that load an ontology from an input source with specified configuration.
|
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.
|
Stream<OWLOntology> |
ontologies() |
Stream<OWLOntology> |
ontologies(OWLAxiom axiom)
Gets the ontologies that are managed by this manager that contain the specified axiom.
|
void |
ontologyCreated(OWLOntology ontology)
The factory calls this method as soon as it has created an ontology.
|
Stream<OWLOntologyID> |
ontologyIDsByVersion(IRI iri)
Gets a set of OWLOntologyIDs representing ontologies that are managed by this manager.
|
ChangeApplied |
removeAxiom(OWLOntology ont,
OWLAxiom axiom)
A convenience method that removes a single axiom from an ontology.
|
ChangeApplied |
removeAxioms(OWLOntology ont,
Stream<? extends OWLAxiom> axioms)
A convenience method that removes a set of axioms from an ontology.
|
void |
removeImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener) |
void |
removeIRIMapper(OWLOntologyIRIMapper mapper)
Remove an IRI mapper from the manager
|
void |
removeMissingImportListener(MissingImportListener listener)
Removes a previously added missing import listener.
|
void |
removeOntology(OWLOntology ontology)
Attempts to remove an ontology.
|
void |
removeOntology(OWLOntologyID ontologyID)
Attempts to remove an ontology.
|
void |
removeOntologyChangeListener(OWLOntologyChangeListener listener)
Removes a previously added listener.
|
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)
Remove a storer from the manager
|
void |
saveOntology(OWLOntology ontology)
Saves the specified ontology.
|
void |
saveOntology(OWLOntology ontology,
IRI documentIRI)
Saves the specified ontology, using the specified document IRI to determine where/how the
ontology should be saved.
|
void |
saveOntology(OWLOntology ontology,
OutputStream outputStream)
Saves the specified ontology, to the specified output stream
|
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.
|
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.
|
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 |
setOntologyConfigurator(OntologyConfigurator configurator) |
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 |
setOntologyLoaderConfiguration(OWLOntologyLoaderConfiguration newConfig)
Sets the configuration.
|
void |
setOntologyParsers(Set<OWLParserFactory> parsers)
Set the collection of parsers.
|
void |
setOntologyStorers(Set<OWLStorerFactory> storers)
Set the list of ontology storers.
|
void |
setOntologyWriterConfiguration(OWLOntologyWriterConfiguration newConfig)
Sets the configuration.
|
Stream<OWLOntology> |
versions(IRI ontology)
Gets the versions (if any) of the ontology that have the specified IRI
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateOntology, createOntology, createOntology, createOntology, createOntology, createOntology, createOntology, getDirectImports, getImports, getImportsClosure, getNonnullOntologyFormat, getOntologies, getOntologyIDsByVersion, getVersionsgetOntologiesapplyChanges, applyChanges, applyChangesAndGetDetailsaddAxiomsremoveAxioms@Inject public OWLOntologyManagerImpl(OWLDataFactory dataFactory, ReadWriteLock readWriteLock)
dataFactory - data factoryreadWriteLock - lockpublic OWLOntologyManagerImpl(OWLDataFactory dataFactory, ReadWriteLock readWriteLock, PriorityCollectionSorting sorting)
dataFactory - data factoryreadWriteLock - locksorting - sorting optionpublic void clearOntologies()
OWLOntologyManagerclearOntologies in interface OWLOntologyManagerpublic OntologyConfigurator getOntologyConfigurator()
getOntologyConfigurator in interface HasOntologyConfiguratorpublic void setOntologyConfigurator(OntologyConfigurator configurator)
setOntologyConfigurator in interface HasOntologyConfiguratorconfigurator - the configurator.public OWLOntologyLoaderConfiguration getOntologyLoaderConfiguration()
getOntologyLoaderConfiguration in interface HasOntologyLoaderConfigurationpublic void setOntologyLoaderConfiguration(OWLOntologyLoaderConfiguration newConfig)
HasOntologyLoaderConfigurationsetOntologyLoaderConfiguration in interface HasOntologyLoaderConfigurationnewConfig - configuration to be usedpublic OWLOntologyWriterConfiguration getOntologyWriterConfiguration()
getOntologyWriterConfiguration in interface HasOntologyWriterConfigurationpublic void setOntologyWriterConfiguration(OWLOntologyWriterConfiguration newConfig)
HasOntologyWriterConfigurationsetOntologyWriterConfiguration in interface HasOntologyWriterConfigurationnewConfig - configuration to be usedpublic OWLDataFactory getOWLDataFactory()
HasDataFactorygetOWLDataFactory in interface HasDataFactorypublic Stream<OWLOntology> ontologies()
ontologies in interface HasGetOntologiespublic Stream<OWLOntology> ontologies(OWLAxiom axiom)
OWLOntologyManagerontologies in interface OWLOntologyManageraxiom - The axiomspublic boolean contains(OWLOntology ontology)
contains in interface OWLOntologyManagerontology - ontology to checkpublic boolean contains(IRI iri)
OWLOntologyManagercontains in interface OWLOntologyManageriri - The IRI of the ontology to test for.true if there is an ontology with the specified IRI or version IRI, that is
managed by this manager, otherwise false.public boolean contains(OWLOntologyID id)
OWLOntologyManagercontains in interface HasContainsOntologycontains in interface OWLOntologyManagerid - 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.public boolean containsVersion(IRI iri)
OWLOntologyManagercontainsVersion in interface OWLOntologyManageriri - 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.public Stream<OWLOntologyID> ontologyIDsByVersion(IRI iri)
OWLOntologyManagerontologyIDsByVersion in interface OWLOntologyManageriri - The version IRI to match against all of the known ontologies.@Nullable public OWLOntology getOntology(IRI iri)
OWLOntologyManagergetOntology in interface OWLOntologyManageriri - The IRI of the ontology to be retrieved.null if none found.@Nullable public OWLOntology getOntology(OWLOntologyID id)
HasGetOntologyByIdgetOntology in interface HasGetOntologyByIdgetOntology in interface OWLOntologyManagerid - The ID of the ontology to retrieve.null if there is no ontology with the
specified ID.public Stream<OWLOntology> versions(IRI ontology)
OWLOntologyManagerversions in interface OWLOntologyManagerontology - The ontology IRI@Nullable public OWLOntology getImportedOntology(OWLImportsDeclaration declaration)
OWLOntologyManagergetImportedOntology in interface OWLOntologyManagerdeclaration - 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 managerpublic Stream<OWLOntology> directImports(OWLOntology ontology)
OWLOntologyManagerdirectImports in interface OWLOntologyManagerontology - The ontology whose direct imports are to be retrieved.public Stream<OWLOntology> imports(OWLOntology ontology)
OWLOntologyManagerimports in interface OWLOntologyManagerontology - 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.public Stream<OWLOntology> importsClosure(OWLOntology ontology)
OWLOntologyManagerimportsClosure in interface OWLOntologyManagerontology - The ontology whose imports closure is to be retrieved.public List<OWLOntology> getSortedImportsClosure(OWLOntology ontology)
OWLOntologyManagergetSortedImportsClosure in interface OWLOntologyManagerontology - The ontology whose imports closure is to be determined.public ChangeDetails applyChangesAndGetDetails(List<? extends OWLOntologyChange> changes)
HasApplyChangesOWLOntologyManager implementation, the instance used should be the one
that the ontology returns through the getOWLOntologyManager() call. The reason is
that some changes, e.g., change of ontology id and change of imports directives, affect data
that only that manager instance knows about, such as the imports closure; changes of ontology
id through the wrong manager will make the ontology unreachable through its new id in the
manager associated with the ontology. Configuration for loading and saving parameters is also
held by the manager, if not explicitly specified for the ontology. While the change might be
successful, other bugs might be made apparent later.applyChangesAndGetDetails in interface HasApplyChangeschanges - The changes to be applied.public ChangeApplied addAxiom(OWLOntology ont, OWLAxiom axiom)
HasAddAxiomaddAxiom in interface HasAddAxiomont - The ontology to add the axiom to.axiom - The axiom to be addedpublic ChangeApplied addAxioms(OWLOntology ont, Stream<? extends OWLAxiom> axioms)
HasAddAxiomsaddAxioms in interface HasAddAxiomsont - The ontology to which the axioms should be added.axioms - The axioms to be added.public ChangeApplied removeAxiom(OWLOntology ont, OWLAxiom axiom)
HasRemoveAxiomremoveAxiom in interface HasRemoveAxiomont - The ontology to remove the axiom from.axiom - The axiom to be removedpublic ChangeApplied removeAxioms(OWLOntology ont, Stream<? extends OWLAxiom> axioms)
HasRemoveAxiomsremoveAxioms in interface HasRemoveAxiomsont - The ontology from which the axioms should be removed.axioms - The axioms to be removed.public ChangeApplied applyChange(OWLOntologyChange change)
HasApplyChangeOWLOntologyManager implementation, the instance used should be the one
that the ontology returns through the getOWLOntologyManager() call. The reason is
that some changes, e.g., change of ontology id and change of imports directives, affect data
that only that manager instance knows about, such as the imports closure; changes of ontology
id through the wrong manager will make the ontology unreachable through its new id in the
manager associated with the ontology. Configuration for loading and saving parameters is also
held by the manager, if not explicitly specified for the ontology. While the change might be
successful, other bugs might be made apparent later.applyChange in interface HasApplyChangechange - The change to be appliedpublic void ontologyCreated(OWLOntology ontology)
OWLOntologyFactory.OWLOntologyCreationHandlerontologyCreated in interface OWLOntologyFactory.OWLOntologyCreationHandlerontology - The newly created ontology.public void setOntologyFormat(OWLOntology ontology, OWLDocumentFormat ontologyFormat)
OWLOntologyManagersetOntologyFormat in interface OWLOntologyFactory.OWLOntologyCreationHandlersetOntologyFormat in interface OWLOntologyManagerontology - The ontology whose format is to be set.ontologyFormat - The format for the specified ontology.@Nullable public OWLDocumentFormat getOntologyFormat(OWLOntology ontology)
OWLOntologyManagergetOntologyFormat in interface OWLOntologyManagerontology - The ontology whose format is to be obtained.null if the ontology has no format (e.g.,
programmatically created ontology)public OWLOntology createOntology(OWLOntologyID ontologyID) throws OWLOntologyCreationException
OWLOntologyManagercreateOntology in interface OWLOntologyManagerontologyID - 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.public OWLOntology createOntology(IRI ontologyIRI, Stream<OWLOntology> ontologies, boolean copyLogicalAxiomsOnly) throws OWLOntologyCreationException
OWLOntologyManagerOWLOntologyIRIMappers. 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.createOntology in interface OWLOntologyManagerontologyIRI - 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.public OWLOntology createOntology(Stream<OWLAxiom> axioms, IRI ontologyIRI) throws OWLOntologyCreationException
OWLOntologyManagercreateOntology in interface OWLOntologyManageraxioms - The axioms that should be copied into the new ontologyontologyIRI - 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.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.OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is
mapped to a ontology document IRI for which there already exists a mapping in this
manager.public OWLOntology copyOntology(OWLOntology toCopy, OntologyCopy settings) throws OWLOntologyCreationException
OWLOntologyManagercopyOntology in interface OWLOntologyManagertoCopy - ontology to copysettings - settings for the copyOWLOntologyCreationException - if this manager cannot add the new ontologypublic OWLOntology loadOntology(IRI ontologyIRI) throws OWLOntologyCreationException
OWLOntologyManagerontologyIRI as its IRI or
version IRI. OWLOntologyIRIMapper objects. By default, if no custom
OWLOntologyIRIMappers have been registered using the OWLOntologyManager.getIRIMappers()
PriorityCollection PriorityCollection.add(Serializable...) method, or no mapping can
be found, the ontology document IRI is taken to be the specified ontology IRI.loadOntology in interface OWLOntologyManagerontologyIRI - 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.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.public OWLOntology loadOntologyFromOntologyDocument(IRI documentIRI) throws OWLOntologyCreationException
OWLOntologyManagerOWLOntologyManager.loadOntology(IRI) method, no mapping is performed on the specified IRI.loadOntologyFromOntologyDocument in interface OWLOntologyManagerdocumentIRI - 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.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.public OWLOntology loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource) throws OWLOntologyCreationException
OWLOntologyManagerloadOntologyFromOntologyDocument in interface OWLOntologyManagerdocumentSource - 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.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.public OWLOntology loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource, OWLOntologyLoaderConfiguration conf) throws OWLOntologyCreationException
OWLOntologyManagerloadOntologyFromOntologyDocument in interface OWLOntologyManagerdocumentSource - The input source that describes where the ontology should be loaded
from.conf - 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.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.public OWLOntology loadOntologyFromOntologyDocument(File file) throws OWLOntologyCreationException
OWLOntologyManagerloadOntologyFromOntologyDocument in interface OWLOntologyManagerfile - 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.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.public OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException
OWLOntologyManagerloadOntologyFromOntologyDocument in interface OWLOntologyManagerinputStream - 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.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.public void removeOntology(OWLOntology ontology)
OWLOntologyManagerremoveOntology in interface OWLOntologyManagerontology - The ontology to be removed. If this manager does not manage the ontology then
nothing happens.public void removeOntology(OWLOntologyID ontologyID)
OWLOntologyManagerremoveOntology in interface OWLOntologyManagerontologyID - The ontology to be removed. If this manager does not manage the ontology
then nothing happens.public IRI getOntologyDocumentIRI(OWLOntology ontology)
OWLOntologyManagergetOntologyDocumentIRI in interface OWLOntologyManagerontology - The ontology whose document IRI is to be obtained.public void setOntologyDocumentIRI(OWLOntology ontology, IRI documentIRI)
OWLOntologyManagersetOntologyDocumentIRI in interface OWLOntologyManagerontology - The ontology that has already been loaded.documentIRI - The new ontology document IRIpublic void saveOntology(OWLOntology ontology) throws OWLOntologyStorageException
OWLOntologyManagersaveOntology in interface OWLOntologyManagerontology - 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.public void saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat) throws OWLOntologyStorageException
OWLOntologyManagersaveOntology in interface OWLOntologyManagerontology - The ontology to be saved.ontologyFormat - The format in which the ontology should be saved.OWLOntologyStorageException - If the ontology cannot be saved.public void saveOntology(OWLOntology ontology, IRI documentIRI) throws OWLOntologyStorageException
OWLOntologyManagersaveOntology in interface OWLOntologyManagerontology - The ontology to be saved.documentIRI - The document IRI where the ontology should be saved toOWLOntologyStorageException - If the ontology cannot be savedpublic void saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat, IRI documentIRI) throws OWLOntologyStorageException
OWLOntologyManagersaveOntology in interface OWLOntologyManagerontology - 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.public void saveOntology(OWLOntology ontology, OutputStream outputStream) throws OWLOntologyStorageException
OWLOntologyManagersaveOntology in interface OWLOntologyManagerontology - 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 streampublic void saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat, OutputStream outputStream) throws OWLOntologyStorageException
OWLOntologyManagersaveOntology in interface OWLOntologyManagerontology - 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.public void saveOntology(OWLOntology ontology, OWLOntologyDocumentTarget documentTarget) throws OWLOntologyStorageException
OWLOntologyManagerOWLOntologyDocumentTarget.saveOntology in interface OWLOntologyManagerontology - The ontology to be saved.documentTarget - The output target where the ontology will be saved to.OWLOntologyStorageException - If the ontology could not be saved.public void saveOntology(OWLOntology ontology, OWLDocumentFormat ontologyFormat, OWLOntologyDocumentTarget documentTarget) throws OWLOntologyStorageException
OWLOntologyManagersaveOntology in interface OWLOntologyManagerontology - 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.public PriorityCollection<OWLStorerFactory> getOntologyStorers()
getOntologyStorers in interface OWLOntologyManager@Inject public void setOntologyStorers(Set<OWLStorerFactory> storers)
OWLOntologyManagersetOntologyStorers in interface OWLOntologyManagerstorers - The storers to be usedpublic PriorityCollection<OWLOntologyIRIMapper> getIRIMappers()
getIRIMappers in interface OWLOntologyManager@Inject public void setIRIMappers(Set<OWLOntologyIRIMapper> mappers)
OWLOntologyManagersetIRIMappers in interface OWLOntologyManagermappers - the mappers to be injectedpublic void addIRIMapper(OWLOntologyIRIMapper mapper)
OWLOntologyManageraddIRIMapper in interface OWLOntologyManagermapper - the mapper to addpublic void removeIRIMapper(OWLOntologyIRIMapper mapper)
OWLOntologyManagerremoveIRIMapper in interface OWLOntologyManagermapper - the mapper to removepublic void clearIRIMappers()
OWLOntologyManagerclearIRIMappers in interface OWLOntologyManagerpublic void addOntologyStorer(OWLStorerFactory storer)
OWLOntologyManageraddOntologyStorer in interface OWLOntologyManagerstorer - the storer to addpublic void removeOntologyStorer(OWLStorerFactory storer)
OWLOntologyManagerremoveOntologyStorer in interface OWLOntologyManagerstorer - the storer to removepublic void clearOntologyStorers()
OWLOntologyManagerclearOntologyStorers in interface OWLOntologyManagerpublic PriorityCollection<OWLParserFactory> getOntologyParsers()
getOntologyParsers in interface OWLOntologyManager@Inject public void setOntologyParsers(Set<OWLParserFactory> parsers)
OWLOntologyManagersetOntologyParsers in interface OWLOntologyManagerparsers - the factories to be injectedpublic PriorityCollection<OWLOntologyFactory> getOntologyFactories()
getOntologyFactories in interface OWLOntologyManager@Inject public void setOntologyFactories(Set<OWLOntologyFactory> factories)
OWLOntologyManagersetOntologyFactories in interface OWLOntologyManagerfactories - the factories to be injectedpublic void addOntologyChangeListener(OWLOntologyChangeListener listener)
HasOntologyChangeListenersaddOntologyChangeListener method which takes a broadcast strategy
as an argument should be used.addOntologyChangeListener in interface HasOntologyChangeListenerslistener - The listener to be added.public void setDefaultChangeBroadcastStrategy(OWLOntologyChangeBroadcastStrategy strategy)
OWLOntologyManagersetDefaultChangeBroadcastStrategy in interface OWLOntologyManagerstrategy - The strategy to be used for broadcasting changes. This strategy will override
any previously set broadcast strategy.DefaultChangeBroadcastStrategy,
EDTChangeBroadcastStrategypublic void addOntologyChangeListener(OWLOntologyChangeListener listener, OWLOntologyChangeBroadcastStrategy strategy)
OWLOntologyManageraddOntologyChangeListener in interface OWLOntologyManagerlistener - The listener to be added.strategy - The strategy that should be used for broadcasting changes to the listener.public void addImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener)
addImpendingOntologyChangeListener in interface OWLOntologyManagerlistener - the listener to addpublic void removeImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener)
removeImpendingOntologyChangeListener in interface OWLOntologyManagerlistener - the listener to removepublic void removeOntologyChangeListener(OWLOntologyChangeListener listener)
HasOntologyChangeListenersremoveOntologyChangeListener in interface HasOntologyChangeListenerslistener - The listener to be removed.public void addOntologyChangesVetoedListener(OWLOntologyChangesVetoedListener listener)
addOntologyChangesVetoedListener in interface OWLOntologyManagerlistener - the listener to addpublic void removeOntologyChangesVetoedListener(OWLOntologyChangesVetoedListener listener)
removeOntologyChangesVetoedListener in interface OWLOntologyManagerlistener - the listener to removepublic void makeLoadImportRequest(OWLImportsDeclaration declaration)
OWLOntologyManagermakeLoadImportRequest in interface OWLOntologyManagerdeclaration - The declaration that describes the import to be loaded.public void makeLoadImportRequest(OWLImportsDeclaration declaration, OWLOntologyLoaderConfiguration configuration)
OWLOntologyManagermakeLoadImportRequest in interface OWLOntologyManagerdeclaration - The declaration that describes the import to be loaded.configuration - The configuration object that passes arguments to the mechanism used for
loading.public void addMissingImportListener(MissingImportListener listener)
OWLOntologyManageraddMissingImportListener in interface OWLOntologyManagerlistener - The listener to be added.public void removeMissingImportListener(MissingImportListener listener)
OWLOntologyManagerremoveMissingImportListener in interface OWLOntologyManagerlistener - The listener to be removed.public void addOntologyLoaderListener(OWLOntologyLoaderListener listener)
OWLOntologyManageraddOntologyLoaderListener in interface OWLOntologyManagerlistener - The listener to be added.public void removeOntologyLoaderListener(OWLOntologyLoaderListener listener)
OWLOntologyManagerremoveOntologyLoaderListener in interface OWLOntologyManagerlistener - The listener to be removed.public void addOntologyChangeProgessListener(OWLOntologyChangeProgressListener listener)
OWLOntologyManageraddOntologyChangeProgessListener in interface OWLOntologyManagerlistener - The listener to be added.public void removeOntologyChangeProgessListener(OWLOntologyChangeProgressListener listener)
OWLOntologyManagerremoveOntologyChangeProgessListener in interface OWLOntologyManagerlistener - The listener to be removed.Copyright © 2019 The University of Manchester. All rights reserved.