public class RuleSet extends Object
RuleSet
manages a set of rules which are sorted
in order of relevance according to the XSLT defined conflict
resolution policy. This makes finding the correct rule for
a DOM4J Node using the XSLT processing model efficient as the
rules can be evaluated in order of priority.
Modifier and Type | Field and Description |
---|---|
private Rule[] |
ruleArray
A lazily evaluated and cached array of rules sorted
|
private ArrayList |
rules
An unordered list of Rule objects
|
Constructor and Description |
---|
RuleSet() |
Modifier and Type | Method and Description |
---|---|
void |
addAll(RuleSet that)
Adds all the rules to this RuleSet from the given other rule set.
|
void |
addRule(Rule rule) |
Rule |
getMatchingRule(Node node)
Performs an XSLT processing model match for the rule
which matches the given Node the best.
|
protected Rule[] |
getRuleArray()
Returns an array of sorted rules.
|
void |
removeRule(Rule rule) |
String |
toString() |
public RuleSet()
public Rule getMatchingRule(Node node)
mode
- is the mode associated with the rule if anynode
- is the DOM4J Node to match againstpublic void removeRule(Rule rule)
public void addAll(RuleSet that)
protected Rule[] getRuleArray()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses