com.raritantechnologies.xml
Interface IHandler

All Superinterfaces:
org.xml.sax.ContentHandler, IConfigurable
All Known Implementing Classes:
FieldCollectorHandler

public interface IHandler
extends org.xml.sax.ContentHandler, IConfigurable

An interface for SAX content handlers that work with XMLResultFormatter.


Developed by Raritan Technologies .

Author:
Jim Nicholson

Method Summary
 void characters(char[] ch, int start, int length)
          Stuff those values into the HashMap
 void endDocument()
          End parsing operations
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Clean up and maybe go home.
 void endPrefixMapping(java.lang.String prefix)
          Rid ourselves of one of those pesky namespace mappings.
 java.util.Map getFieldMap()
           
 void init()
           
 void initialize(org.w3c.dom.Element elem)
          Set up the configuration from the config file.
 boolean isComplete()
          Flag to determine if SAX parsing completed without problems.
 void setDocumentLocator(org.xml.sax.Locator newLocator)
          Set the locator for this SAX document
 void setFieldMap(java.util.Map fieldMap)
          Set the java.util.Map object to hold field/value mappings.
 void startDocument()
          Begin parsing operations
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Find and store some fields.
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          Save any namespace mappings found in case someone is interested in them.
 
Methods inherited from interface org.xml.sax.ContentHandler
ignorableWhitespace, processingInstruction, skippedEntity
 

Method Detail

init

public void init()

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator newLocator)
Set the locator for this SAX document

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
See Also:
ContentHandler.setDocumentLocator(org.xml.sax.Locator)

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Begin parsing operations

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.startDocument()

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
End parsing operations

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.endDocument()

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
Save any namespace mappings found in case someone is interested in them.

Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.startPrefixMapping(java.lang.String, java.lang.String)

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws org.xml.sax.SAXException
Rid ourselves of one of those pesky namespace mappings.

Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.endPrefixMapping(java.lang.String)

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Find and store some fields.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Clean up and maybe go home.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Stuff those values into the HashMap

Specified by:
characters in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.characters(char[], int, int)

isComplete

public boolean isComplete()
Flag to determine if SAX parsing completed without problems.

Returns:
Returns
true
if SAX parsing completed with an exception.

getFieldMap

public java.util.Map getFieldMap()
Returns:
Returns the fieldMap.

setFieldMap

public void setFieldMap(java.util.Map fieldMap)
Set the java.util.Map object to hold field/value mappings.

Parameters:
fieldMap - The fieldMap to set.

initialize

public void initialize(org.w3c.dom.Element elem)
Set up the configuration from the config file.

Specified by:
initialize in interface IConfigurable
See Also:
IConfigurable.initialize(org.w3c.dom.Element)