public class RuleSet extends java.lang.Object implements RuleConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
Copyright.
|
Constructor and Description |
---|
RuleSet(Rule[] rules)
This constructor takes an array of Rule objects.
|
Modifier and Type | Method and Description |
---|---|
Rule[] | getRules()
Gets the array of Rule objects.
|
java.lang.String | getXMLDocument()
Gets an XML document that describes this rule set.
|
java.lang.String | getXMLFragment(java.lang.String indent)
Gets an XML fragment that describes the rule set.
|
void | invoke(Evaluator evaluator, ActionHandler actionHandler)
Invokes the ruleset.
|
static RuleSet | loadRuleSetFromXML(org.w3c.dom.Element element)
Loads a RuleSet object from an XML element object.
|
static RuleSet | loadRuleSetFromXML(java.lang.String xml)
Loads a RuleSet object from an XML document.
|
void | setRules(Rule[] rules)
Sets the array of Rule objects.
|
public static final java.lang.String COPYRIGHT
public RuleSet(Rule[] rules)
public Rule[] getRules()
public void setRules(Rule[] rules)
public void invoke(Evaluator evaluator, ActionHandler actionHandler)
public java.lang.String getXMLDocument()
<!DOCTYPE ruleSet [
<!ELEMENT ruleSet (rule*)>
<!ELEMENT rule (comment?, (orListCondition | andListCondition | simpleCondition | trueCondition | openCondition), action)>
<!ELEMENT comment EMPTY>
<!ATTLIST comment text CDATA #REQUIRED>
<!ELEMENT action (parameter*)>
<!ATTLIST action name CDATA #REQUIRED>
<!ELEMENT orListCondition (not?, (orListCondition | andListCondition | simpleCondition | trueCondition | openCondition)+)>
<!ELEMENT andListCondition (not?, (orListCondition | andListCondition | simpleCondition | trueCondition | openCondition)+)>
<!ELEMENT simpleCondition (not?, variable, operator, value, qualifier*)>
<!ELEMENT openCondition (not?, parameter*)>
<!ATTLIST openCondition name CDATA #REQUIRED>
<!ELEMENT trueCondition (not?)>
<!ELEMENT not EMPTY>
<!ELEMENT variable EMPTY>
<!ATTLIST variable name CDATA #REQUIRED>
<!ELEMENT operator EMPTY>
<!ATTLIST operator name CDATA #REQUIRED>
<!ELEMENT value EMPTY>
<!ATTLIST value data CDATA #REQUIRED>
<!ELEMENT qualifier EMPTY>
<!ATTLIST qualifier name CDATA #REQUIRED>
<!ATTLIST qualifier data CDATA #REQUIRED>
<!ELEMENT parameter (parameter*)>
<!ATTLIST parameter name CDATA #REQUIRED>
<!ATTLIST parameter value CDATA #REQUIRED>
]>
public java.lang.String getXMLFragment(java.lang.String indent)
<!ELEMENT ruleSet (rule*)>
<!ELEMENT rule (comment?, (orListCondition | andListCondition | simpleCondition | trueCondition | openCondition), action)>
<!ELEMENT comment EMPTY>
<!ATTLIST comment text CDATA #REQUIRED>
<!ELEMENT action (parameter*)>
<!ATTLIST action name CDATA #REQUIRED>
<!ELEMENT orListCondition (not?, (orListCondition | andListCondition | simpleCondition | trueCondition | openCondition)+)>
<!ELEMENT andListCondition (not?, (orListCondition | andListCondition | simpleCondition | trueCondition | openCondition)+)>
<!ELEMENT simpleCondition (not?, variable, operator, value, qualifier*)>
<!ELEMENT openCondition (not?, parameter*)>
<!ATTLIST openCondition name CDATA #REQUIRED>
<!ELEMENT trueCondition (not?)>
<!ELEMENT not EMPTY>
<!ELEMENT variable EMPTY>
<!ATTLIST variable name CDATA #REQUIRED>
<!ELEMENT operator EMPTY>
<!ATTLIST operator name CDATA #REQUIRED>
<!ELEMENT value EMPTY>
<!ATTLIST value data CDATA #REQUIRED>
<!ELEMENT qualifier EMPTY>
<!ATTLIST qualifier name CDATA #REQUIRED>
<!ATTLIST qualifier data CDATA #REQUIRED>
<!ELEMENT parameter (parameter*)>
<!ATTLIST parameter name CDATA #REQUIRED>
<!ATTLIST parameter value CDATA #REQUIRED>
public static RuleSet loadRuleSetFromXML(java.lang.String xml)
public static RuleSet loadRuleSetFromXML(org.w3c.dom.Element element)