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
Clause
s.
- See Also:
Clause
,
ClauseOrientation
,
Serialized Form
Methods inherited from class java.beans.beancontext.BeanContextChildSupport |
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext |
ClauseOrientationKB
public ClauseOrientationKB()
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
ClauseOrientation
s 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