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

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.StandaloneProducer.Impl
              extended by org.inria.ns.reflex.xml.sax.SAXAggregator
All Implemented Interfaces:
Localizable, StandaloneProducer, ContentHandler, DTDHandler, EntityResolver, ErrorHandler, DeclHandler, LexicalHandler, XMLFilter, XMLReader

public class SAXAggregator
extends StandaloneProducer.Impl
implements StandaloneProducer

A standalone SAX event producer that concatenate several SAX sources.

The consumer will receive as many start and end document events as there are inputs.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.xml.sax.StandaloneProducer
StandaloneProducer.Impl
 
Constructor Summary
SAXAggregator(List readers)
          Aggregate a list of XMLReader.
 
Method Summary
 void parse()
          Fire SAX events produced by each XMLReader.
 
Methods inherited from class org.inria.ns.reflex.xml.sax.StandaloneProducer.Impl
parse, parse
 
Methods inherited from class org.inria.ns.reflex.xml.sax.SAXFilter
attributeDecl, comment, elementDecl, endCDATA, endDocument, endDTD, endEntity, externalEntityDecl, getDeclHandler, getLexicalHandler, getLocation, getProperty, internalEntityDecl, isLocalizable, setDeclHandler, setLexicalHandler, setLocation, setProperty, startCDATA, startDocument, startDTD, startEntity
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, skippedEntity, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parse, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.DTDHandler
notationDecl, unparsedEntityDecl
 

Constructor Detail

SAXAggregator

public SAXAggregator(List readers)
Aggregate a list of XMLReader.

Parameters:
readers - The list of XML readers to "merge". Each XMLReader must be themselves standalone SAX event producer, that is to say that their input is already known.
Method Detail

parse

public void parse()
           throws SAXException
Fire SAX events produced by each XMLReader.

Specified by:
parse in interface StandaloneProducer
Throws:
SAXException - When one of the XMLReader fails.