|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jtp.disp.RelationBasedDispatcher | +--jtp.disp.RelationBasedFCDispatcher
This dispatcher handles reasoners implementing RelationBasedFCReasoner
.
Constructor Summary | |
RelationBasedFCDispatcher()
|
Method Summary | |
boolean |
acceptable(Object o)
decides if the goal is suitable for being processed by this reasoner. |
boolean |
addReasoner(Reasoner r)
Add a reasoner directly to this dispatcher. |
Class |
getReasonerClass()
Returns the class of reasoners this dispatcher works with. |
ReasoningStepIterator |
process(Object o)
This method attempts to find proof for the goal. |
boolean |
removeReasoner(Reasoner r)
Removes a reasoner directly from this dispatcher. |
Methods inherited from class jtp.disp.RelationBasedDispatcher |
addRelationBasedReasoner, getReasoners, process, removeRelationBasedReasoner |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RelationBasedFCDispatcher()
Method Detail |
public ReasoningStepIterator process(Object o) throws ReasoningException
Reasoner
Example. A reasoner that performs unification of the goal with facts in a
knowledge base can return the following enumeration for the goal (parent joe ?x)
:
(parent joe fred)
with variable assignment
?x=fred,(parent joe mary)
with variable assignment
?x=mary.
o
- the goal: either a query or an assertion
ReasoningException
public boolean acceptable(Object o)
Reasoner
Example. Many reasoners only process literals with certain predicates and arity. These reasoners will use those criteria to determine acceptability, for example a reasoner dealing with equality could accept goals that are:
public boolean addReasoner(Reasoner r)
Dispatcher
DispatcherUtils.addToDispatcher(jtp.Reasoner, jtp.Dispatcher)
.
r
- the reasoner to add
public boolean removeReasoner(Reasoner r)
Dispatcher
DispatcherUtils.removeFromDispatcher(jtp.Reasoner, jtp.Dispatcher)
.
r
- the reasoner to remove
public Class getReasonerClass()
Dispatcher
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |