|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.rules.AbleRule
com.ibm.able.rules.AblePatternMatchRule
This class defines a pattern match rule which consists of a set of AbleSelectors (logically ANDed together) and one or more consequent action clauses.
AblePatternMatchEngine,
AblePatternMatchLiteEngine,
Serialized Form| Field Summary | |
|---|---|
protected boolean |
checkForPatternMatchEngine
If used with the Rete' net, keep the pointer to the patternMatch engine. |
protected java.util.HashSet |
myBindings
myBindings is a vector of vectors. |
protected java.util.Vector |
myConsequents
myConsequents is a list of consequent clauses (AbleConsequentClause objects). |
protected java.util.Vector |
myNetworkSelectors
myNetworkSelectors is a list of AbleSelectors objects used by the AblePatternMatchEngine (Rete' network). |
protected AblePatternMatchClause |
myPatternMatchClause
myPatternMatchClause is an object made from the list of AbleSelector objects. |
protected AblePatternMatchEngine |
myPatternMatchEngine
|
protected int |
myRuleNumber
|
protected java.util.Vector |
mySelectors
mySelectors is a list of AbleSelectors objects. |
protected com.ibm.able.rules.AblePatternMatchRuleTerminalNode |
myTerminalNode
If used with the Rete' net, point to terminal node |
protected static int |
RuleNumber
Number the rules to preserve creation order when firing |
| Fields inherited from class com.ibm.able.rules.AbleRule |
|---|
myBooleanTruth, myBreakpoint, myComment, myEnabled, myFinalFlag, myFiredCount, myFiredFlag, myId, myLabel, myLocation, myPreConditions, myPriority, myPrompt, myProperties, myRdRefs, myRuleBlock, myRuleSet, myTemplateFlag, myTemplateName, myTemplateValues, myWrRefs, PriorityDefault, RuleIdInitial |
| Constructor Summary | |
|---|---|
AblePatternMatchRule(java.lang.String theLabel,
AbleRd thePriority,
java.util.Vector theSelectors,
java.util.Vector theConsequents,
AbleRuleSet theRuleSet,
AbleRuleBlock theRuleBlock)
Create a new pattern match rule with the specified priority, selectors, and consequent clauses. |
|
| Method Summary | |
|---|---|
protected boolean |
addToConflictSet()
|
java.lang.String |
arlString()
Return a formal Able Rule Language (ARL) String. |
java.lang.String |
armlString()
Return a formal XML string. |
void |
createNetworkSelectors(AbleRuleSet theRuleSet)
Create a duplicate set of Selectors, with duplicate expressions as constraints and using duplicate selector variables. |
void |
createNetworkSelectors2(AbleRuleSet theRuleSet)
Create a duplicate set of Selectors, with clauses rather than expressions as constraints and using duplicate selector variables. |
java.util.Collection |
getBindings()
Retrieve the rule's variable bindings, if any. |
java.util.Vector |
getDoActions()
Retrieve the rule's list of "do" action clauses. |
java.util.Vector |
getNetworkSelectors()
Retrieve the set of network selectors. |
java.util.Vector |
getNetworkSelectorVariables()
Retrieve the set of network selector variables. |
AblePatternMatchClause |
getPatternMatchClause()
Retrieve the rule's pattern match clause. |
java.util.Vector |
getRuleBindings()
Retrieves the rule's variable bindings, if any, and removes them from the rules binding list. |
java.util.Vector |
getSelectors()
Retrieve the rule's list of selector clauses. |
java.util.Vector |
getSelectorVariables()
Return a list of selector variables used in this rule |
java.lang.String |
getTemplateString(java.util.Vector theTemplateVars)
Retrieve a text format string for use by rule templates. |
boolean |
isTriggered()
Returns true if the rule bindings is not an empty set |
long |
numberOfSelectors()
Retrieve the number of selector clauses in this rule. |
void |
removeBindings(java.util.Vector theBindings)
A set of bindings was used to fire a rule Remove it from the activationList |
protected boolean |
removeFromConflictSet()
|
void |
reset()
Reset the rule to its unfired state. |
void |
setBindings(java.util.Collection theBindings)
|
void |
setBindings(java.util.HashSet theBindings)
Set the rule's variable bindings, if any. |
void |
setTerminalNode(com.ibm.able.rules.AblePatternMatchRuleTerminalNode theNode)
|
java.lang.String |
toString()
Retrieve a string describing (the contents of) the object. |
java.lang.String |
traceString(int theTraceStringFlavor)
Retrieve a string describing (the contents of) the object. |
java.lang.String |
xmlString()
Return a formal XML string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.Vector mySelectors
protected java.util.Vector myNetworkSelectors
protected AblePatternMatchClause myPatternMatchClause
protected java.util.HashSet myBindings
protected java.util.Vector myConsequents
protected com.ibm.able.rules.AblePatternMatchRuleTerminalNode myTerminalNode
protected boolean checkForPatternMatchEngine
protected AblePatternMatchEngine myPatternMatchEngine
protected static int RuleNumber
protected int myRuleNumber
| Constructor Detail |
public AblePatternMatchRule(java.lang.String theLabel,
AbleRd thePriority,
java.util.Vector theSelectors,
java.util.Vector theConsequents,
AbleRuleSet theRuleSet,
AbleRuleBlock theRuleBlock)
theLabel - The unique label, or name, of this rule.
thePriority - The priority of this rule.
theSelectors - A list of AbleSelector objects that define the
selectors (variables and constraints) of this rule. The list is cloned.
theConsequents - A list of AbleConsequentClause objects that define the
consequents or actions of this rule.
| Method Detail |
public void createNetworkSelectors(AbleRuleSet theRuleSet)
throws AbleParException
AbleParException
public void createNetworkSelectors2(AbleRuleSet theRuleSet)
throws AbleParException
AbleParExceptionpublic java.util.Vector getNetworkSelectors()
public java.util.Vector getNetworkSelectorVariables()
public final java.util.Vector getSelectors()
public final java.util.Vector getDoActions()
public long numberOfSelectors()
public final AblePatternMatchClause getPatternMatchClause()
public final java.util.Collection getBindings()
public final java.util.Vector getRuleBindings()
public void setBindings(java.util.HashSet theBindings)
theBindings - The Vector containing sets of valid variable bindings
public void setBindings(java.util.Collection theBindings)
protected boolean removeFromConflictSet()
protected boolean addToConflictSet()
public void removeBindings(java.util.Vector theBindings)
public void setTerminalNode(com.ibm.able.rules.AblePatternMatchRuleTerminalNode theNode)
public java.util.Vector getSelectorVariables()
public boolean isTriggered()
public void reset()
reset in class AbleRulepublic java.lang.String arlString()
arlString in class AbleRulepublic java.lang.String xmlString()
xmlString in class AbleRulepublic java.lang.String armlString()
armlString in class AbleRule
public java.lang.String getTemplateString(java.util.Vector theTemplateVars)
throws AbleDataException
getTemplateString in class AbleRuletheTemplateVars - An ordered list of template variables referenced by this rule.
AbleDataExceptionAbleRuleTemplatepublic java.lang.String toString()
toString in class AbleRulepublic java.lang.String traceString(int theTraceStringFlavor)
traceString in class AbleRuletheTraceStringFlavor - An Able.TraceStringFlavor value.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||