public abstract class Rule
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Digester |
digester
The Digester with which this Rule is associated.
|
protected java.lang.String |
namespaceURI
The namespace URI for which this Rule is relevant, if any.
|
Constructor and Description |
---|
Rule()
Base constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
begin(org.xml.sax.Attributes attributes)
Deprecated.
|
void |
begin(java.lang.String namespace,
java.lang.String name,
org.xml.sax.Attributes attributes)
This method is called when the beginning of a matching XML element
is encountered.
|
void |
body(java.lang.String text)
Deprecated.
|
void |
body(java.lang.String namespace,
java.lang.String name,
java.lang.String text)
This method is called when the body of a matching XML element is
encountered.
|
void |
end()
Deprecated.
|
void |
end(java.lang.String namespace,
java.lang.String name)
This method is called when the end of a matching XML element
is encountered.
|
void |
finish()
This method is called after all parsing methods have been
called, to allow Rules to remove temporary data.
|
Digester |
getDigester()
Return the Digester with which this Rule is associated.
|
java.lang.String |
getNamespaceURI()
Return the namespace URI for which this Rule is relevant, if any.
|
void |
setDigester(Digester digester)
Set the
Digester with which this Rule is associated. |
void |
setNamespaceURI(java.lang.String namespaceURI)
Set the namespace URI for which this Rule is relevant, if any.
|
protected Digester digester
protected java.lang.String namespaceURI
public Rule()
Base constructor. Now the digester will be set when the rule is added.
public Digester getDigester()
public void setDigester(Digester digester)
Digester
with which this Rule
is associated.public java.lang.String getNamespaceURI()
public void setNamespaceURI(java.lang.String namespaceURI)
namespaceURI
- Namespace URI for which this Rule is relevant,
or null
to match independent of namespace.@Deprecated public void begin(org.xml.sax.Attributes attributes) throws java.lang.Exception
attributes
- The attribute list of this elementjava.lang.Exception
public void begin(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attributes) throws java.lang.Exception
begin
without the
namespace
and name
parameters, to retain
backwards compatibility.namespace
- the namespace URI of the matching element, or an
empty string if the parser is not namespace aware or the element has
no namespacename
- the local name if the parser is namespace aware, or just
the element name otherwiseattributes
- The attribute list of this elementjava.lang.Exception
@Deprecated public void body(java.lang.String text) throws java.lang.Exception
text
- The text of the body of this elementjava.lang.Exception
public void body(java.lang.String namespace, java.lang.String name, java.lang.String text) throws java.lang.Exception
body
without the namespace
and
name
parameters, to retain backwards compatibility.namespace
- the namespace URI of the matching element, or an
empty string if the parser is not namespace aware or the element has
no namespacename
- the local name if the parser is namespace aware, or just
the element name otherwisetext
- The text of the body of this elementjava.lang.Exception
@Deprecated public void end() throws java.lang.Exception
java.lang.Exception
public void end(java.lang.String namespace, java.lang.String name) throws java.lang.Exception
end
without the
namespace
and name
parameters, to retain
backwards compatibility.namespace
- the namespace URI of the matching element, or an
empty string if the parser is not namespace aware or the element has
no namespacename
- the local name if the parser is namespace aware, or just
the element name otherwisejava.lang.Exception
public void finish() throws java.lang.Exception
java.lang.Exception
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.