| |
|
| java.lang.Object org.apache.commons.digester.RuleSetBase org.apache.commons.digester.xmlrules.DigesterRuleParser
DigesterRuleParser | public class DigesterRuleParser extends RuleSetBase (Code) | | This is a RuleSet that parses XML into Digester rules, and then
adds those rules to a 'target' Digester.
since: 1.2 |
Inner Class :protected class PatternStack extends ArrayStack | |
Inner Class :protected class SetPropertiesAliasRule extends Rule | |
Inner Class :protected class SetNestedPropertiesAliasRule extends Rule | |
Method Summary | |
public void | add(Rule rule) Adds a rule the the target digester. | public void | addRuleInstances(Digester digester) Add to the given digester the set of Rule instances used to parse an XML
document defining Digester rules. | protected String | getDigesterRulesDTD() Returns the location of the DTD used to validate the digester rules
XML document. | public void | setBasePath(String path) Set a base pattern beneath which all the rules loaded by this
object will be registered. | public void | setDigesterRulesDTD(String dtdURL) Sets the location of the digester rules DTD. | public void | setTarget(Digester d) |
DIGESTER_PUBLIC_ID | final public static String DIGESTER_PUBLIC_ID(Code) | | |
patternStack | protected PatternStack patternStack(Code) | | A stack used to maintain the current pattern. The Rules XML document
type allows nesting of patterns. If an element defines a matching
pattern, the resulting pattern is a concatenation of that pattern with
all the ancestor elements' patterns. Hence the need for a stack.
|
targetDigester | protected Digester targetDigester(Code) | | This is the digester to which we are adding the rules that we parse
from the Rules XML document.
|
DigesterRuleParser | public DigesterRuleParser()(Code) | | Constructs a DigesterRuleParser. This object will be inoperable
until the target digester is set, via setTarget(Digester)
|
DigesterRuleParser | public DigesterRuleParser(Digester targetDigester)(Code) | | Constructs a rule set for converting XML digester rule descriptions
into Rule objects, and adding them to the given Digester
Parameters: targetDigester - the Digester to add the rules to |
add | public void add(Rule rule)(Code) | | Adds a rule the the target digester. After a rule has been created by
parsing the XML, it is added to the digester by calling this method.
Typically, this method is called via reflection, when executing
a SetNextRule, from the Digester that is parsing the rules XML.
Parameters: rule - a Rule to add to the target digester. |
addRuleInstances | public void addRuleInstances(Digester digester)(Code) | | Add to the given digester the set of Rule instances used to parse an XML
document defining Digester rules. When the digester parses an XML file,
it will add the resulting rules & patterns to the 'target digester'
that was passed in this RuleSet's constructor.
If you extend this class to support additional rules, your implementation
should of this method should call this implementation first: i.e.
super.addRuleInstances(digester);
|
getDigesterRulesDTD | protected String getDigesterRulesDTD()(Code) | | Returns the location of the DTD used to validate the digester rules
XML document.
|
setBasePath | public void setBasePath(String path)(Code) | | Set a base pattern beneath which all the rules loaded by this
object will be registered. If this string is not empty, and does
not end in a "/", then one will be added.
since: 1.6 |
setDigesterRulesDTD | public void setDigesterRulesDTD(String dtdURL)(Code) | | Sets the location of the digester rules DTD. This is the DTD used
to validate the rules XML file.
|
setTarget | public void setTarget(Digester d)(Code) | | Sets the digester into which to add the parsed rules
Parameters: d - the Digester to add the rules to |
|
|
|