JTP API Documentation

jtp.gmp
Class ClauseOrientationKB

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextChildSupport
        |
        +--jtp.util.PropertyImporter
              |
              +--jtp.gmp.ClauseOrientationKB
All Implemented Interfaces:
BeanContextChild, BeanContextServiceRevokedListener, BeanContextServicesListener, EventListener, KnowledgeStore, Reasoner, Serializable

public class ClauseOrientationKB
extends PropertyImporter
implements Reasoner, KnowledgeStore, Serializable

A general-purpose telling reasoner and knowledge store for Clauses.

See Also:
Clause, ClauseOrientation, Serialized Form

Field Summary
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
Constructor Summary
ClauseOrientationKB()
           
 
Method Summary
 boolean acceptable(Object o)
          Returns true if o is an unasserted DirectAssertion with a goal that is an instance of Clause.
 Reasoner getAskingReasoner()
          Returns a ModusPonensReasoner that uses this as a knowledge store.
 Reasoner getTellingReasoner()
          Returns a telling reasoner for this knowledge store.
 UndoManager getUndoManager()
           
 ReasoningStepIterator process(Object o)
          Adds ClauseOrientations to knowledge store corresponding to all contrapositives of Clause that is the goal of o.
 void setUndoManager(UndoManager undo)
           
 String toString()
           
 
Methods inherited from class jtp.util.PropertyImporter
getImportedProperties, initializeBeanContextResources, setImportedProperties
 
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClauseOrientationKB

public ClauseOrientationKB()
Method Detail

getUndoManager

public UndoManager getUndoManager()

setUndoManager

public void setUndoManager(UndoManager undo)

acceptable

public boolean acceptable(Object o)
Returns true if o is an unasserted DirectAssertion with a goal that is an instance of Clause. Returns false otherwise.

Specified by:
acceptable in interface Reasoner
Returns:
true if the goal is suitable for this reasoner, false otherwise.

process

public ReasoningStepIterator process(Object o)
                              throws ReasoningException
Adds ClauseOrientations to knowledge store corresponding to all contrapositives of Clause that is the goal of o.

Specified by:
process in interface Reasoner
Parameters:
o - the DirectAssertion deemed acceptable(java.lang.Object)
Returns:
ArrayReasoningStepIterator.empty
ReasoningException

toString

public String toString()
Overrides:
toString in class Object

getAskingReasoner

public Reasoner getAskingReasoner()
Returns a ModusPonensReasoner that uses this as a knowledge store. The returned reasoner can be added to an asking dispatcher to implement Generalized Modus Ponens reasoning functionality with the clauses in this KB.

Specified by:
getAskingReasoner in interface KnowledgeStore

getTellingReasoner

public Reasoner getTellingReasoner()
Returns a telling reasoner for this knowledge store. ClauseOrientationKB is both a telling reasoner and a knowledge store, so this is actually returned.

The returned reasoner can/should be added to a telling dispatcher.

Specified by:
getTellingReasoner in interface KnowledgeStore

JTP API Documentation