Class RuleManager
java.lang.Object
org.dom4j.rule.RuleManager
RuleManager
manages a set of rules such that a rule can be
found for a given DOM4J Node using the XSLT processing model.
- Version:
- $Revision: 1.9 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
A counter so that rules can be ordered by the order in which they were added to the rule baseMap of modes indexed by modeprivate Action
Holds value of property valueOfAction. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDefaultRule
(Mode mode, Pattern pattern, Action action) protected void
addDefaultRules
(Mode mode) Adds the default stylesheet rules to the givenMode
instancevoid
void
clear()
protected Rule
createDefaultRule
(Pattern pattern, Action action) protected Mode
A factory method to return a newMode
instance which should add the necessary default rulesgetMatchingRule
(String modeName, Node node) Performs an XSLT processing model match for the rule which matches the given Node the best.DOCUMENT ME!DOCUMENT ME!void
removeRule
(Rule rule) void
setValueOfAction
(Action valueOfAction) Sets the default value-of action which is used in the default rules for the pattern "text()|@"
-
Field Details
-
modes
-
appearenceCount
private int appearenceCountA counter so that rules can be ordered by the order in which they were added to the rule base -
valueOfAction
Holds value of property valueOfAction.
-
-
Constructor Details
-
RuleManager
public RuleManager()
-
-
Method Details
-
getMode
-
addRule
-
removeRule
-
getMatchingRule
Performs an XSLT processing model match for the rule which matches the given Node the best.- Parameters:
modeName
- is the name of the mode associated with the rule if anynode
- is the DOM4J Node to match against- Returns:
- the matching Rule or no rule if none matched
-
clear
public void clear() -
getValueOfAction
DOCUMENT ME!- Returns:
- the default value-of action which is used in the default rules for the pattern "text()|@"
-
setValueOfAction
Sets the default value-of action which is used in the default rules for the pattern "text()|@"- Parameters:
valueOfAction
- DOCUMENT ME!
-
createMode
-
addDefaultRules
-
addDefaultRule
-
createDefaultRule
-