com.sun.tools.xjc.reader.xmlschema.bindinfo
Class ForkingFilter

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by com.sun.tools.xjc.reader.xmlschema.bindinfo.ForkingFilter
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XMLFilter, XMLReader

public class ForkingFilter
extends XMLFilterImpl

XMLFilter that can fork an event to another ContentHandler in the middle.

The side handler receives SAX events before the next handler in the filter chain does.


Constructor Summary
ForkingFilter()
           
ForkingFilter(ContentHandler next)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String uri, String localName, String qName)
           
 void endPrefixMapping(String prefix)
           
 Locator getDocumentLocator()
           
 ContentHandler getSideHandler()
           
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void setDocumentLocator(Locator locator)
           
 void startDocument()
           
 void startElement(String uri, String localName, String qName, Attributes atts)
           
 void startForking(String uri, String localName, String qName, Attributes atts, ContentHandler side)
          Starts the event forking.
 void startPrefixMapping(String prefix, String uri)
           
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForkingFilter

public ForkingFilter()

ForkingFilter

public ForkingFilter(ContentHandler next)
Method Detail

getSideHandler

public ContentHandler getSideHandler()

setDocumentLocator

public void setDocumentLocator(Locator locator)
Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class XMLFilterImpl

getDocumentLocator

public Locator getDocumentLocator()

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class XMLFilterImpl
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class XMLFilterImpl
Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class XMLFilterImpl
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
Overrides:
endPrefixMapping in class XMLFilterImpl
Throws:
SAXException

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class XMLFilterImpl
Throws:
SAXException

startForking

public void startForking(String uri,
                         String localName,
                         String qName,
                         Attributes atts,
                         ContentHandler side)
                  throws SAXException
Starts the event forking.

Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class XMLFilterImpl
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class XMLFilterImpl
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
Overrides:
ignorableWhitespace in class XMLFilterImpl
Throws:
SAXException