org.inria.ns.reflex.xml.sax
Class SAXMultihandler

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by org.inria.ns.reflex.xml.sax.SAXFilter
          extended by org.inria.ns.reflex.xml.sax.SAXMultihandler
All Implemented Interfaces:
Localizable, ContentHandler, DTDHandler, EntityResolver, ErrorHandler, DeclHandler, LexicalHandler, XMLFilter, XMLReader

public class SAXMultihandler
extends SAXFilter

SAXMultihandler fire the SAX events it receives to multiple handlers.

Author:
Philippe Poulard

Constructor Summary
SAXMultihandler(List handlers, ParserConfiguration parserConfiguration)
          Create a filter.
 
Method Summary
 void attributeDecl(String eName, String aName, String type, String valueDefault, String value)
          Fire a SAX event.
 void characters(char[] ch, int start, int length)
           
 void comment(char[] ch, int start, int length)
          Fire a SAX event.
 void elementDecl(String name, String model)
          Fire a SAX event.
 void endCDATA()
          Fire a SAX event.
 void endDocument()
          Fires an end document event if well balanced with the SAXFilter.startDocument().
 void endDTD()
          Fire a SAX event.
 void endElement(String uri, String localName, String qName)
           
 void endEntity(String name)
          Fire a SAX event.
 void endPrefixMapping(String prefix)
           
 void externalEntityDecl(String name, String publicId, String systemId)
          Fire a SAX event.
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void internalEntityDecl(String name, String value)
          Fire a SAX event.
 void notationDecl(String name, String publicId, String systemId)
           
 void processingInstruction(String target, String data)
           
 void skippedEntity(String name)
           
 void startCDATA()
          Fire a SAX event.
 void startDocument()
          Fires a start document event.
 void startDTD(String name, String publicId, String systemId)
          Fire a SAX event.
 void startElement(String uri, String localName, String qName, Attributes atts)
           
 void startEntity(String name)
          Fire a SAX event.
 void startPrefixMapping(String prefix, String uri)
           
 void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
           
 
Methods inherited from class org.inria.ns.reflex.xml.sax.SAXFilter
getDeclHandler, getLexicalHandler, getLocation, getProperty, isLocalizable, parse, setDeclHandler, setLexicalHandler, setLocation, setProperty
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, parse, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
setDocumentLocator
 

Constructor Detail

SAXMultihandler

public SAXMultihandler(List handlers,
                       ParserConfiguration parserConfiguration)
Create a filter.

Parameters:
handlers - A list of handlers.
configuration - The non-null configuration expected for the parser, if one is needed.
See Also:
ContentHandler, DTDHandler, LexicalHandler, DeclHandler
Method Detail

attributeDecl

public void attributeDecl(String eName,
                          String aName,
                          String type,
                          String valueDefault,
                          String value)
                   throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
attributeDecl in interface DeclHandler
Overrides:
attributeDecl in class SAXFilter
Throws:
SAXException
See Also:
DeclHandler.attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
comment in interface LexicalHandler
Overrides:
comment in class SAXFilter
Throws:
SAXException
See Also:
LexicalHandler.comment(char[], int, int)

elementDecl

public void elementDecl(String name,
                        String model)
                 throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
elementDecl in interface DeclHandler
Overrides:
elementDecl in class SAXFilter
Throws:
SAXException
See Also:
DeclHandler.elementDecl(java.lang.String, java.lang.String)

endCDATA

public void endCDATA()
              throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
endCDATA in interface LexicalHandler
Overrides:
endCDATA in class SAXFilter
Throws:
SAXException
See Also:
LexicalHandler.endCDATA()

endDTD

public void endDTD()
            throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
endDTD in interface LexicalHandler
Overrides:
endDTD in class SAXFilter
Throws:
SAXException
See Also:
LexicalHandler.endDTD()

endEntity

public void endEntity(String name)
               throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
endEntity in interface LexicalHandler
Overrides:
endEntity in class SAXFilter
Throws:
SAXException
See Also:
LexicalHandler.endEntity(java.lang.String)

externalEntityDecl

public void externalEntityDecl(String name,
                               String publicId,
                               String systemId)
                        throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
externalEntityDecl in interface DeclHandler
Overrides:
externalEntityDecl in class SAXFilter
Throws:
SAXException
See Also:
DeclHandler.externalEntityDecl(java.lang.String, java.lang.String, java.lang.String)

internalEntityDecl

public void internalEntityDecl(String name,
                               String value)
                        throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
internalEntityDecl in interface DeclHandler
Overrides:
internalEntityDecl in class SAXFilter
Throws:
SAXException
See Also:
DeclHandler.internalEntityDecl(java.lang.String, java.lang.String)

startCDATA

public void startCDATA()
                throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
startCDATA in interface LexicalHandler
Overrides:
startCDATA in class SAXFilter
Throws:
SAXException
See Also:
LexicalHandler.startCDATA()

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
              throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
startDTD in interface LexicalHandler
Overrides:
startDTD in class SAXFilter
Throws:
SAXException
See Also:
LexicalHandler.startDTD(java.lang.String, java.lang.String, java.lang.String)

startEntity

public void startEntity(String name)
                 throws SAXException
Description copied from class: SAXFilter
Fire a SAX event.

Specified by:
startEntity in interface LexicalHandler
Overrides:
startEntity in class SAXFilter
Throws:
SAXException
See Also:
LexicalHandler.startEntity(java.lang.String)

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

endDocument

public void endDocument()
                 throws SAXException
Description copied from class: SAXFilter
Fires an end document event if well balanced with the SAXFilter.startDocument().

Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class SAXFilter
Throws:
SAXException - The client may throw an exception during processing.
See Also:
ContentHandler.endDocument()

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

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
Overrides:
endPrefixMapping 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

notationDecl

public void notationDecl(String name,
                         String publicId,
                         String systemId)
                  throws SAXException
Specified by:
notationDecl in interface DTDHandler
Overrides:
notationDecl in class XMLFilterImpl
Throws:
SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
Specified by:
processingInstruction in interface ContentHandler
Overrides:
processingInstruction in class XMLFilterImpl
Throws:
SAXException

skippedEntity

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

startDocument

public void startDocument()
                   throws SAXException
Description copied from class: SAXFilter
Fires a start document event. If this method is called several times, only the first invokation will fire the event. Other events are tracked, so that only the balanced end event will be fired.

Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class SAXFilter
Throws:
SAXException - The client may throw an exception during processing.
See Also:
ContentHandler.startDocument()

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

startPrefixMapping

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

unparsedEntityDecl

public void unparsedEntityDecl(String name,
                               String publicId,
                               String systemId,
                               String notationName)
                        throws SAXException
Specified by:
unparsedEntityDecl in interface DTDHandler
Overrides:
unparsedEntityDecl in class XMLFilterImpl
Throws:
SAXException