infosapient.system
Class FzyPremise
java.lang.Object
|
+--infosapient.system.ObservableImpl
|
+--infosapient.system.FzySystemComponent
|
+--infosapient.system.FzyRuleComponent
|
+--infosapient.system.FzyPremise
- public class FzyPremise
- extends FzyRuleComponent
- implements XMLOutput, TextOutput
Class FzyPremise implements the behavior for a rule's PREMISE(also called the antecedent).
(The premise is the evidence from which to draw a conclusion or CONSEQUENT.)
A premise may be either simple or compound.
Example of simple premise:
( attribute (is | are) hedge* set )
Example of a compound premise:
( (premise1) Operator (premise2) ... )
- Version:
- $Revision: 1.1.1.1 $
- See Also:
FzyRule
,
FzyOperator
,
FzyHedge
, Serialized Form
Method Summary |
java.util.Vector |
getAttributes()
Returns a Vector of all the attributes used in the premise of a rule. |
private void |
getAttributesForClause(FzyClauseComponent comp,
java.util.Vector v)
A recursive method that parses a premise for its FzyAttributes. |
FzyClauseComponent |
getComponent()
Return the clause component -- either a infosapient.parseObjects.ASTAttribClause or
a infosapient.opr.FzyOperator. |
java.lang.String |
getName()
|
void |
reset()
Implemented by my subclasses to reinitialize themselves after a
rule session has been performed by the rule engine. |
void |
setComponent(FzyClauseComponent fcc)
Add an ASTAttribClause to the Premise. |
java.lang.StringBuffer |
toXML(int nTabs)
Represent the rules premise as xml tags. |
Methods inherited from class infosapient.system.FzyRuleComponent |
append,
append,
getRule,
getSolutionSet,
getText,
hasSolution,
setRule,
setSolutionSet,
setText,
toText,
update |
Methods inherited from class infosapient.system.FzySystemComponent |
addPropertyChangeListener,
addVetoableChangeListener,
equals,
getID,
getPropertyChangeSupport,
getVetoableChangeSupport,
hashCode,
printOn,
removePropertyChangeListener,
removeVetoableChangeListener,
setID,
setName |
Methods inherited from class java.lang.Object |
,
clone,
finalize,
getClass,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
serialVersionUID
static final long serialVersionUID
attribAdded
private boolean attribAdded
component
private FzyClauseComponent component
inx
private int inx
FzyPremise
public FzyPremise()
FzyPremise
public FzyPremise(FzyRule rule)
getAttributes
public java.util.Vector getAttributes()
- Returns a Vector of all the attributes used in the premise of a rule.
Recursivly searches through complex premises.
The FzyAttributes returned are distinct - no duplicate values.
Creation date: (1/12/00 1:48:47 PM)
- Returns:
- java.util.Vector
getAttributesForClause
private void getAttributesForClause(FzyClauseComponent comp,
java.util.Vector v)
- A recursive method that parses a premise for its FzyAttributes.
Creation date: (1/11/00 1:44:43 PM)
- Parameters:
comp
- infosapient.system.FzyClauseComponentv
- java.util.Vector - used to hold the set of attributes.
getComponent
public FzyClauseComponent getComponent()
- Return the clause component -- either a infosapient.parseObjects.ASTAttribClause or
a infosapient.opr.FzyOperator.
- Returns:
- FzyClauseComponent
getName
public java.lang.String getName()
- Overrides:
- getName in class FzySystemComponent
reset
public void reset()
- Description copied from class: FzyRuleComponent
- Implemented by my subclasses to reinitialize themselves after a
rule session has been performed by the rule engine.
- Overrides:
- reset in class FzyRuleComponent
setComponent
public void setComponent(FzyClauseComponent fcc)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
- Add an ASTAttribClause to the Premise.
- Parameters:
infosapient.parseObjects.ASTAttribClause
- the clause component being added.- Throws:
- java.lang.IllegalStateException - if attempt to add another attribute after first one added.
toXML
public java.lang.StringBuffer toXML(int nTabs)
- Represent the rules premise as xml tags.
Creation date: (1/30/00 9:13:18 PM)
- Specified by:
- toXML in interface XMLOutput
- Returns:
- java.lang.StringBuffer
Copyright (c) 2001, Workplace Performance Tools, All Rights Reserved