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

com.ibm.able.rules
Class AblePredicateFact

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

public class AblePredicateFact
extends AblePredicateRule
implements java.io.Serializable

This class represents a predicate fact, a single predicate.

See Also:
Serialized Form

Field Summary
protected  AblePredicate myAssertion
          myAssertion is a predicate which can be ground or non-ground.
 
Fields inherited from class com.ibm.able.rules.AblePredicateRule
copyId, myAntecedents, myConsequent, myCuts, myVariables
 
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
AblePredicateFact(int theId, java.lang.String theLabel, AblePredicate theAssertion, AbleRuleSet theRuleSet)
          Create a new predicate fact rule with a default priority.
AblePredicateFact(int theId, java.lang.String theLabel, AbleRd thePriority, AblePredicate theAssertion, AbleRuleSet theRuleSet)
          Create a new predicate fact rule with the specified priority.
AblePredicateFact(java.lang.String theLabel, AblePredicate theAssertion, AbleRuleSet theRuleSet)
          Create a new predicate fact rule with a default priority.
AblePredicateFact(java.lang.String theLabel, AbleRd thePriority, AblePredicate theAssertion, AbleRuleSet theRuleSet)
          Create a new predicate fact rule with the specified priority.
 
Method Summary
 java.lang.String arlString()
          Return a formal Able Rule Language (RL) string.
 AblePredicateRule createMatchFact()
          Create a duplicate of this rule with new variables
 boolean equals(AblePredicate otherPredicate)
          Returns true if the facts are equal (same predicate and same args)
 boolean equals(AblePredicateFact otherFact)
          Returns true if the facts are equal (same predicate and same args)
 AblePredicate getAssertion()
          Retrieve the rule's assertion clause, if any.
 java.lang.String getSignature()
          Returns the signature of the rule head (consequent)
 java.lang.String toString()
          Retrieve a string describing (the contents of) the object.
protected  java.lang.String trcString(int theTraceStringFlavor)
           
 java.lang.String xmlString()
          Return a formal XML string.
 
Methods inherited from class com.ibm.able.rules.AblePredicateRule
applyBindings, createMatchRule, displayBindings, findAllVariables, getAntecedents, getBindings, getConsequent, getCuts, getTemplateString, numberOfAntecedents, reset, resetAllVariables, setBindings, traceString
 
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, 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 AblePredicate myAssertion
myAssertion is a predicate which can be ground or non-ground.
Constructor Detail

AblePredicateFact

public AblePredicateFact(java.lang.String theLabel,
                         AblePredicate theAssertion,
                         AbleRuleSet theRuleSet)
Create a new predicate fact rule with a default priority.
Parameters:
theLabel - The unique label, or name, of this rule.

theAssertion - A single predicate that defines this fact.
theRuleSet - A ruleset object to which this predicate belongs.


AblePredicateFact

public AblePredicateFact(java.lang.String theLabel,
                         AbleRd thePriority,
                         AblePredicate theAssertion,
                         AbleRuleSet theRuleSet)
Create a new predicate fact rule with the specified priority.
Parameters:
theLabel - The unique label, or name, of this rule.

thePriority - The priority of this rule.

theAssertion - A single predicate that defines this fact.


AblePredicateFact

public AblePredicateFact(int theId,
                         java.lang.String theLabel,
                         AblePredicate theAssertion,
                         AbleRuleSet theRuleSet)
Create a new predicate fact 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 predicate that defines this fact.

theRuleSet - A ruleset object to which this rule belongs.


AblePredicateFact

public AblePredicateFact(int theId,
                         java.lang.String theLabel,
                         AbleRd thePriority,
                         AblePredicate theAssertion,
                         AbleRuleSet theRuleSet)
Create a new predicate fact 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. (not used in the predicate engine)

theAssertion - A single predicate that defines this fact.

theRuleSet - A ruleset object to which this rule belongs.

Method Detail

createMatchFact

public AblePredicateRule createMatchFact()
Create a duplicate of this rule with new variables

getAssertion

public AblePredicate getAssertion()
Retrieve the rule's assertion clause, if any.
Returns:
The assertion clause (predicate) of the rule.

getSignature

public java.lang.String getSignature()
Returns the signature of the rule head (consequent)
Overrides:
getSignature in class AblePredicateRule

arlString

public java.lang.String arlString()
Return a formal Able Rule Language (RL) string.
Overrides:
arlString in class AblePredicateRule
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 AblePredicateRule
Returns:
A String describing the object in XML.

equals

public boolean equals(AblePredicateFact otherFact)
Returns true if the facts are equal (same predicate and same args)

equals

public boolean equals(AblePredicate otherPredicate)
Returns true if the facts are equal (same predicate and same args)

toString

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

trcString

protected java.lang.String trcString(int theTraceStringFlavor)
Overrides:
trcString in class AblePredicateRule

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

(C) Copyright IBM Corporation 1999, 2003