|
JTP API Documentation | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.beans.beancontext.BeanContextChildSupport
|
+--jtp.util.PropertyImporter
|
+--jtp.frame.listen.dl.IntersectionTypeReasoner
A telling reasoner that is activated when literals with the
relation daml:intersectionOf are told. Given a sentence
(daml:intersectionOf CLASS LIST), this reasoner
and its helper classes will figure out if any objects are
instances of all items of LIST. If there is any such object (or
such an object comes about later in the telling of assertions),
this listener or one of its helpers will infer that the object
is an instance of CLASS.
This reasoner operates largely by returning reasoning steps
that cause ValueCollectionListeners to be
installed.
| Field Summary | |
protected Symbol |
intersectionRelation
|
protected Symbol |
itemRelation
|
protected Symbol |
typeRelation
|
| Fields inherited from class java.beans.beancontext.BeanContextChildSupport |
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport |
| Fields inherited from interface jtp.disp.RelationBasedReasoner |
ANY_ARITY, BOTH, NEGATIVE, POSITIVE |
| Constructor Summary | |
IntersectionTypeReasoner(Symbol intersection,
Symbol type,
Symbol item)
|
|
| Method Summary | |
boolean |
acceptable(Object rs)
decides if the goal is suitable for being processed by this reasoner. |
protected ReasoningStep[] |
addIntersection(Object list,
Object className,
ReasoningStep intersectionProof)
Set up watching for instances of a new conjunctively defined class. |
int |
getArity()
returns the "arity" of literals that are appropriate for this reasoner. |
FrameKB |
getFrameKB()
|
protected Map |
getListItems(Object list)
Assumes that all of the items that are in the list have been asserted. |
int |
getPolarity()
returns the polarity of literals that are appropriate for this reasoner. |
Symbol |
getRelation()
returns the relation symbol of literals that are appropriate for this reasoner. |
protected ReasoningStep[] |
newInstanceOfClass(Object instance,
Object cl,
ReasoningStep proof)
Called when instance has been discovered to be an
instance of cl. |
ReasoningStepIterator |
process(Object o)
This method attempts to find proof for the goal. |
void |
setFrameKB(FrameKB fkb)
|
void |
setUndoManager(UndoManager undo)
|
| 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, toString, wait, wait, wait |
| Field Detail |
protected Symbol intersectionRelation
protected Symbol typeRelation
protected Symbol itemRelation
| Constructor Detail |
public IntersectionTypeReasoner(Symbol intersection,
Symbol type,
Symbol item)
| Method Detail |
public FrameKB getFrameKB()
public void setFrameKB(FrameKB fkb)
public void setUndoManager(UndoManager undo)
public Symbol getRelation()
RelationBasedReasoner
getRelation in interface RelationBasedReasonerpublic int getArity()
RelationBasedReasonerRelationBasedReasoner.ANY_ARITY for reasoners that are not limited to a certain arity.
getArity in interface RelationBasedReasonerpublic int getPolarity()
RelationBasedReasonerRelationBasedReasoner.POSITIVE - for literals that are not negated,RelationBasedReasoner.NEGATIVE - for literals that are negated,RelationBasedReasoner.BOTH - if the reasoner can handle literals of any polarity.
getPolarity in interface RelationBasedReasonerpublic boolean acceptable(Object rs)
ReasonerExample. 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:
acceptable in interface Reasonerpublic ReasoningStepIterator process(Object o)
ReasonerExample. 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.
process in interface Reasonero - the goal: either a query or an assertion
protected ReasoningStep[] addIntersection(Object list,
Object className,
ReasoningStep intersectionProof)
protected ReasoningStep[] newInstanceOfClass(Object instance,
Object cl,
ReasoningStep proof)
instance has been discovered to be an
instance of cl.
protected Map getListItems(Object list)
DAMLParser attempts to enforce
this. If users are not exclusively using the DAMLParser, they have
to be careful.
|
JTP API Documentation | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||