Collaboration API Documentation

com.filenet.bso.api.util
Class BsoGenericSAXHandler

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--com.filenet.bso.api.util.BsoGenericSAXHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

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

The BsoGenericSAXHandlerclass marshals XML content into Java classes. The unmarshaling operation is driven by an array of BsoXPathDef objects that specify the objects to generate.

See Also:
BsoXMLBinder, BsoXMLMarshal, BsoXMLUnmarshal, BsoXMLWriter, BsoXPathDef

Field Summary
protected  java.lang.StringBuffer currentElementText
           
protected  java.lang.StringBuffer currentPath
           
protected  java.util.Stack elementStack
           
protected  java.util.Map pathMap
           
 
Constructor Summary
protected BsoGenericSAXHandler()
           
  BsoGenericSAXHandler(BsoXPathDef[] xpathDefinitions)
           
 
Method Summary
 void characters(char[] buf, int offset, int len)
           
 void endElement(java.lang.String uri, java.lang.String name, java.lang.String qName)
           
protected  BsoXPathDef getPathMatch()
           
 java.lang.Object getRootObject()
          Return the root object of the objects generated, users must cast the returned object.
protected  BsoXMLUnmarshal popElement()
           
protected  void popPath(java.lang.String elementName)
           
protected  void pushElement(BsoXMLUnmarshal element)
           
protected  void pushPath(java.lang.String elementName)
           
 void setEncoding(java.lang.String encoding)
          Set the character encoding for content.
 void startElement(java.lang.String uri, java.lang.String name, java.lang.String qName, org.xml.sax.Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentPath

protected java.lang.StringBuffer currentPath

pathMap

protected java.util.Map pathMap

elementStack

protected java.util.Stack elementStack

currentElementText

protected java.lang.StringBuffer currentElementText
Constructor Detail

BsoGenericSAXHandler

protected BsoGenericSAXHandler()

BsoGenericSAXHandler

public BsoGenericSAXHandler(BsoXPathDef[] xpathDefinitions)
Method Detail

getRootObject

public java.lang.Object getRootObject()
Return the root object of the objects generated, users must cast the returned object.

Returns:
The root object of the generated objects.

setEncoding

public void setEncoding(java.lang.String encoding)
Set the character encoding for content. If not set, the default encoding used is "UTF-8".

Parameters:
encoding - character encoding.

startElement

public void startElement(java.lang.String uri,
                         java.lang.String name,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String uri,
                       java.lang.String name,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

public void characters(char[] buf,
                       int offset,
                       int len)
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler

pushPath

protected void pushPath(java.lang.String elementName)

popPath

protected void popPath(java.lang.String elementName)

getPathMatch

protected BsoXPathDef getPathMatch()

popElement

protected BsoXMLUnmarshal popElement()

pushElement

protected void pushElement(BsoXMLUnmarshal element)

Collaboration API Documentation

Copyright © 2002 - 2004 FileNet Corporation. All rights reserved.