ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.rules
Class AbleAssertionRule

java.lang.Object
  |
  +--com.ibm.able.rules.AbleRule
        |
        +--com.ibm.able.rules.AbleAssertionRule
All Implemented Interfaces:
java.io.Serializable

public class AbleAssertionRule
extends AbleRule
implements java.io.Serializable

This class represents a rule comprised of a single assignment statement, function call or method invocation. It contains a single assertion clause.

See Also:
AbleAssertionClause, Serialized Form

Field Summary
protected  AbleAssertionClause myAssertion
          myAssertion is the assertion clause representing an assignment, function call, or method invocation.
 
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
AbleAssertionRule(int theId, java.lang.String theLabel, AbleAssertionClause theAssertion, AbleRuleSet theRuleSet)
          Create a new assertion rule with a default priority.
AbleAssertionRule(int theId, java.lang.String theLabel, AbleRd thePriority, AbleAssertionClause theAssertion, AbleRuleSet theRuleSet)
          Create a new assertion rule with the specified priority.
AbleAssertionRule(java.lang.String theLabel, AbleAssertionClause theAssertion)
          Create a new assertion rule with a default priority.
AbleAssertionRule(java.lang.String theLabel, AbleRd thePriority, AbleAssertionClause theAssertion)
          Create a new assertion rule with the specified priority.
 
Method Summary
 java.lang.String arlString()
          Return a formal Able Rule Language (ARL) string.
 AbleAssertionClause getAssertion()
          Retrieve the rule's assertion clause, if any.
 java.lang.String getTemplateString(java.util.Vector theTemplateVars)
          Retrieve a text format string for use by rule templates.
 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 com.ibm.able.rules.AbleRule
addHeaderRdReferences, addRdReference, addRdReferences, addWrReference, addWrReferences, arlPreConditionsString, checkTimePeriodPreConditions, clearBreakpoint, Copyright, getArlComment, getBooleanTruth, getBreakpoint, getComment, getId, getIdLabelString, getLabel, getLocation, getPriority, getPrompt, getPromptString, getRdReferences, getTemplateHeaderString, getTemplateName, getTemplateValues, getTemplateVars, getWrReferences, isEnabled, isFired, isGeneratedFromTemplate, isTemplate, logTrace, reset, setBooleanTruth, setBreakpoint, setComment, setEnabled, setFired, setId, setLocation, setPreConditions, setPriority, setPrompt, setTemplate, setTemplateName, setTemplateValues, xmlPreConditionsString, xmlPriorityString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myAssertion

protected AbleAssertionClause myAssertion
myAssertion is the assertion clause representing an assignment, function call, or method invocation.
Constructor Detail

AbleAssertionRule

public AbleAssertionRule(java.lang.String theLabel,
                         AbleAssertionClause theAssertion)
Create a new assertion rule with a default priority.
Parameters:
theLabel - The unique label, or name, of this rule.

theAssertion - A single assignment statement that defines this assertion rule.


AbleAssertionRule

public AbleAssertionRule(java.lang.String theLabel,
                         AbleRd thePriority,
                         AbleAssertionClause theAssertion)
Create a new assertion rule with the specified priority.
Parameters:
theLabel - The unique label, or name, of this rule.

thePriority - The priority of this rule.

theAssertion - A single assignment statement that defines this assertion rule.


AbleAssertionRule

public AbleAssertionRule(int theId,
                         java.lang.String theLabel,
                         AbleAssertionClause theAssertion,
                         AbleRuleSet theRuleSet)
Create a new assertion rule with a default priority.
Parameters:
theId - The unique Id of this rule.

theLabel - The unique label, or name, of this rule.

theAssertion - A single assignment statement that defines this assertion rule.

theRuleSet - The ruleset to which this rule belongs.


AbleAssertionRule

public AbleAssertionRule(int theId,
                         java.lang.String theLabel,
                         AbleRd thePriority,
                         AbleAssertionClause theAssertion,
                         AbleRuleSet theRuleSet)
Create a new assertion rule with the specified priority.
Parameters:
theId - The unique Id of this rule.

theLabel - The unique label, or name, of this rule.

thePriority - The priority of this rule.

theAssertion - A single assignment statement that defines this assertion rule.

theRuleSet - The ruleset to which this rule belongs.

Method Detail

getAssertion

public final AbleAssertionClause getAssertion()
Retrieve the rule's assertion clause, if any.
Returns:
The assertion clause of the rule, or null if the rule has no assertion clause.

arlString

public java.lang.String arlString()
Return a formal Able Rule Language (ARL) string.
Overrides:
arlString in class AbleRule
Returns:
A String describing the object in Able rule language.

xmlString

public java.lang.String xmlString()
Return a formal XML string.
Overrides:
xmlString in class AbleRule
Returns:
A String describing the object in XML.

getTemplateString

public java.lang.String getTemplateString(java.util.Vector theTemplateVars)
                                   throws AbleDataException
Retrieve a text format string for use by rule templates. The string contains "{n}" strings, where the index 'n' corresponds to the template variables defined in the rule template. This string is based on the standard arlString() representation of the rule. After replacement of the template variable values, the resulting string must be a valid ARL format string that can be parsed.
Overrides:
getTemplateString in class AbleRule
Parameters:
theTemplateVars - An ordered list of template variables referenced by this rule.
Returns:
A Text format string used to create a new rule instance.
See Also:
AbleRuleTemplate

toString

public java.lang.String toString()
Retrieve a string describing (the contents of) the object.
Overrides:
toString in class AbleRule
Returns:
A String containing the current contents of the object.

traceString

public java.lang.String traceString(int theTraceStringFlavor)
Retrieve a string describing (the contents of) the object.
Overrides:
traceString in class AbleRule
Parameters:
theFlavor - An Able.TraceStringFlavor value.

Returns:
A String containing the current contents of the object.

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003