org.pf.pax
Class BaseXMLTagInterpreterController

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.pf.pax.BaseXMLTagInterpreterController
All Implemented Interfaces:
XMLTagInterpreterController, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Direct Known Subclasses:
XMLWriteController

public abstract class BaseXMLTagInterpreterController
extends org.xml.sax.helpers.DefaultHandler
implements XMLTagInterpreterController

This defines the API for classes that can create tag interpreter in instances for specific tag names in a defined tag set.

Version:
2.1
Author:
Manfred Duchrow

Constructor Summary
BaseXMLTagInterpreterController()
          Initializes the instance variables with default values.
BaseXMLTagInterpreterController(org.xml.sax.XMLReader xmlReader)
          Initializes the instance variables with default values.
 
Method Summary
 org.xml.sax.XMLReader getXmlReader()
          Returns the XML reader that will be used to parse XML streams
 void returnControl(java.lang.Object result)
          Gives back the control of the element interpretation to the receiver.
 void setXmlReader(org.xml.sax.XMLReader aReader)
          Sets the XML reader that will be used to parse XML streams
 void startElement(java.lang.String name, org.xml.sax.Attributes attributes)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
          Supports SAX 2.0
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, 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.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
 

Constructor Detail

BaseXMLTagInterpreterController

public BaseXMLTagInterpreterController()
Initializes the instance variables with default values.
Subclasses, that are overriding this constructor must call super() in the first line of their constructor !


BaseXMLTagInterpreterController

public BaseXMLTagInterpreterController(org.xml.sax.XMLReader xmlReader)
Initializes the instance variables with default values.
Subclasses, that are overriding this constructor must call super(parser) in the first line of their constructor !

Parameters:
xmlReader - The SAX reader that reads the XML source.
Method Detail

returnControl

public void returnControl(java.lang.Object result)
                   throws org.xml.sax.SAXException
Gives back the control of the element interpretation to the receiver.
The controller than takes the last tag interpreter from its stack and passes over control to it.

Specified by:
returnControl in interface XMLTagInterpreterController
Parameters:
result - The result of a sub tag interpretation.
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Supports SAX 2.0

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.startElement(String,String,String,Attributes)

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getXmlReader

public org.xml.sax.XMLReader getXmlReader()
Returns the XML reader that will be used to parse XML streams


setXmlReader

public void setXmlReader(org.xml.sax.XMLReader aReader)
Sets the XML reader that will be used to parse XML streams

Parameters:
aReader - The reader this controller should use to parse XML streams