de.knup.jedi.jayshare.sax
Class UserListHandler

java.lang.Object
  |
  +--org.xml.sax.HandlerBase
        |
        +--de.knup.jedi.jayshare.sax.UserListHandler

public class UserListHandler
extends HandlerBase

SAX Handler for parsing a <userlist>.

Version:
0.1 $Revision: 1.8 $
Author:
B. Pietsch

Field Summary
private  FileItem currentFile
          Current file item to be parsed.
private  OwnedFileList currentList
          Current file list to be parsed.
private  XTag currentXTag
          Current x-tag to be parsed.
private  java.lang.StringBuffer elementChars
          Data buffer.
private  UserList userList
          <userlist> representing the XML document.
 
Constructor Summary
UserListHandler()
          Create a &tl;userlist> handler instance.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Buffer data.
 void endElement(java.lang.String name)
          Receive notification of the end of an element.
 UserList getUserList()
           
 void ignorableWhitespace(char[] ch, int start, int length)
          Receive notification of ignorable whitespace in element content.
 void startElement(java.lang.String name, AttributeList attributes)
          Receive notification of the start of an element.
 
Methods inherited from class org.xml.sax.HandlerBase
endDocument, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, startDocument, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

currentList

private OwnedFileList currentList
Current file list to be parsed.

currentFile

private FileItem currentFile
Current file item to be parsed.

currentXTag

private XTag currentXTag
Current x-tag to be parsed.

userList

private UserList userList
<userlist> representing the XML document.

elementChars

private java.lang.StringBuffer elementChars
Data buffer.
Constructor Detail

UserListHandler

public UserListHandler()
Create a &tl;userlist> handler instance.
Method Detail

getUserList

public UserList getUserList()
Returns:
the parsed userlist.

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Buffer data.
Overrides:
characters in class HandlerBase
Tags copied from class: HandlerBase
Parameters:
ch - The characters.
start - The start position in the character array.
length - The number of characters to use from the character array.
Throws:
SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
DocumentHandler.characters(char[], int, int)

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Description copied from class: HandlerBase
Receive notification of ignorable whitespace in element content.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of ignorable whitespace (such as adding data to a node or buffer, or printing it to a file).

Overrides:
ignorableWhitespace in class HandlerBase
Tags copied from class: HandlerBase
Parameters:
ch - The whitespace characters.
start - The start position in the character array.
length - The number of characters to use from the character array.
Throws:
SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
DocumentHandler.ignorableWhitespace(char[], int, int)

startElement

public void startElement(java.lang.String name,
                         AttributeList attributes)
                  throws SAXException
Description copied from class: HandlerBase
Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

Overrides:
startElement in class HandlerBase
Tags copied from class: HandlerBase
Parameters:
name - The element type name.
attributes - The specified or defaulted attributes.
Throws:
SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
DocumentHandler.startElement(java.lang.String, org.xml.sax.AttributeList)

endElement

public void endElement(java.lang.String name)
                throws SAXException
Description copied from class: HandlerBase
Receive notification of the end of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

Overrides:
endElement in class HandlerBase
Tags copied from class: HandlerBase
Parameters:
name - The element type name.
attributes - The specified or defaulted attributes.
Throws:
SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
DocumentHandler.endElement(java.lang.String)