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

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

public class SAXDocument
extends SAXSafeDocument
implements LexicalHandler, ContentHandler, DTDHandler, StandaloneProducer

A SAXDocument is an XML document producer that must be consumed by a client component.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.xml.sax.StandaloneProducer
StandaloneProducer.Impl
 
Constructor Summary
SAXDocument(XMLDocument document, DataSet dataSet)
          Create a SAX document.
 
Method Summary
 void parse()
          This method is called when a client component needs to consume the SAX events.
 void parse(InputSource input)
          Call parse()
 void parse(String systemId)
          Call parse()
static void setGuard(XMLContext.Guard guard)
          Set a guard to this class ; the guard enable the creation of new SAX and DOM contexts.
 String toString()
          Return the string value of the underlying XML action.
 
Methods inherited from class org.inria.ns.reflex.xml.sax.SAXSafeDocument
characters, endDTD, startDTD, startElement
 
Methods inherited from class org.inria.ns.reflex.xml.sax.SAXFilter
attributeDecl, comment, elementDecl, endCDATA, endDocument, endEntity, externalEntityDecl, getDeclHandler, getLexicalHandler, getLocation, getProperty, internalEntityDecl, isLocalizable, setDeclHandler, setLexicalHandler, setLocation, setProperty, startCDATA, startDocument, startEntity
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.DTDHandler
notationDecl, unparsedEntityDecl
 
Methods inherited from interface org.xml.sax.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty
 

Constructor Detail

SAXDocument

public SAXDocument(XMLDocument document,
                   DataSet dataSet)
Create a SAX document.

Parameters:
document - The wrapped document that can deliver the content of this document.
dataSet - The data set to use to perform subactions.
Method Detail

setGuard

public static void setGuard(XMLContext.Guard guard)
Set a guard to this class ; the guard enable the creation of new SAX and DOM contexts.

Parameters:
guard - The non-null guard.

parse

public void parse(InputSource input)
           throws SAXException,
                  IOException
Call parse()

Specified by:
parse in interface XMLReader
Overrides:
parse in class XMLFilterImpl
Parameters:
input - Unused.
Throws:
SAXException - When a SAX exception occurs.
IOException - Never thrown.

parse

public void parse(String systemId)
           throws SAXException,
                  IOException
Call parse()

Specified by:
parse in interface XMLReader
Overrides:
parse in class SAXFilter
Parameters:
systemId - Unused.
Throws:
SAXException - When a SAX exception occurs.
IOException - Never thrown.
See Also:
XMLFilterImpl.parse(java.lang.String)

parse

public void parse()
           throws SAXException
This method is called when a client component needs to consume the SAX events.

Specified by:
parse in interface StandaloneProducer
Throws:
SAXException - If something wrong occurs.

toString

public String toString()
Return the string value of the underlying XML action.

Overrides:
toString in class Object
See Also:
XMLDocument, AbstractAction.toString(), Object.toString()