|
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.LinkAsserter
Nested Class Summary | |
protected static class |
LinkAsserter.UndoInsert
Class of undoable edits that corresponds to adding a ValueLink to a ValueCollection's input links. |
protected static class |
LinkAsserter.UndoRemove
|
Field Summary | |
protected static boolean |
VERBOSE
|
Fields inherited from class java.beans.beancontext.BeanContextChildSupport |
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport |
Constructor Summary | |
LinkAsserter()
|
Method Summary | |
boolean |
acceptable(Object o)
decides if the goal is suitable for being processed by this reasoner. |
static boolean |
checkLinkRedundancy(ValueCollection source,
ValueCollection target,
int depth)
checks if there is a directed path in the value collection graph from source to target. |
FrameKB |
getFrameKB()
|
int |
getRedundancyCheckDepth()
returns the current value for the number of links that the asserter will follow in the graph to see if the source and target value collections are already connected. |
UndoManager |
getUndoManager()
|
static void |
insertLink(ValueLink vl)
inserts the specified link into the value collections' data structures, if there isn't already a link between these two collections. |
protected ValueLink |
prepareValueLink(ValueLinkCreationReasoningStep rs)
|
protected ValueLink |
prepareValueLink(ValueLinkCreationReasoningStep rs,
ReasoningStepCollector rsc)
|
ReasoningStepIterator |
process(Object o)
This method attempts to find proof for the goal. |
void |
processInsertion(ValueLink vl)
|
void |
processInsertion(ValueLink vl,
DefaultReasoningStepCollector rsc)
|
void |
processRemoval(ValueLink vl)
|
static ReasoningStepIterator |
propagateAssertedValue(ValueCollection vc,
Object value)
|
static ReasoningStepIterator |
propagateLinkResults(ValueLink vl)
|
static ReasoningStepIterator |
propagateResultsForTarget(ValueLink vl)
|
static void |
removeLink(ValueLink vl)
|
void |
setFrameKB(FrameKB f)
|
void |
setRedundancyCheckDepth(int v)
Set the value of redundancyCheckDepth. |
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 static boolean VERBOSE
Constructor Detail |
public LinkAsserter()
Method Detail |
public UndoManager getUndoManager()
public void setUndoManager(UndoManager undo)
public FrameKB getFrameKB()
public void setFrameKB(FrameKB f)
public int getRedundancyCheckDepth()
public void setRedundancyCheckDepth(int v)
v
- Value to assign to redundancyCheckDepth.getRedundancyCheckDepth()
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:
acceptable
in interface Reasoner
public ReasoningStepIterator process(Object o)
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.
process
in interface Reasoner
o
- the goal: either a query or an assertion
protected ValueLink prepareValueLink(ValueLinkCreationReasoningStep rs)
protected ValueLink prepareValueLink(ValueLinkCreationReasoningStep rs, ReasoningStepCollector rsc)
public static ReasoningStepIterator propagateAssertedValue(ValueCollection vc, Object value)
public static ReasoningStepIterator propagateLinkResults(ValueLink vl)
public static ReasoningStepIterator propagateResultsForTarget(ValueLink vl)
public static boolean checkLinkRedundancy(ValueCollection source, ValueCollection target, int depth)
source
- the start of the pathtarget
- the end of the pathdepth
- the maximal depth of the path to look forpublic static void insertLink(ValueLink vl)
vl
- the link to insert
true
if the state of the system has changed (i.e., link was actually inserted.)public void processInsertion(ValueLink vl)
public void processInsertion(ValueLink vl, DefaultReasoningStepCollector rsc)
public void processRemoval(ValueLink vl)
public static void removeLink(ValueLink vl)
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |