|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjess.Pattern
A Pattern represents a single conditional element on a rule LHS. A Pattern consists mainly of a two-dimensional array of Test1 structures. Each Test1 contains information about a specific characteristic of a slot.
Most users will not use this class directly, but you could use it to build rules directly in the Java language.
(C) 2005 Sandia National Laboratories
| Constructor Summary | |
Pattern(Deftemplate deft)
|
|
Pattern(java.lang.String name,
Rete engine)
|
|
| Method Summary | |
java.lang.Object |
accept(Visitor jv)
A proper accept() implementation should call one of the visitXXX() methods on the Visitor. |
void |
addDirectlyMatchedVariables(java.util.Set set)
|
void |
addTest(java.lang.String slotname,
Test1 aTest)
Add a test to this pattern |
void |
addToGroup(Group g)
|
jess.ConditionalElementX |
canonicalize()
|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object o)
|
void |
findVariableDefinitions(int startIndex,
java.util.Hashtable bindingsSoFar,
java.util.Hashtable newBindings)
|
java.lang.String |
getBackchainingTemplateName()
|
boolean |
getBackwardChaining()
|
java.lang.String |
getBoundName()
|
ConditionalElement |
getConditionalElement(int i)
|
jess.ConditionalElementX |
getConditionalElementX(int i)
|
Deftemplate |
getDeftemplate()
|
boolean |
getExplicit()
|
int |
getGroupSize()
|
boolean |
getLogical()
|
java.lang.String |
getName()
|
java.lang.String |
getNameWithoutBackchainingPrefix()
|
boolean |
getNegated()
Is this pattern a (not()) CE pattern, possibly nested? |
int |
getNMultifieldsInSlot(int slot)
|
int |
getNSlots()
|
int |
getNTests(int slot)
|
int |
getPatternCount()
|
int |
getSlotLength(int slot)
|
Test1 |
getTest(int slot,
int test)
|
boolean |
isBackwardChainingTrigger()
|
boolean |
isGroup()
|
boolean |
isMultifieldSubslot(int slot,
int subslot)
|
void |
recordTestedSlots(int factIndex,
java.util.Set testedSlots)
|
void |
renameUnmentionedVariables(java.util.Set set,
java.util.Map substitutes,
int size)
|
void |
setBoundName(java.lang.String s)
|
void |
setExplicit()
|
void |
setLogical()
|
void |
setNegated()
|
void |
setSlotLength(java.lang.String slotname,
int length)
Set the length of a multislot within a pattern |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Pattern(java.lang.String name,
Rete engine)
throws JessException
public Pattern(Deftemplate deft)
| Method Detail |
public java.lang.Object clone()
clone in interface jess.ConditionalElementX
public void setSlotLength(java.lang.String slotname,
int length)
throws JessException
JessException
public void addTest(java.lang.String slotname,
Test1 aTest)
throws JessException
JessException
public void addDirectlyMatchedVariables(java.util.Set set)
throws JessException
addDirectlyMatchedVariables in interface jess.ConditionalElementXJessException
public void renameUnmentionedVariables(java.util.Set set,
java.util.Map substitutes,
int size)
throws JessException
renameUnmentionedVariables in interface jess.ConditionalElementXJessException
public void recordTestedSlots(int factIndex,
java.util.Set testedSlots)
recordTestedSlots in interface jess.ConditionalElementX
public void findVariableDefinitions(int startIndex,
java.util.Hashtable bindingsSoFar,
java.util.Hashtable newBindings)
throws JessException
findVariableDefinitions in interface jess.ConditionalElementXJessExceptionpublic boolean getNegated()
getNegated in interface jess.ConditionalElementXpublic void setNegated()
setNegated in interface jess.ConditionalElementXpublic void setLogical()
setLogical in interface jess.ConditionalElementXpublic boolean getLogical()
getLogical in interface jess.ConditionalElementXpublic void setExplicit()
setExplicit in interface jess.ConditionalElementXpublic boolean getExplicit()
public boolean getBackwardChaining()
getBackwardChaining in interface jess.ConditionalElementXpublic java.lang.String getName()
getName in interface ConditionalElement
public void setBoundName(java.lang.String s)
throws JessException
setBoundName in interface jess.ConditionalElementXJessExceptionpublic java.lang.String getBoundName()
getBoundName in interface ConditionalElementpublic int getNSlots()
public int getNTests(int slot)
public int getSlotLength(int slot)
public int getNMultifieldsInSlot(int slot)
public boolean isMultifieldSubslot(int slot,
int subslot)
public Test1 getTest(int slot,
int test)
public Deftemplate getDeftemplate()
public void addToGroup(Group g)
throws JessException
addToGroup in interface jess.ConditionalElementXJessExceptionpublic jess.ConditionalElementX canonicalize()
canonicalize in interface jess.ConditionalElementXpublic java.lang.Object accept(Visitor jv)
Visitable
accept in interface Visitablejv - a visitor to invoke
public int getGroupSize()
getGroupSize in interface ConditionalElementpublic boolean isGroup()
isGroup in interface ConditionalElementpublic ConditionalElement getConditionalElement(int i)
getConditionalElement in interface ConditionalElementpublic int getPatternCount()
getPatternCount in interface jess.ConditionalElementXpublic jess.ConditionalElementX getConditionalElementX(int i)
getConditionalElementX in interface jess.ConditionalElementXpublic boolean equals(java.lang.Object o)
public boolean isBackwardChainingTrigger()
isBackwardChainingTrigger in interface jess.ConditionalElementXpublic java.lang.String getBackchainingTemplateName()
public java.lang.String getNameWithoutBackchainingPrefix()
public java.lang.String toString()
|
© 2006 Sandia Corporation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||