uk.ac.manchester.cs.owl.owlapi
Class OWLOntologyManagerImpl

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl
All Implemented Interfaces:
OWLOntologyFactory.OWLOntologyCreationHandler, OWLOntologyManager, OWLOntologySetProvider

public class OWLOntologyManagerImpl
extends java.lang.Object
implements OWLOntologyManager, OWLOntologyFactory.OWLOntologyCreationHandler

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


Constructor Summary
OWLOntologyManagerImpl(OWLDataFactory dataFactory)
           
 
Method Summary
 java.util.List<OWLOntologyChange> addAxiom(OWLOntology ont, OWLAxiom axiom)
          A convenience method that adds a single axiom to an ontology.
 java.util.List<OWLOntologyChange> addAxioms(OWLOntology ont, java.util.Set<? extends OWLAxiom> axioms)
          A convenience method that adds a set of axioms to an ontology.
 void addImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener)
           
 void addIRIMapper(OWLOntologyIRIMapper mapper)
          Adds a mapper to this 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 addOntologyFactory(OWLOntologyFactory factory)
          Adds an ontology factory that is capable of creating an ontology given a particular document IRI.
 void addOntologyLoaderListener(OWLOntologyLoaderListener listener)
          Adds an ontology loaded listener to this manager.
 void addOntologyStorer(OWLOntologyStorer storer)
          Add an ontology storer.
 java.util.List<OWLOntologyChange> applyChange(OWLOntologyChange change)
          A convenience method that applies just one change to an ontology that is managed by this manager.
 java.util.List<OWLOntologyChange> applyChanges(java.util.List<? extends OWLOntologyChange> changes)
          Applies a list of changes to some or all of the ontologies that are managed by this manager.
 void clearIRIMappers()
          Clears any installed IRI mappers
 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
 OWLOntology createOntology()
          Creates a new (empty) ontology that does not have an ontology IRI (and therefore does not have a version IRI).
 OWLOntology createOntology(IRI ontologyIRI)
          Creates a new (empty) ontology that has the specified ontology IRI (and no version IRI).
 OWLOntology createOntology(IRI ontologyIRI, IRI versionIRI)
           
 OWLOntology createOntology(IRI ontologyIRI, java.util.Set<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.
 OWLOntology createOntology(IRI ontologyIRI, java.util.Set<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(java.util.Set<OWLAxiom> axioms)
          Creates a new ontology that is initialised to contain specific axioms.
 OWLOntology createOntology(java.util.Set<OWLAxiom> axioms, IRI iri)
          Creates a new ontology that has the specified ontology IRI and is initialised to contain specific axioms.
protected  void fireBeginChanges(int size)
           
protected  void fireChangeApplied(OWLOntologyChange change)
           
protected  void fireEndChanges()
           
protected  void fireFinishedLoadingEvent(OWLOntologyID ontologyID, IRI documentIRI, boolean imported, OWLOntologyCreationException ex)
           
protected  void fireMissingImportEvent(MissingImportEvent evt)
           
protected  void fireStartedLoadingEvent(OWLOntologyID ontologyID, IRI documentIRI, boolean imported)
           
 java.util.Set<OWLOntology> getDirectImports(OWLOntology ontology)
          Gets the set 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.
 java.util.Set<OWLOntology> getImports(OWLOntology ontology)
          Gets the set of ontologies that are in the transitive closure of the directly imports relation.
 java.util.Set<OWLOntology> getImportsClosure(OWLOntology ontology)
          Gets the imports closure for the specified ontology.
protected  IRI getNextAutoGeneratedIRI()
           
 java.util.Set<OWLOntology> getOntologies()
          Gets all of the ontologies that are managed by this manager.
 java.util.Set<OWLOntology> getOntologies(OWLAxiom axiom)
          Gets the ontologies that are managed by this manager that contain the specified axiom.
 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.
 java.util.Collection<OWLOntologyFactory> getOntologyFactories()
          Gets the ontology factories that are registered with this manager.
 OWLOntologyFormat getOntologyFormat(OWLOntology ontology)
          Gets the ontology format for the specified ontology.
 OWLDataFactory getOWLDataFactory()
          Gets a data factory which can be used to create OWL API objects such as classes, properties, individuals, axioms etc.
 OWLOntologyManagerProperties getProperties()
           
 java.util.List<OWLOntology> getSortedImportsClosure(OWLOntology ontology)
          Gets the topologically ordered imports closure.
 java.util.Set<OWLOntology> getVersions(IRI ontology)
          Gets the versions (if any) of the ontology that have the specified IRI
 boolean isSilentMissingImportsHandling()
          Determines if silent missing imports handling is enabled.
 OWLOntology loadOntology(IRI ontologyIRI)
          Loads an ontology that is assumed to have the specified ontologyIRI as its IRI or version IRI.
protected  OWLOntology loadOntology(IRI ontologyIRI, OWLOntologyDocumentSource documentSource)
          This is the method that all the other load method delegate to.
 OWLOntology loadOntologyFromOntologyDocument(java.io.File file)
          Loads an ontology from an ontology document contained in a local file.
 OWLOntology loadOntologyFromOntologyDocument(java.io.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.
 void makeLoadImportRequest(OWLImportsDeclaration declaration)
          Requests that the manager loads an imported ontology that is described by an imports statement.
 void ontologyCreated(OWLOntology ontology)
          The factory calls this method as soon as it has created an ontology.
 java.util.List<OWLOntologyChange> removeAxiom(OWLOntology ont, OWLAxiom axiom)
          A convenience method that removes a single axiom from an ontology.
 java.util.List<OWLOntologyChange> removeAxioms(OWLOntology ont, java.util.Set<? extends OWLAxiom> axioms)
          A convenience method that removes a set of axioms from an ontology.
 void removeImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener)
           
 void removeIRIMapper(OWLOntologyIRIMapper mapper)
          Removes a mapper from this manager.
 void removeMissingImportListener(MissingImportListener listener)
          Removes a previously added missing import listener.
 void removeOntology(OWLOntology ontology)
          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 removeOntologyFactory(OWLOntologyFactory factory)
          Removes a previously added factory.
 void removeOntologyLoaderListener(OWLOntologyLoaderListener listener)
          Removes a previously added ontology loaded listener.
 void removeOntologyStorer(OWLOntologyStorer storer)
          Removes a previously added storer
 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, java.io.OutputStream outputStream)
          Saves the specified ontology, to the specified output stream
 void saveOntology(OWLOntology ontology, OWLOntologyDocumentTarget documentTarget)
          Saves the specified ontology to the specified OWLOntologyDocumentTarget.
 void saveOntology(OWLOntology ontology, OWLOntologyFormat ontologyFormat)
          Saves the specified ontology in the specified ontology format to its document URI.
 void saveOntology(OWLOntology ontology, OWLOntologyFormat ontologyFormat, IRI documentIRI)
          Saves the specified ontology to the specified document IRI in the specified ontology format.
 void saveOntology(OWLOntology ontology, OWLOntologyFormat ontologyFormat, java.io.OutputStream outputStream)
          Saves the specified ontology to the specified output stream in the specified ontology format.
 void saveOntology(OWLOntology ontology, OWLOntologyFormat ontologyFormat, OWLOntologyDocumentTarget documentTarget)
          Saves the specified ontology to the specified output target in the specified ontology format.
 void setDefaultChangeBroadcastStrategy(OWLOntologyChangeBroadcastStrategy strategy)
          Sets the default strategy that is used to broadcast ontology changes.
 void setOntologyDocumentIRI(OWLOntology ontology, IRI documentIRI)
          Overrides the current document IRI for a given ontology.
 void setOntologyFormat(OWLOntology ontology, OWLOntologyFormat format)
          Sets the format of an ontology
 void setSilentMissingImportsHandling(boolean b)
          The default behaviour when an import cannot be loaded is to throw an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OWLOntologyManagerImpl

public OWLOntologyManagerImpl(OWLDataFactory dataFactory)
Method Detail

getProperties

public OWLOntologyManagerProperties getProperties()

getOWLDataFactory

public OWLDataFactory getOWLDataFactory()
Description copied from interface: OWLOntologyManager
Gets a data factory which can be used to create OWL API objects such as classes, properties, individuals, axioms etc.

Specified by:
getOWLDataFactory in interface OWLOntologyManager
Returns:
A reference to a data factory for creating OWL API objects.

getOntologies

public java.util.Set<OWLOntology> getOntologies()
Description copied from interface: OWLOntologyManager
Gets all of the ontologies that are managed by this manager.

Specified by:
getOntologies in interface OWLOntologyManager
Specified by:
getOntologies in interface OWLOntologySetProvider
Returns:
The set of ontologies managed by this manager.

getOntologies

public java.util.Set<OWLOntology> getOntologies(OWLAxiom axiom)
Description copied from interface: OWLOntologyManager
Gets the ontologies that are managed by this manager that contain the specified axiom.

Specified by:
getOntologies in interface OWLOntologyManager
Parameters:
axiom - The axioms
Returns:
The set of ontologies such that for each ontology, O the specified axiom is contained in O.

contains

public boolean contains(OWLOntology ontology)

contains

public boolean contains(IRI ontologyIRI)
Description copied from interface: OWLOntologyManager
Determines if there is an ontology with the specified IRI, and no version IRI, that is managed by this manager

Specified by:
contains in interface OWLOntologyManager
Parameters:
ontologyIRI - The IRI of the ontology to test for (the version IRI is assumed to be null)
Returns:
true if there is an ontology with the specified IRI, and no version IRI, that is managed by this manager, otherwise false.

contains

public boolean contains(OWLOntologyID id)
Description copied from interface: OWLOntologyManager
Determines if there is an ontology with the specified id that is managed by this manager

Specified by:
contains in interface OWLOntologyManager
Parameters:
id - The id of the ontology to test for
Returns:
true if there is an ontology with the specified id that is managed by this manager, otherwise false.

getOntology

public OWLOntology getOntology(IRI ontologyIRI)
Gets a previously loaded/created ontology that has the specified ontology IRI and no version IRI.

Specified by:
getOntology in interface OWLOntologyManager
Parameters:
ontologyIRI - The IRI of the ontology to be retrieved.
Returns:
The ontology that has the specified IRI and no version IRI, or null if this manager does not manage an ontology with the specified IRI and no version IRI.

getOntology

public OWLOntology getOntology(OWLOntologyID ontologyID)
Gets a previously loaded/created ontology that has the specified ontology ID

Specified by:
getOntology in interface OWLOntologyManager
Parameters:
ontologyID - The ID of the ontology to retrieve
Returns:
The ontology that has the specified ID, or null if this manager does not manage an ontology with the specified ontology ID.

getVersions

public java.util.Set<OWLOntology> getVersions(IRI ontology)
Description copied from interface: OWLOntologyManager
Gets the versions (if any) of the ontology that have the specified IRI

Specified by:
getVersions in interface OWLOntologyManager
Parameters:
ontology - The ontology IRI
Returns:
The set of ontologies that have the specified ontology IRI.

getImportedOntology

public OWLOntology getImportedOntology(OWLImportsDeclaration declaration)
Given an imports declaration, obtains the ontology that this import has been resolved to.

Specified by:
getImportedOntology in interface OWLOntologyManager
Parameters:
declaration - The declaration that points to the imported ontology.
Returns:
The ontology that the imports declaration resolves to, or 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

getDirectImports

public java.util.Set<OWLOntology> getDirectImports(OWLOntology ontology)
                                            throws UnknownOWLOntologyException
Gets the set 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

Specified by:
getDirectImports in interface OWLOntologyManager
Parameters:
ontology - The ontology whose direct imports are to be retrieved.
Returns:
The set of loaded ontologies that the specified ontology is related to via the directlyImports relation.
Throws:
UnknownOWLOntologyException - if there isn't an ontology in this manager which has the specified IRI.

getImports

public java.util.Set<OWLOntology> getImports(OWLOntology ontology)
                                      throws UnknownOWLOntologyException
Gets the set of ontologies that are in the transitive closure of the directly imports relation.

Specified by:
getImports in interface OWLOntologyManager
Parameters:
ontology - The ontology whose imports are to be retrieved.
Returns:
A set of 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.
Throws:
UnknownOWLOntologyException - if there isn't an ontology in this manager which has the specified IRI.

getImportsClosure

public java.util.Set<OWLOntology> getImportsClosure(OWLOntology ontology)
Description copied from interface: OWLOntologyManager
Gets the imports closure for the specified ontology.

Specified by:
getImportsClosure in interface OWLOntologyManager
Parameters:
ontology - The ontology whose imports closure is to be retrieved.
Returns:
A 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.

getSortedImportsClosure

public java.util.List<OWLOntology> getSortedImportsClosure(OWLOntology ontology)
                                                    throws UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Gets the topologically ordered imports closure.

Specified by:
getSortedImportsClosure in interface OWLOntologyManager
Parameters:
ontology - The ontology whose imports closure is to be determined.
Returns:
A list that represents a topological ordering of the imports closure. The first element in the list will be the specified ontology. If the ontology is not managed by this manager then an empty list will be returned.
Throws:
UnknownOWLOntologyException

applyChanges

public java.util.List<OWLOntologyChange> applyChanges(java.util.List<? extends OWLOntologyChange> changes)
Description copied from interface: OWLOntologyManager
Applies a list of changes to some or all of the ontologies that are managed by this manager. The changes will be applied to the appropriate ontologies.

Specified by:
applyChanges in interface OWLOntologyManager
Parameters:
changes - The changes to be applied.
Returns:
The changes that were actually applied.

addAxiom

public java.util.List<OWLOntologyChange> addAxiom(OWLOntology ont,
                                                  OWLAxiom axiom)
Description copied from interface: OWLOntologyManager
A convenience method that adds a single axiom to an ontology. The appropriate AddAxiom change object is automatically generated.

Specified by:
addAxiom in interface OWLOntologyManager
Parameters:
ont - The ontology to add the axiom to.
axiom - The axiom to be added
Returns:
A list of ontology changes that represent the changes that actually took place.

addAxioms

public java.util.List<OWLOntologyChange> addAxioms(OWLOntology ont,
                                                   java.util.Set<? extends OWLAxiom> axioms)
Description copied from interface: OWLOntologyManager
A convenience method that adds a set of axioms to an ontology. The appropriate AddAxiom change objects are automatically generated.

Specified by:
addAxioms in interface OWLOntologyManager
Parameters:
ont - The ontology to which the axioms should be added.
axioms - The axioms to be added.
Returns:
A list of ontology changes that represent the changes which took place in order to add the axioms.

removeAxiom

public java.util.List<OWLOntologyChange> removeAxiom(OWLOntology ont,
                                                     OWLAxiom axiom)
Description copied from interface: OWLOntologyManager
A convenience method that removes a single axiom from an ontology. The appropriate RemoveAxiom change object is automatically generated.

Specified by:
removeAxiom in interface OWLOntologyManager
Parameters:
ont - The ontology to remove the axiom from.
axiom - The axiom to be removed
Returns:
A list of ontology changes that represent the changes that actually took place.

removeAxioms

public java.util.List<OWLOntologyChange> removeAxioms(OWLOntology ont,
                                                      java.util.Set<? extends OWLAxiom> axioms)
Description copied from interface: OWLOntologyManager
A convenience method that removes a set of axioms from an ontology. The appropriate RemoveAxiom change objects are automatically generated.

Specified by:
removeAxioms in interface OWLOntologyManager
Parameters:
ont - The ontology from which the axioms should be removed.
axioms - The axioms to be removed.
Returns:
A list of ontology changes that represent the changes which took place in order to remove the axioms.

applyChange

public java.util.List<OWLOntologyChange> applyChange(OWLOntologyChange change)
Description copied from interface: OWLOntologyManager
A convenience method that applies just one change to an ontology that is managed by this manager.

Specified by:
applyChange in interface OWLOntologyManager
Parameters:
change - The change to be applied
Returns:
The changes that resulted of the applied ontology change.

ontologyCreated

public void ontologyCreated(OWLOntology ontology)
Description copied from interface: OWLOntologyFactory.OWLOntologyCreationHandler
The factory calls this method as soon as it has created an ontology. If the factory is loading an ontology then the ontology will not have been populated with axioms at this stage.

Specified by:
ontologyCreated in interface OWLOntologyFactory.OWLOntologyCreationHandler
Parameters:
ontology - The newly created ontology.

setOntologyFormat

public void setOntologyFormat(OWLOntology ontology,
                              OWLOntologyFormat format)
Sets the format of an ontology

Specified by:
setOntologyFormat in interface OWLOntologyFactory.OWLOntologyCreationHandler
Specified by:
setOntologyFormat in interface OWLOntologyManager
Parameters:
ontology - The ontology
format - The format of the ontology

getOntologyFormat

public OWLOntologyFormat getOntologyFormat(OWLOntology ontology)
Description copied from interface: OWLOntologyManager
Gets the ontology format for the specified ontology.

Specified by:
getOntologyFormat in interface OWLOntologyManager
Parameters:
ontology - The ontology whose format it to be obtained.
Returns:
The format of the ontology.

createOntology

public OWLOntology createOntology()
                           throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Creates a new (empty) ontology that does not have an ontology IRI (and therefore does not have a version IRI). A document IRI will automatically be generated.

Specified by:
createOntology in interface OWLOntologyManager
Returns:
The newly created ontology
Throws:
OWLOntologyCreationException - if there was a problem creating the ontology

createOntology

public OWLOntology createOntology(IRI ontologyIRI)
                           throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Creates a new (empty) ontology that has the specified ontology IRI (and no version IRI).

The ontology document IRI of the created ontology will be set to the value returned by any installed 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.

Specified by:
createOntology in interface OWLOntologyManager
Parameters:
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.
Returns:
The newly created ontology, or if an ontology with the specified IRI already exists then this existing ontology will be returned.
Throws:
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.

createOntology

public OWLOntology createOntology(IRI ontologyIRI,
                                  IRI versionIRI)
                           throws OWLOntologyCreationException
Throws:
OWLOntologyCreationException

createOntology

public OWLOntology createOntology(OWLOntologyID ontologyID)
                           throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Creates a new (empty) ontology that has the specified ontology ID.

Specified by:
createOntology in interface OWLOntologyManager
Parameters:
ontologyID - The ID of the ontology to be created.

The ontology document IRI of the created ontology will be set to the value returned by any installed 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.
Returns:
The newly created ontology, or if an ontology with the specified IRI already exists then this existing ontology will be returned.
Throws:
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.

createOntology

public OWLOntology createOntology(IRI ontologyIRI,
                                  java.util.Set<OWLOntology> ontologies)
                           throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Creates a new ontology that has the specified ontology IRI and is initialised to contain the axioms that are contained in the specified ontologies. Note that the specified ontologies need not be managed by this manager.

The ontology document IRI of the created ontology will be set to the value returned by any installed 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.

Specified by:
createOntology in interface OWLOntologyManager
Parameters:
ontologyIRI - The IRI of the new ontology.
ontologies - The ontologies whose axioms should be copied into the new ontology
Returns:
An ontology that has the specified IRI and contains all of the axioms that are contained in the specified ontologies
Throws:
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 version IRI).
OWLOntologyDocumentAlreadyExistsException - if the specified ontologyIRI is mapped to a ontology document IRI for which there already exists a mapping in this manager.

createOntology

public OWLOntology createOntology(IRI ontologyIRI,
                                  java.util.Set<OWLOntology> ontologies,
                                  boolean copyLogicalAxiomsOnly)
                           throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Creates a new ontology that has the specified ontology IRI and is initialised to contain the axioms that are contained in the specified ontologies. Note that the specified ontologies need not be managed by this manager.

The ontology document IRI of the created ontology will be set to the value returned by any installed 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.

Specified by:
createOntology in interface OWLOntologyManager
Parameters:
ontologyIRI - The IRI of the new ontology.
ontologies - The ontologies whose axioms should be copied into the new ontology
copyLogicalAxiomsOnly - 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.
Returns:
An ontology that has the specified IRI and contains all of the axioms that are contained in the specified ontologies possibly minus all non-logical axioms
Throws:
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.

createOntology

public OWLOntology createOntology(java.util.Set<OWLAxiom> axioms,
                                  IRI iri)
                           throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Creates a new ontology that has the specified ontology IRI and is initialised to contain specific axioms.

Specified by:
createOntology in interface OWLOntologyManager
Parameters:
axioms - The axioms that should be copied into the new ontology
iri - The IRI of the new ontology.

The ontology document IRI of the created ontology will be set to the value returned by any installed 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.
Returns:
An ontology that has the specified IRI and contains all of the specified axioms
Throws:
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.

createOntology

public OWLOntology createOntology(java.util.Set<OWLAxiom> axioms)
                           throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Creates a new ontology that is initialised to contain specific axioms. The ontology will not have an IRI. The document IRI of the created ontology will be auto-generated.

Specified by:
createOntology in interface OWLOntologyManager
Parameters:
axioms - The axioms that should be copied into the new ontology
Returns:
An ontology without an IRI that contains all of the specified axioms
Throws:
OWLOntologyCreationException - if there was a problem creating the new ontology.

getNextAutoGeneratedIRI

protected IRI getNextAutoGeneratedIRI()

loadOntology

public OWLOntology loadOntology(IRI ontologyIRI)
                         throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Loads an ontology that is assumed to have the specified ontologyIRI as its IRI or version IRI.

The ontology IRI will be mapped to an ontology document IRI. The mapping will be determined using one of the loaded OWLOntologyIRIMapper objects. By default, if no custom OWLOntologyIRIMappers have been registered using the OWLOntologyManager.addIRIMapper(OWLOntologyIRIMapper) method, or no mapping can be found, the ontology document IRI is taken to be the specified ontology IRI.

Specified by:
loadOntology in interface OWLOntologyManager
Parameters:
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).
Returns:
The OWLOntology representation of the ontology that was loaded.
Throws:
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 silent missing imports handling is set to true 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.

loadOntologyFromOntologyDocument

public OWLOntology loadOntologyFromOntologyDocument(IRI documentIRI)
                                             throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Loads an ontology from an ontology document specified by an IRI. In contrast the the OWLOntologyManager.loadOntology(IRI) method, no mapping is performed on the specified IRI.

Specified by:
loadOntologyFromOntologyDocument in interface OWLOntologyManager
Parameters:
documentIRI - The ontology document IRI where the ontology will be loaded from.
Returns:
The ontology that was loaded.
Throws:
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 silent missing imports handling is set to true 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.

loadOntologyFromOntologyDocument

public OWLOntology loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource)
                                             throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
A convenience method that load an ontology from an input source.

Specified by:
loadOntologyFromOntologyDocument in interface OWLOntologyManager
Parameters:
documentSource - The input source that describes where the ontology should be loaded from.
Returns:
The ontology that was loaded.
Throws:
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 silent missing imports handling is set to true 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.

loadOntologyFromOntologyDocument

public OWLOntology loadOntologyFromOntologyDocument(java.io.File file)
                                             throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Loads an ontology from an ontology document contained in a local file. The loaded ontology will be assigned a document IRI that corresponds to the file IRI.

Specified by:
loadOntologyFromOntologyDocument in interface OWLOntologyManager
Parameters:
file - The file that contains a representation of an ontology
Returns:
The ontology that was parsed from the file.
Throws:
OWLOntologyCreationException - 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 silent missing imports handling is set to true 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.

loadOntologyFromOntologyDocument

public OWLOntology loadOntologyFromOntologyDocument(java.io.InputStream inputStream)
                                             throws OWLOntologyCreationException
Description copied from interface: OWLOntologyManager
Loads an ontology from an ontology document obtained from an input stream. The loaded ontology will be assigned an auto-generated document IRI with "inputstream" as its scheme.

Specified by:
loadOntologyFromOntologyDocument in interface OWLOntologyManager
Parameters:
inputStream - The input stream that can be used to obtain a representation of an ontology
Returns:
The ontology that was parsed from the input stream.
Throws:
OWLOntologyCreationException - 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 silent missing imports handling is set to true 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.

loadOntology

protected OWLOntology loadOntology(IRI ontologyIRI,
                                   OWLOntologyDocumentSource documentSource)
                            throws OWLOntologyCreationException
This is the method that all the other load method delegate to.

Parameters:
ontologyIRI - The URI of the ontology to be loaded. This is only used to report to listeners and may be null
documentSource - The input source that specifies where the ontology should be loaded from.
Returns:
The ontology that was loaded.
Throws:
OWLOntologyCreationException - If the ontology could not be loaded.

removeOntology

public void removeOntology(OWLOntology ontology)
Description copied from interface: OWLOntologyManager
Attempts to remove an ontology. The ontology which is identified by the specified IRI is removed regardless of whether it is referenced by other ontologies via imports statements.

Specified by:
removeOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be removed. If this manager does not manage the ontology then nothing happens.

getOntologyDocumentIRI

public IRI getOntologyDocumentIRI(OWLOntology ontology)
                           throws UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Gets the document IRI for a given ontology. This will either be the document IRI from where the ontology was obtained from during loading, or the document IRI which was specified (via a mapper) when the (empty) ontology was created. Note that this may not correspond to the first document IRI found in the list of mappings from ontology IRI to document IRI. The reason for this is that it might not have been possible to load the ontology from the first document IRI found in the mapping table.

Specified by:
getOntologyDocumentIRI in interface OWLOntologyManager
Parameters:
ontology - The ontology whose document IRI is to be obtained.
Returns:
The document IRI of the ontology or null.
Throws:
UnknownOWLOntologyException - If the specified ontology is not managed by this manager.

setOntologyDocumentIRI

public void setOntologyDocumentIRI(OWLOntology ontology,
                                   IRI documentIRI)
                            throws UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Overrides the current document IRI for a given ontology. This method does not alter the IRI mappers which are installed, but alters the actual document IRI of an ontology that has already been loaded.

Specified by:
setOntologyDocumentIRI in interface OWLOntologyManager
Parameters:
ontology - The ontology that has already been loaded.
documentIRI - The new ontology document IRI
Throws:
UnknownOWLOntologyException - If the specified ontology is not managed by this manager.

saveOntology

public void saveOntology(OWLOntology ontology)
                  throws OWLOntologyStorageException,
                         UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Saves the specified ontology. The ontology will be saved to the location that it was loaded from, or if it was created programmatically, it will be saved to the location specified by an ontology IRI mapper at creation time. The ontology will be saved in the same format which it was loaded from, or the default ontology format if the ontology was created programmatically.

Specified by:
saveOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be saved.
Throws:
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 ontology

saveOntology

public void saveOntology(OWLOntology ontology,
                         OWLOntologyFormat ontologyFormat)
                  throws OWLOntologyStorageException,
                         UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Saves the specified ontology in the specified ontology format to its document URI.

Specified by:
saveOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be saved.
ontologyFormat - The format in which the ontology should be saved.
Throws:
OWLOntologyStorageException - If the ontology cannot be saved.
UnknownOWLOntologyException - if the specified ontology is not managed by this manager

saveOntology

public void saveOntology(OWLOntology ontology,
                         IRI documentIRI)
                  throws OWLOntologyStorageException,
                         UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Saves the specified ontology, using the specified document IRI to determine where/how the ontology should be saved.

Specified by:
saveOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be saved.
documentIRI - The document IRI where the ontology should be saved to
Throws:
OWLOntologyStorageException - If the ontology cannot be saved
UnknownOWLOntologyException - if the specified ontology is not managed by this manager.

saveOntology

public void saveOntology(OWLOntology ontology,
                         OWLOntologyFormat ontologyFormat,
                         IRI documentIRI)
                  throws OWLOntologyStorageException,
                         UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Saves the specified ontology to the specified document IRI in the specified ontology format.

Specified by:
saveOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be saved
ontologyFormat - The format in which to save the ontology
documentIRI - The document IRI where the ontology should be saved to
Throws:
OWLOntologyStorageException - If the ontology could not be saved.
UnknownOWLOntologyException - if the specified ontology is not managed by the manager.

saveOntology

public void saveOntology(OWLOntology ontology,
                         java.io.OutputStream outputStream)
                  throws OWLOntologyStorageException
Description copied from interface: OWLOntologyManager
Saves the specified ontology, to the specified output stream

Specified by:
saveOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be saved.
outputStream - The output stream where the ontology will be saved to
Throws:
OWLOntologyStorageException - If there was a problem saving this ontology to the specified output stream

saveOntology

public void saveOntology(OWLOntology ontology,
                         OWLOntologyFormat ontologyFormat,
                         java.io.OutputStream outputStream)
                  throws OWLOntologyStorageException
Description copied from interface: OWLOntologyManager
Saves the specified ontology to the specified output stream in the specified ontology format.

Specified by:
saveOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be saved
ontologyFormat - The format in which to save the ontology
outputStream - The output stream where the ontology will be saved to.
Throws:
OWLOntologyStorageException - If the ontology could not be saved.

saveOntology

public void saveOntology(OWLOntology ontology,
                         OWLOntologyDocumentTarget documentTarget)
                  throws OWLOntologyStorageException,
                         UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Saves the specified ontology to the specified OWLOntologyDocumentTarget.

Specified by:
saveOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be saved.
documentTarget - The output target where the ontology will be saved to.
Throws:
OWLOntologyStorageException - If the ontology could not be saved.
UnknownOWLOntologyException - if the specified ontology is not managed by this manager.

saveOntology

public void saveOntology(OWLOntology ontology,
                         OWLOntologyFormat ontologyFormat,
                         OWLOntologyDocumentTarget documentTarget)
                  throws OWLOntologyStorageException,
                         UnknownOWLOntologyException
Description copied from interface: OWLOntologyManager
Saves the specified ontology to the specified output target in the specified ontology format.

Specified by:
saveOntology in interface OWLOntologyManager
Parameters:
ontology - The ontology to be saved.
ontologyFormat - The output format in which to save the ontology
documentTarget - The output target where the ontology will be saved to
Throws:
OWLOntologyStorageException - If the ontology could not be saved.
UnknownOWLOntologyException - If the specified ontology is not managed by this manager.

addOntologyStorer

public void addOntologyStorer(OWLOntologyStorer storer)
Description copied from interface: OWLOntologyManager
Add an ontology storer.

Specified by:
addOntologyStorer in interface OWLOntologyManager
Parameters:
storer - The storer to be added

removeOntologyStorer

public void removeOntologyStorer(OWLOntologyStorer storer)
Description copied from interface: OWLOntologyManager
Removes a previously added storer

Specified by:
removeOntologyStorer in interface OWLOntologyManager
Parameters:
storer - The storer to be removed

addIRIMapper

public void addIRIMapper(OWLOntologyIRIMapper mapper)
Description copied from interface: OWLOntologyManager
Adds a mapper to this manager. The mapper is used to obtain ontology document IRIs for ontology IRIs. The mapper will be added so that it is given the highest priority (i.e. it will be tried first).

Specified by:
addIRIMapper in interface OWLOntologyManager
Parameters:
mapper - The mapper to be added.

clearIRIMappers

public void clearIRIMappers()
Description copied from interface: OWLOntologyManager
Clears any installed IRI mappers

Specified by:
clearIRIMappers in interface OWLOntologyManager

removeIRIMapper

public void removeIRIMapper(OWLOntologyIRIMapper mapper)
Description copied from interface: OWLOntologyManager
Removes a mapper from this manager.

Specified by:
removeIRIMapper in interface OWLOntologyManager
Parameters:
mapper - The mapper to be removed. If this manager does not managed the specified mapper then nothing will happen.

addOntologyFactory

public void addOntologyFactory(OWLOntologyFactory factory)
Description copied from interface: OWLOntologyManager
Adds an ontology factory that is capable of creating an ontology given a particular document IRI.

Specified by:
addOntologyFactory in interface OWLOntologyManager
Parameters:
factory - The factory to be added.

removeOntologyFactory

public void removeOntologyFactory(OWLOntologyFactory factory)
Description copied from interface: OWLOntologyManager
Removes a previously added factory.

Specified by:
removeOntologyFactory in interface OWLOntologyManager
Parameters:
factory - The factory to be removed.

getOntologyFactories

public java.util.Collection<OWLOntologyFactory> getOntologyFactories()
Gets the ontology factories that are registered with this manager.

Specified by:
getOntologyFactories in interface OWLOntologyManager
Returns:
A collection of ontology factories.

addOntologyChangeListener

public void addOntologyChangeListener(OWLOntologyChangeListener listener)
Description copied from interface: OWLOntologyManager
Adds an ontology change listener, which listens to all changes for all ontologies. To customise the changes/ontologies that are listened to, the addOntologyChangeListener method which takes a broadcast strategy as an argument should be used.

Specified by:
addOntologyChangeListener in interface OWLOntologyManager
Parameters:
listener - The listener to be added.

setDefaultChangeBroadcastStrategy

public void setDefaultChangeBroadcastStrategy(OWLOntologyChangeBroadcastStrategy strategy)
Description copied from interface: OWLOntologyManager
Sets the default strategy that is used to broadcast ontology changes.

Specified by:
setDefaultChangeBroadcastStrategy in interface OWLOntologyManager
Parameters:
strategy - The strategy to be used for broadcasting changes. This strategy will override any previously set broadcast strategy. The strategy should not be null.
See Also:
org.semanticweb.owlapi.model.DefaultChangeBroadcastStrategy}, org.semanticweb.owlapi.model.EDTChangeBroadcastStrategy}

addOntologyChangeListener

public void addOntologyChangeListener(OWLOntologyChangeListener listener,
                                      OWLOntologyChangeBroadcastStrategy strategy)
Description copied from interface: OWLOntologyManager
Adds an ontology change listener, which listens to ontology changes. An ontology change broadcast strategy must be specified, which determines the changes that are broadcast to the listener.

Specified by:
addOntologyChangeListener in interface OWLOntologyManager
Parameters:
listener - The listener to be added.
strategy - The strategy that should be used for broadcasting changes to the listener.

addImpendingOntologyChangeListener

public void addImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener)
Specified by:
addImpendingOntologyChangeListener in interface OWLOntologyManager

removeImpendingOntologyChangeListener

public void removeImpendingOntologyChangeListener(ImpendingOWLOntologyChangeListener listener)
Specified by:
removeImpendingOntologyChangeListener in interface OWLOntologyManager

removeOntologyChangeListener

public void removeOntologyChangeListener(OWLOntologyChangeListener listener)
Description copied from interface: OWLOntologyManager
Removes a previously added listener.

Specified by:
removeOntologyChangeListener in interface OWLOntologyManager
Parameters:
listener - The listener to be removed.

addOntologyChangesVetoedListener

public void addOntologyChangesVetoedListener(OWLOntologyChangesVetoedListener listener)
Specified by:
addOntologyChangesVetoedListener in interface OWLOntologyManager

removeOntologyChangesVetoedListener

public void removeOntologyChangesVetoedListener(OWLOntologyChangesVetoedListener listener)
Specified by:
removeOntologyChangesVetoedListener in interface OWLOntologyManager

makeLoadImportRequest

public void makeLoadImportRequest(OWLImportsDeclaration declaration)
                           throws UnloadableImportException
Description copied from interface: OWLOntologyManager
Requests that the manager loads an imported ontology that is described by an imports statement. This method is generally used by parsers and other kinds of loaders. For simply loading an ontology, use the loadOntologyXXX methods.

Specified by:
makeLoadImportRequest in interface OWLOntologyManager
Parameters:
declaration - The declaration that describes the import to be loaded.
Throws:
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.

setSilentMissingImportsHandling

public void setSilentMissingImportsHandling(boolean b)
Description copied from interface: OWLOntologyManager
The default behaviour when an import cannot be loaded is to throw an exception. This completely stops the loading process. If it is desired that loading continues then this option can be set with this method.

Specified by:
setSilentMissingImportsHandling in interface OWLOntologyManager
Parameters:
b - true if loading should continue when an imported ontology cannot be loaded, other wise false. The default value is false.

isSilentMissingImportsHandling

public boolean isSilentMissingImportsHandling()
Description copied from interface: OWLOntologyManager
Determines if silent missing imports handling is enabled.

Specified by:
isSilentMissingImportsHandling in interface OWLOntologyManager
Returns:
true if silent missing imports handler is enabled, otherwise false.

addMissingImportListener

public void addMissingImportListener(MissingImportListener listener)
Description copied from interface: OWLOntologyManager
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.

Specified by:
addMissingImportListener in interface OWLOntologyManager
Parameters:
listener - The listener to be added.

removeMissingImportListener

public void removeMissingImportListener(MissingImportListener listener)
Description copied from interface: OWLOntologyManager
Removes a previously added missing import listener.

Specified by:
removeMissingImportListener in interface OWLOntologyManager
Parameters:
listener - The listener to be removed.

fireMissingImportEvent

protected void fireMissingImportEvent(MissingImportEvent evt)

addOntologyLoaderListener

public void addOntologyLoaderListener(OWLOntologyLoaderListener listener)
Description copied from interface: OWLOntologyManager
Adds an ontology loaded listener to this manager.

Specified by:
addOntologyLoaderListener in interface OWLOntologyManager
Parameters:
listener - The listener to be added.

removeOntologyLoaderListener

public void removeOntologyLoaderListener(OWLOntologyLoaderListener listener)
Description copied from interface: OWLOntologyManager
Removes a previously added ontology loaded listener.

Specified by:
removeOntologyLoaderListener in interface OWLOntologyManager
Parameters:
listener - The listener to be removed.

fireStartedLoadingEvent

protected void fireStartedLoadingEvent(OWLOntologyID ontologyID,
                                       IRI documentIRI,
                                       boolean imported)

fireFinishedLoadingEvent

protected void fireFinishedLoadingEvent(OWLOntologyID ontologyID,
                                        IRI documentIRI,
                                        boolean imported,
                                        OWLOntologyCreationException ex)

addOntologyChangeProgessListener

public void addOntologyChangeProgessListener(OWLOntologyChangeProgressListener listener)
Description copied from interface: OWLOntologyManager
Adds an ontology change progress listener.

Specified by:
addOntologyChangeProgessListener in interface OWLOntologyManager
Parameters:
listener - The listener to be added.

removeOntologyChangeProgessListener

public void removeOntologyChangeProgessListener(OWLOntologyChangeProgressListener listener)
Description copied from interface: OWLOntologyManager
Removes a previously added ontology change listener.

Specified by:
removeOntologyChangeProgessListener in interface OWLOntologyManager
Parameters:
listener - The listener to be removed.

fireBeginChanges

protected void fireBeginChanges(int size)

fireEndChanges

protected void fireEndChanges()

fireChangeApplied

protected void fireChangeApplied(OWLOntologyChange change)