org.semanticweb.owl.inference
Class OWLReasonerManagerImpl

java.lang.Object
  extended by org.semanticweb.owl.inference.OWLReasonerManagerImpl
All Implemented Interfaces:
OWLReasonerManager

public class OWLReasonerManagerImpl
extends java.lang.Object
implements OWLReasonerManager

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 02-Jun-2008


Constructor Summary
OWLReasonerManagerImpl(OWLOntologyManager man)
           
 
Method Summary
 void addListener(OWLReasonerManagerListener listener)
          Adds a listener to this reasoner manager.
 OWLReasoner createReasoner()
          Creates a new instance of a reasoner using the current reasoner factory.
protected  void fireReasonerFactoryAdded()
           
protected  void fireReasonerFactoryChanged()
           
protected  void fireReasonerFactoryRemoved()
           
 OWLReasoner getReasoner()
          Gets the currently cached reasoner.
 OWLReasonerFactory getReasonerFactory()
          Gets the current reasoner factory.
 java.util.List<OWLReasonerFactory> getRegisteredReasonerFactories()
          Gets a list of currently registered reasoner factories.
 void registerReasonerFactory(OWLReasonerFactory factory)
          Registers (adds) a new reasoner factory.
 void removeListener(OWLReasonerManagerListener listener)
          Removes a previously added listener to this manager.
 void setReasonerFactory(OWLReasonerFactory factory)
          Sets the current reasoner factory.
 void unregisterReasonerFactory(OWLReasonerFactory factory)
          Unregisters (removes) a previously registerd reasoner factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OWLReasonerManagerImpl

public OWLReasonerManagerImpl(OWLOntologyManager man)
Method Detail

addListener

public void addListener(OWLReasonerManagerListener listener)
Description copied from interface: OWLReasonerManager
Adds a listener to this reasoner manager.

Specified by:
addListener in interface OWLReasonerManager
Parameters:
listener - The listener to be added.

removeListener

public void removeListener(OWLReasonerManagerListener listener)
Description copied from interface: OWLReasonerManager
Removes a previously added listener to this manager.

Specified by:
removeListener in interface OWLReasonerManager
Parameters:
listener - The listener to be removed.

getRegisteredReasonerFactories

public java.util.List<OWLReasonerFactory> getRegisteredReasonerFactories()
Description copied from interface: OWLReasonerManager
Gets a list of currently registered reasoner factories.

Specified by:
getRegisteredReasonerFactories in interface OWLReasonerManager
Returns:
A list of reasoner factories.

registerReasonerFactory

public void registerReasonerFactory(OWLReasonerFactory factory)
Description copied from interface: OWLReasonerManager
Registers (adds) a new reasoner factory. An event will be fired to indicate that a reasoner factory has be registered.

Specified by:
registerReasonerFactory in interface OWLReasonerManager
Parameters:
factory - The factory to be registered.

unregisterReasonerFactory

public void unregisterReasonerFactory(OWLReasonerFactory factory)
Description copied from interface: OWLReasonerManager
Unregisters (removes) a previously registerd reasoner factory. An event will be fired to indicated that a reasoner factory has been unregistered.

Specified by:
unregisterReasonerFactory in interface OWLReasonerManager
Parameters:
factory - The factory to be unregisterd.

setReasonerFactory

public void setReasonerFactory(OWLReasonerFactory factory)
                        throws OWLReasonerException
Description copied from interface: OWLReasonerManager
Sets the current reasoner factory. This will result in an event being fired to indicate the reasoner factory has changed. The currently cached reasoner will be disposed of an a new reasoner that is instantiated by the specified reasoner factory will be cached as the current reasoner.

Specified by:
setReasonerFactory in interface OWLReasonerManager
Parameters:
factory - The reasoner factory that should be set as the current factory. Note that a runtime exception will be thrown if the specified reasoner factory is not a registered reasoner factory.
Throws:
OWLReasonerException - if there was a problem in disposing of the currently cached reasoner.

getReasonerFactory

public OWLReasonerFactory getReasonerFactory()
Description copied from interface: OWLReasonerManager
Gets the current reasoner factory.

Specified by:
getReasonerFactory in interface OWLReasonerManager
Returns:
The current reasoner factory which will not be null

getReasoner

public OWLReasoner getReasoner()
Description copied from interface: OWLReasonerManager
Gets the currently cached reasoner. If the reasoner factory has changed since this method call then a new instance of a reasoner will be created and returned.

Specified by:
getReasoner in interface OWLReasonerManager
Returns:
The currently cached reasoner that was created (first) from the current reasoner factory. This will not be null.

createReasoner

public OWLReasoner createReasoner()
Description copied from interface: OWLReasonerManager
Creates a new instance of a reasoner using the current reasoner factory.

Specified by:
createReasoner in interface OWLReasonerManager
Returns:
A new instance of a reasoner created with the current reasoner factory.

fireReasonerFactoryAdded

protected void fireReasonerFactoryAdded()

fireReasonerFactoryRemoved

protected void fireReasonerFactoryRemoved()

fireReasonerFactoryChanged

protected void fireReasonerFactoryChanged()