Methods Summary |
---|
public void | add(java.lang.String pattern, Rule rule)Registers a new Rule instance matching the specified pattern.
This implementation sets the Digester and the
namespaceURI on the Rule before calling {@link #registerRule}.
// set up rule
if (this.digester != null) {
rule.setDigester(this.digester);
}
if (this.namespaceURI != null) {
rule.setNamespaceURI(this.namespaceURI);
}
registerRule(pattern, rule);
|
public abstract void | clear()Clear all existing Rule instance registrations.
|
public Digester | getDigester()Return the Digester instance with which this Rules instance is
associated.
return digester;
|
public java.lang.String | getNamespaceURI()Return the namespace URI that will be applied to all subsequently
added Rule objects.
return namespaceURI;
|
public java.util.List | match(java.lang.String pattern)Return a List of all registered Rule instances that match the specified
nesting pattern, or a zero-length List if there are no matches. If more
than one Rule instance matches, they must be returned
in the order originally registered through the add()
method.
return match(namespaceURI, pattern);
|
public abstract java.util.List | match(java.lang.String namespaceURI, java.lang.String pattern)Return a List of all registered Rule instances that match the specified
nesting pattern, or a zero-length List if there are no matches. If more
than one Rule instance matches, they must be returned
in the order originally registered through the add()
method.
|
protected abstract void | registerRule(java.lang.String pattern, Rule rule)Register rule at given pattern.
The the Digester and namespaceURI properties of the given Rule
can be assumed to have been set properly before this method is called.
|
public abstract java.util.List | rules()Return a List of all registered Rule instances, or a zero-length List
if there are no registered Rule instances. If more than one Rule
instance has been registered, they must be returned
in the order originally registered through the add()
method.
|
public void | setDigester(Digester digester)Set the Digester instance with which this Rules instance is associated.
this.digester = digester;
|
public void | setNamespaceURI(java.lang.String namespaceURI)Set the namespace URI that will be applied to all subsequently
added Rule objects.
this.namespaceURI = namespaceURI;
|