FileDocCategorySizeDatePackage
Rules.javaAPI DocApache Tomcat 6.0.144232Fri Jul 20 04:20:36 BST 2007org.apache.tomcat.util.digester

Rules

public interface Rules
Public interface defining a collection of Rule instances (and corresponding matching patterns) plus an implementation of a matching policy that selects the rules that match a particular pattern of nested elements discovered during parsing.

Fields Summary
Constructors Summary
Methods Summary
public voidadd(java.lang.String pattern, Rule rule)
Register a new Rule instance matching the specified pattern.

param
pattern Nesting pattern to be matched for this Rule
param
rule Rule instance to be registered

public voidclear()
Clear all existing Rule instance registrations.

public DigestergetDigester()
Return the Digester instance with which this Rules instance is associated.

public java.lang.StringgetNamespaceURI()
Return the namespace URI that will be applied to all subsequently added Rule objects.

public java.util.Listmatch(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.

param
pattern Nesting pattern to be matched
deprecated
Call match(namespaceURI,pattern) instead.

public java.util.Listmatch(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.

param
namespaceURI Namespace URI for which to select matching rules, or null to match regardless of namespace URI
param
pattern Nesting pattern to be matched

public java.util.Listrules()
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 voidsetDigester(Digester digester)
Set the Digester instance with which this Rules instance is associated.

param
digester The newly associated Digester instance

public voidsetNamespaceURI(java.lang.String namespaceURI)
Set the namespace URI that will be applied to all subsequently added Rule objects.

param
namespaceURI Namespace URI that must match on all subsequently added rules, or null for matching regardless of the current namespace URI