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 intA counter so that rules can be ordered by the order in which they were added to the rule baseMap of modes indexed by modeprivate ActionHolds value of property valueOfAction. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDefaultRule(Mode mode, Pattern pattern, Action action) protected voidaddDefaultRules(Mode mode) Adds the default stylesheet rules to the givenModeinstancevoidvoidclear()protected RulecreateDefaultRule(Pattern pattern, Action action) protected ModeA factory method to return a newModeinstance 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!voidremoveRule(Rule rule) voidsetValueOfAction(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
-