edu.ou.kmi.buddyspace.xml
Class XMLFileDocHandler

java.lang.Object
  |
  +--SubHandler
        |
        +--edu.ou.kmi.buddyspace.xml.XMLFileDocHandler

public class XMLFileDocHandler
extends SubHandler

Main file handler given to a SAX-enabled parser.

See Also:
Serialized Form

Field Summary
protected  edu.ou.kmi.buddyspace.xml.XMLFileDocInterface isi
          instantiating handler, used for sending messages back up the pipe.
 
Constructor Summary
XMLFileDocHandler()
          Creates a new XMLFileDocHandler instance.
 
Method Summary
 void handleEndElement(java.lang.String name)
          handleEndElement method
 void handleStartElement(java.lang.String name, org.xml.sax.AttributeList attributes)
          handle the start of an element, including finding an appropriate handler for the element or namespace type
 void receiveChildData(SubHandler subHandler, java.lang.Object p)
          receiveChildData receives packets constructed by the subordinate handlers, and shuttles it to the protocol handler
 void setDataHandler(edu.ou.kmi.buddyspace.xml.XMLFileDocInterface isi)
          set the XMLFileDocInterface, used to inform client code of new received data.
 java.lang.Object stopHandler(java.lang.String name)
          stopHandler returns null since there is no 'data' returned which was not already sent via the 'receive' method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isi

protected edu.ou.kmi.buddyspace.xml.XMLFileDocInterface isi
instantiating handler, used for sending messages back up the pipe.

Constructor Detail

XMLFileDocHandler

public XMLFileDocHandler()
Creates a new XMLFileDocHandler instance.

Method Detail

setDataHandler

public final void setDataHandler(edu.ou.kmi.buddyspace.xml.XMLFileDocInterface isi)
set the XMLFileDocInterface, used to inform client code of new received data.

Parameters:
isi - XMLFileDocInterface

handleStartElement

public void handleStartElement(java.lang.String name,
                               org.xml.sax.AttributeList attributes)
                        throws org.xml.sax.SAXException
handle the start of an element, including finding an appropriate handler for the element or namespace type

Parameters:
name - element name
attributes - element attributes
Throws:
org.xml.sax.SAXException - unknown root element, or XML parsing error

handleEndElement

public final void handleEndElement(java.lang.String name)
                            throws org.xml.sax.SAXException
handleEndElement method

Parameters:
name - a String value
Throws:
org.xml.sax.SAXException - if an error occurs

receiveChildData

public void receiveChildData(SubHandler subHandler,
                             java.lang.Object p)
                      throws org.xml.sax.SAXException
receiveChildData receives packets constructed by the subordinate handlers, and shuttles it to the protocol handler

Parameters:
subHandler - a SubHandler value of the handler the data came from, unused
p - an Object value, a Packet
Throws:
org.xml.sax.SAXException - if the data is invalid (i.e. null)

stopHandler

public final java.lang.Object stopHandler(java.lang.String name)
                                   throws org.xml.sax.SAXException
stopHandler returns null since there is no 'data' returned which was not already sent via the 'receive' method.

Returns:
an Object value, unused.
Throws:
org.xml.sax.SAXException - if an error occurs