Package org.dom4j.rule
Class RuleSet
- java.lang.Object
-
- org.dom4j.rule.RuleSet
-
public class RuleSet extends java.lang.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.
-
-
Constructor Summary
Constructors Constructor Description RuleSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getMatchingRule
public Rule getMatchingRule(Node node)
Performs an XSLT processing model match for the rule which matches the given Node the best.- Parameters:
node
- is the DOM4J Node to match against- Returns:
- the matching Rule or no rule if none matched
-
addRule
public void addRule(Rule rule)
-
removeRule
public void removeRule(Rule rule)
-
addAll
public void addAll(RuleSet that)
Adds all the rules to this RuleSet from the given other rule set.- Parameters:
that
- DOCUMENT ME!
-
getRuleArray
protected Rule[] getRuleArray()
Returns an array of sorted rules.- Returns:
- the rules as a sorted array in ascending precendence so that the rules at the end of the array should be used first
-
-