com.infoengine.connector
Class XMLHandler

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended bycom.infoengine.connector.XMLHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

class XMLHandler
extends DefaultHandler

SAX handler to populate lightweight Info*Engine group implementation


Nested Class Summary
private  class XMLHandler.ObjectFactory
           
 
Field Summary
private static String ATTRIBUTE
           
private  String attState
           
private  Stack charsStack
           
private static String COLLECTION
           
private  Stack contentTypeStack
           
private  boolean debug
           
private  Group grp
           
private static String INSTANCE
           
private  Stack javaTypeStack
           
private  Log log
           
private static String MESSAGE
           
private static String META
           
private  Stack nestedElementStack
           
private  Object nilValue
           
private  Stack objectStack
           
private  Stack stateStack
           
private static int T_ATTRIBUTE
           
private static int T_COLLECTION
           
private static int T_ELEMENT
           
private static int T_GROUP
           
private static int T_MESSAGE
           
private static int T_META
           
private static int T_METAVAL
           
private static int T_UNKNOWN
           
private  Stack timeZoneStack
           
private  Stack typeStack
           
 
Constructor Summary
private XMLHandler(Log log)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String namespaceURI, String localName, String qName)
           
 void endPrefixMapping(String prefix)
           
private  Object getAttributeValue()
           
protected  Group getGroup()
           
static byte[] hexToByte(String s)
           
 void ignorableWhiteSpace(char[] ch, int start, int length)
           
(package private) static Group process(String xml, Log log)
           
 void processingInstruction(String target, String data)
           
 void skippedEntity(String name)
           
 void startDocument()
           
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
           
 void startPrefixMapping(String prefix, String uri)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, ignorableWhitespace, notationDecl, resolveEntity, setDocumentLocator, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

private boolean debug

log

private Log log

COLLECTION

private static final String COLLECTION
See Also:
Constant Field Values

INSTANCE

private static final String INSTANCE
See Also:
Constant Field Values

ATTRIBUTE

private static final String ATTRIBUTE
See Also:
Constant Field Values

META

private static final String META
See Also:
Constant Field Values

MESSAGE

private static final String MESSAGE
See Also:
Constant Field Values

T_UNKNOWN

private static final int T_UNKNOWN
See Also:
Constant Field Values

T_COLLECTION

private static final int T_COLLECTION
See Also:
Constant Field Values

T_GROUP

private static final int T_GROUP
See Also:
Constant Field Values

T_ELEMENT

private static final int T_ELEMENT
See Also:
Constant Field Values

T_ATTRIBUTE

private static final int T_ATTRIBUTE
See Also:
Constant Field Values

T_META

private static final int T_META
See Also:
Constant Field Values

T_MESSAGE

private static final int T_MESSAGE
See Also:
Constant Field Values

T_METAVAL

private static final int T_METAVAL
See Also:
Constant Field Values

typeStack

private Stack typeStack

objectStack

private Stack objectStack

nilValue

private Object nilValue

charsStack

private Stack charsStack

grp

private Group grp

contentTypeStack

private Stack contentTypeStack

javaTypeStack

private Stack javaTypeStack

timeZoneStack

private Stack timeZoneStack

attState

private String attState

nestedElementStack

private Stack nestedElementStack

stateStack

private Stack stateStack
Constructor Detail

XMLHandler

private XMLHandler(Log log)
Method Detail

process

static Group process(String xml,
                     Log log)
              throws Exception
Throws:
Exception

getGroup

protected Group getGroup()

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Throws:
SAXException

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
                throws SAXException
Throws:
SAXException

getAttributeValue

private Object getAttributeValue()
                          throws SAXException
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
Throws:
SAXException

ignorableWhiteSpace

public void ignorableWhiteSpace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Throws:
SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
Throws:
SAXException

skippedEntity

public void skippedEntity(String name)
                   throws SAXException
Throws:
SAXException

startDocument

public void startDocument()
                   throws SAXException
Throws:
SAXException

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Throws:
SAXException

hexToByte

public static byte[] hexToByte(String s)