org.semanticweb.owl.inference
Interface OWLReasonerManager

All Known Implementing Classes:
OWLReasonerManagerImpl

public interface OWLReasonerManager

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

A convenience point for managing various reasoners (for use in applications etc.). The reasoner manager maintains a list of reasoner factories and a currently "selected" reasoner factory. It also maintains a cached copy of a reasoner that corresponds to a reasoner that has been instantiated by the current reasoner factory. The manager fires events if the current reasoner factory is changed.


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.
 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.
 

Method Detail

addListener

void addListener(OWLReasonerManagerListener listener)
Adds a listener to this reasoner manager.

Parameters:
listener - The listener to be added.

removeListener

void removeListener(OWLReasonerManagerListener listener)
Removes a previously added listener to this manager.

Parameters:
listener - The listener to be removed.

getRegisteredReasonerFactories

java.util.List<OWLReasonerFactory> getRegisteredReasonerFactories()
Gets a list of currently registered reasoner factories.

Returns:
A list of reasoner factories.

registerReasonerFactory

void registerReasonerFactory(OWLReasonerFactory factory)
Registers (adds) a new reasoner factory. An event will be fired to indicate that a reasoner factory has be registered.

Parameters:
factory - The factory to be registered.

unregisterReasonerFactory

void unregisterReasonerFactory(OWLReasonerFactory factory)
Unregisters (removes) a previously registerd reasoner factory. An event will be fired to indicated that a reasoner factory has been unregistered.

Parameters:
factory - The factory to be unregisterd.

setReasonerFactory

void setReasonerFactory(OWLReasonerFactory factory)
                        throws OWLReasonerException
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.

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

OWLReasonerFactory getReasonerFactory()
Gets the current reasoner factory.

Returns:
The current reasoner factory which will not be null

getReasoner

OWLReasoner getReasoner()
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.

Returns:
The currently cached reasoner that was created (first) from the current reasoner factory. This will not be null.

createReasoner

OWLReasoner createReasoner()
Creates a new instance of a reasoner using the current reasoner factory.

Returns:
A new instance of a reasoner created with the current reasoner factory.