no.feide.moria.servlet
Class BackendStatusHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by no.feide.moria.servlet.BackendStatusHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class BackendStatusHandler
extends org.xml.sax.helpers.DefaultHandler

Version:
$Revision: 1.2 $ The BackendStatusHandler class extends the xml DefaultHandler to read the status xml file.
Author:
Eva Indal

Field Summary
private  java.util.HashMap bsdata
          Hash map of parsed users.
private  java.lang.String currentchars
          String value of current attribute.
private  BackendStatusUser currentuser
          The user being parsed.
 
Constructor Summary
BackendStatusHandler()
          Constructor.
 
Method Summary
 void characters(char[] buf, int offset, int len)
          Implements callback that is called to process data for an element.
 void endDocument()
          Implements callback that is called at end of document.
 void endElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName)
          Implements callback that is called at end of an xml element.
 java.util.HashMap getAttribs()
          Gets parsed attributes.
 void startDocument()
          Implements callback that is called at start of document.
 void startElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName, org.xml.sax.Attributes attrs)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bsdata

private java.util.HashMap bsdata
Hash map of parsed users.


currentuser

private BackendStatusUser currentuser
The user being parsed.


currentchars

private java.lang.String currentchars
String value of current attribute.

Constructor Detail

BackendStatusHandler

public BackendStatusHandler()
Constructor.

Method Detail

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Implements callback that is called at start of document. Empty for now.

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - Required by interface.

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Implements callback that is called at end of document. Empty for now.

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - Required by interface.

startElement

public final void startElement(java.lang.String namespaceURI,
                               java.lang.String sName,
                               java.lang.String qName,
                               org.xml.sax.Attributes attrs)
                        throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public final void endElement(java.lang.String namespaceURI,
                             java.lang.String sName,
                             java.lang.String qName)
                      throws org.xml.sax.SAXException
Implements callback that is called at end of an xml element.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
namespaceURI - Namespace URI.
sName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
qName - The qualified XML 1.0 name (with prefix), or the empty string if qualified names are not available.
Throws:
org.xml.sax.SAXException - Required by interface.
See Also:
for information about the parameters

characters

public final void characters(char[] buf,
                             int offset,
                             int len)
                      throws org.xml.sax.SAXException
Implements callback that is called to process data for an element.

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
buf - The characters.
offset - The start position in the character array.
len - The number of characters to use from the character array.
Throws:
org.xml.sax.SAXException - Required by interface.
See Also:
for information about the parameters

getAttribs

public final java.util.HashMap getAttribs()
Gets parsed attributes. Each element in the returned HashMap is an AttribsData instance

Returns:
The parsed attributes.


Copyright © 2001-2006 UNINETT FAS. All Rights Reserved.