|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.digester.Rule
de.pangaea.metadataportal.utils.SaxRule
public class SaxRule
This class is used as a rule for included documents during Digester parsing.
Whenever this element matches in Digester, begin/end will be called,
that then puts all further SAX events to the specified SAX ContentHandler.
| Field Summary | |
|---|---|
protected ContentHandler |
destContentHandler
|
protected Set<String> |
excludeNamespaces
|
| Fields inherited from class org.apache.commons.digester.Rule |
|---|
digester, namespaceURI |
| Constructor Summary | |
|---|---|
SaxRule()
Default constructor |
|
| Method Summary | |
|---|---|
void |
begin(String namespace,
String name,
Attributes attributes)
|
static SaxRule |
emptyRule()
Creates an empty "useless" SaxRule. |
void |
end(String namespace,
String name)
|
protected void |
finishDocument()
Closes the tags created in initDocument(). |
ContentHandler |
getContentHandler()
return the current ContentHandler. |
protected void |
initDocument()
Add some tags when document started. |
void |
setContentHandler(ContentHandler ch)
Sets the SAX ContentHandler that gets all SAX Events after the startElement event. |
void |
setDigester(org.apache.commons.digester.Digester digester)
Set the Digester with which this Rule is associated. |
void |
setExcludeNamespaces(Set<String> excludeNamespaces)
Sets a Set<String> containing all Namespace URIs that should not be feed to the target ContentHandler on match. |
| Methods inherited from class org.apache.commons.digester.Rule |
|---|
begin, body, body, end, finish, getDigester, getNamespaceURI, setNamespaceURI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ContentHandler destContentHandler
setContentHandler(org.xml.sax.ContentHandler)protected Set<String> excludeNamespaces
setExcludeNamespaces(java.util.Set) | Constructor Detail |
|---|
public SaxRule()
| Method Detail |
|---|
public static SaxRule emptyRule()
DefaultHandlerpublic void setDigester(org.apache.commons.digester.Digester digester)
Digester with which this Rule is associated.
setDigester in class org.apache.commons.digester.RuleIllegalArgumentException - if digester is not an ExtendedDigester instance.public void setContentHandler(ContentHandler ch)
ContentHandler that gets all SAX Events after the startElement event.
public ContentHandler getContentHandler()
ContentHandler.
public void setExcludeNamespaces(Set<String> excludeNamespaces)
Set<String> containing all Namespace URIs that should not be feed to the target ContentHandler on match.
Default (or setting to null) means no restriction: All namespace prefixes visible in the current context will be reported.
protected void initDocument()
throws SAXException
startDocument SAX event.
SAXException
protected void finishDocument()
throws SAXException
initDocument(). The default implementation does nothing.
This method should be overwritten to feed some ending tags before the endDocument SAX event.
SAXException
public void begin(String namespace,
String name,
Attributes attributes)
throws Exception
begin in class org.apache.commons.digester.RuleException
public void end(String namespace,
String name)
throws Exception
end in class org.apache.commons.digester.RuleException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||