infosapient.system
Class FzyRuleComponent

java.lang.Object
  |
  +--infosapient.system.ObservableImpl
        |
        +--infosapient.system.FzySystemComponent
              |
              +--infosapient.system.FzyRuleComponent
Direct Known Subclasses:
FzyConsequent, FzyPremise

public abstract class FzyRuleComponent
extends FzySystemComponent
implements java.io.Serializable, Observer

See Also:
Serialized Form

Field Summary
protected  java.lang.StringBuffer clauseText
           
protected  FzyRule owningRule
           
(package private) static long serialVersionUID
           
private  FzySolutionSet solutionSet
           
private  FzySet theGoal
           
 
Fields inherited from class infosapient.system.FzySystemComponent
DEBUG_, myID, name, pcs, serialVersionUID, trace, vcs
 
Fields inherited from class infosapient.system.ObservableImpl
arr, changed, obs, serialVersionUID
 
Constructor Summary
FzyRuleComponent()
           
 
Method Summary
 java.lang.StringBuffer append(java.lang.String cTxt)
          Set the text for this rule component.
 java.lang.StringBuffer append(java.lang.StringBuffer cTxt)
          Append the text for this rule component.
 FzyRule getRule()
          Return the rule that this component is part of.
 FzySolutionSet getSolutionSet()
          Return the solution set for this rule component.
 java.lang.StringBuffer getText()
          Return the literal text of this rule component.
 boolean hasSolution()
          Return the state of the solution set of this rule component.
abstract  void reset()
          Implemented by my subclasses to reinitialize themselves after a rule session has been performed by the rule engine.
 FzyRuleComponent setRule(FzyRule owner)
          Set the rule that this component belongs to.
 void setSolutionSet(FzySolutionSet fos)
          Set the solution set for this rule component.
 FzyRuleComponent setText(java.lang.String cTxt)
          Set the text for this rule component.
 java.lang.String toText()
          Return the literal text of this rule component.
 void update(Observable fso, java.lang.Object obj)
          Used by the objects that I am observing (@see infosapient.Observable).
 
Methods inherited from class infosapient.system.FzySystemComponent
addPropertyChangeListener, addVetoableChangeListener, equals, getID, getName, getPropertyChangeSupport, getVetoableChangeSupport, hashCode, printOn, removePropertyChangeListener, removeVetoableChangeListener, setID, setName
 
Methods inherited from class infosapient.system.ObservableImpl
addObserver, clearChanged, containsObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID

theGoal

private FzySet theGoal

solutionSet

private FzySolutionSet solutionSet

owningRule

protected FzyRule owningRule

clauseText

protected java.lang.StringBuffer clauseText
Constructor Detail

FzyRuleComponent

public FzyRuleComponent()
Method Detail

append

public java.lang.StringBuffer append(java.lang.String cTxt)
Set the text for this rule component.
Parameters:
String - -- the text for this component.

append

public java.lang.StringBuffer append(java.lang.StringBuffer cTxt)
Append the text for this rule component.
Parameters:
String - -- the text for this component.
Returns:
StringBuffer - the current stringbuffer for this component

getRule

public FzyRule getRule()
Return the rule that this component is part of.
Returns:
FzyRule -- my owning rule.

getSolutionSet

public FzySolutionSet getSolutionSet()
Return the solution set for this rule component. If the current component solution set is null, create one and return it. Add this component to the observers of this solution set.
Returns:
FzySolutionSet the solution set for this rule component.

getText

public java.lang.StringBuffer getText()
Return the literal text of this rule component.
Returns:
String -- the text of this rule component.

hasSolution

public boolean hasSolution()
Return the state of the solution set of this rule component.
Returns:
boolean - does this rule component have a solution.

reset

public abstract void reset()
Implemented by my subclasses to reinitialize themselves after a rule session has been performed by the rule engine.

setRule

public FzyRuleComponent setRule(FzyRule owner)
Set the rule that this component belongs to.
Returns:
FzyRuleComponent -- this rule component.

setSolutionSet

public void setSolutionSet(FzySolutionSet fos)
Set the solution set for this rule component.

setText

public FzyRuleComponent setText(java.lang.String cTxt)
Set the text for this rule component.
Parameters:
String - -- the text for this component.

toText

public java.lang.String toText()
Return the literal text of this rule component.
Returns:
String -- the text of this rule component.

update

public void update(Observable fso,
                   java.lang.Object obj)
Used by the objects that I am observing (@see infosapient.Observable). Notify my owning rule that my observable has changed.
Specified by:
update in interface Observer

License to use this program is provided under the TERMS OF THE COMMON PUBLIC LICENSE 0.5. ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

Copyright (c) 2001, Workplace Performance Tools, All Rights Reserved