|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.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 FormField Summary | |
---|---|
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 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 |
Fields inherited from class com.ibm.able.rules.AbleRule |
---|
myBooleanTruth, myBreakpoint, myComment, myEnabled, myFiredCount, myFiredFlag, myId, myLabel, myLocation, myPreConditions, myPriority, myPrompt, myRdRefs, 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)
Create a new pattern match rule with the specified priority, selectors, and consequent clauses. |
Method Summary | |
---|---|
java.lang.String |
arlString()
Return a formal Able Rule Language (ARL) 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()
Retrieve the rule's variable bindings, if any. |
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 |
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
Constructor Detail |
public AblePatternMatchRule(java.lang.String theLabel, AbleRd thePriority, java.util.Vector theSelectors, java.util.Vector theConsequents, AbleRuleSet theRuleSet)
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
public void createNetworkSelectors2(AbleRuleSet theRuleSet) throws AbleParException
public 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 bindingspublic void setBindings(java.util.Collection theBindings)
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 AbleRule
public java.lang.String arlString()
arlString
in class AbleRule
public java.lang.String xmlString()
xmlString
in class AbleRule
public java.lang.String getTemplateString(java.util.Vector theTemplateVars) throws AbleDataException
getTemplateString
in class AbleRule
theTemplateVars
- An ordered list of template variables referenced by this rule.AbleRuleTemplate
public java.lang.String toString()
toString
in class AbleRule
public java.lang.String traceString(int theTraceStringFlavor)
traceString
in class AbleRule
theFlavor
- An Able.TraceStringFlavor value.
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |