de.ispsoft.jaxme
Class FilterContentHandler

java.lang.Object
  extended byde.ispsoft.jaxme.FilterContentHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler
Direct Known Subclasses:
UnmarshallerHandlerImpl

public class FilterContentHandler
extends java.lang.Object
implements org.xml.sax.ContentHandler

This is a ContentHandler that fires SAX events it receives into a second ContentHandler, the parent handler.

The FilterContentHandler is not really useful by itself, it is mainly designed for being subclasses. Concrete subclasses will typically modify the SAX event stream.

Author:
Jochen Wiedmann

Constructor Summary
FilterContentHandler()
          Creates a new FilterContentHandler instance without parent handler.
FilterContentHandler(org.xml.sax.ContentHandler pParentHandler)
          Creates a new FilterContentHandler instance with the given parent handler.
 
Method Summary
 void characters(char[] pChars, int pStart, int pLen)
           
 void endDocument()
           
 void endElement(java.lang.String pNamespaceURI, java.lang.String pLocalName, java.lang.String pQName)
           
 void endPrefixMapping(java.lang.String pPrefix)
           
 org.xml.sax.ContentHandler getParentHandler()
          Returns the parent handler.
 void ignorableWhitespace(char[] pChars, int pStart, int pLen)
           
 void processingInstruction(java.lang.String pTarget, java.lang.String pData)
           
 void setDocumentLocator(org.xml.sax.Locator pLocator)
           
 void setParentHandler(org.xml.sax.ContentHandler pParentHandler)
          Sets the parent handler.
 void skippedEntity(java.lang.String pEntity)
           
 void startDocument()
           
 void startElement(java.lang.String pNamespaceURI, java.lang.String pLocalName, java.lang.String pQName, org.xml.sax.Attributes pAttr)
           
 void startPrefixMapping(java.lang.String pNamespaceURI, java.lang.String pPrefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterContentHandler

public FilterContentHandler()

Creates a new FilterContentHandler instance without parent handler. SAX events will be silently discarded until a parent handler is set with setParentHandler().


FilterContentHandler

public FilterContentHandler(org.xml.sax.ContentHandler pParentHandler)

Creates a new FilterContentHandler instance with the given parent handler. SAX events will be forwarded to the parent handler, possibly transformed by creating qualified names.

Method Detail

setParentHandler

public void setParentHandler(org.xml.sax.ContentHandler pParentHandler)

Sets the parent handler.

Parameters:
pParentHandler - The parent handler that should receive forwarded SAX events or null to disable SAX event forwarding.

getParentHandler

public org.xml.sax.ContentHandler getParentHandler()

Returns the parent handler.

Returns:
The parent handler that should receive forwarded SAX events or null if SAX event forwarding is disabled.

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator pLocator)
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String pNamespaceURI,
                         java.lang.String pLocalName,
                         java.lang.String pQName,
                         org.xml.sax.Attributes pAttr)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] pChars,
                                int pStart,
                                int pLen)
                         throws org.xml.sax.SAXException
Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String pNamespaceURI,
                       java.lang.String pLocalName,
                       java.lang.String pQName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

skippedEntity

public void skippedEntity(java.lang.String pEntity)
                   throws org.xml.sax.SAXException
Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

processingInstruction

public void processingInstruction(java.lang.String pTarget,
                                  java.lang.String pData)
                           throws org.xml.sax.SAXException
Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

endPrefixMapping

public void endPrefixMapping(java.lang.String pPrefix)
                      throws org.xml.sax.SAXException
Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

startPrefixMapping

public void startPrefixMapping(java.lang.String pNamespaceURI,
                               java.lang.String pPrefix)
                        throws org.xml.sax.SAXException
Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] pChars,
                       int pStart,
                       int pLen)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException