net.rim.device.api.xml.jaxp
Class WBXMLCodeBookCreationHandler

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--net.rim.device.api.xml.jaxp.WBXMLCodeBookCreationHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, RIMWBXMLHandler

public class WBXMLCodeBookCreationHandler
extends DefaultHandler
implements RIMWBXMLHandler

The WBXMLCodeBookCreationHandler class is a SAX handler for parsing WBXML codebooks. Generally it is only used internally but other programs can use it as well to parse their codebook and get the mappings back by calling the getXXXXTable() functions.

The mappings are used by the WBXML parser.

Since:
JDE 4.0.0

Constructor Summary
WBXMLCodeBookCreationHandler()
          Constructs an instance of a WBXMLCodeBookCreationHandler.
 
Method Summary
 void endElement(int ElementCode, String uri, String localName, String qName)
          Receives notification of the end of an element.
 IntHashtable getAttrStartTable()
          Retrieve the attribute start tables parsed as a IntHashtable.
 IntHashtable getAttrValueTable()
          Retrieves the attribute value tables parsed as a IntHashtable.
 long getCodeBookHash()
          Retrieve the codebook hash.
 String getCodeBookID()
          Retrieve the codebook ID.
 IntHashtable getTagTable()
          Retrieve the tag tables parsed as a IntHashtable.
 void startElement(int ElementCode, String uri, String localName, String qName, Attributes attributes)
          Implements the SAX parser startElement() method in DefaultHandler to implement parsing of the codebook.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBXMLCodeBookCreationHandler

public WBXMLCodeBookCreationHandler()
Constructs an instance of a WBXMLCodeBookCreationHandler.
Since:
JDE 4.0.0
Method Detail

endElement

public void endElement(int ElementCode,
                       String uri,
                       String localName,
                       String qName)
                throws SAXException
Description copied from interface: RIMWBXMLHandler
Receives notification of the end of an element.

By default, does nothing. Applications might 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.

Since:
JDE 4.0.0
See Also:
RIMWBXMLHandler

getAttrStartTable

public IntHashtable getAttrStartTable()
Retrieve the attribute start tables parsed as a IntHashtable.
Returns:
An IntHashtable of the attribute start table that defines the names of the attributes.
Since:
JDE 4.0.0

getAttrValueTable

public IntHashtable getAttrValueTable()
Retrieves the attribute value tables parsed as a IntHashtable.
Returns:
An IntHashtable of the attribute value table that defines the values of the attributes.
Since:
JDE 4.0.0

getCodeBookHash

public long getCodeBookHash()
Retrieve the codebook hash.
Returns:
The codebook hash if it exists in the codebook XML, or 0 otherwise.
Since:
JDE 4.0.0

getCodeBookID

public String getCodeBookID()
Retrieve the codebook ID.
Returns:
The codebook ID if it exists in the codebook XML, or null otherwise.
Since:
JDE 4.0.0

getTagTable

public IntHashtable getTagTable()
Retrieve the tag tables parsed as a IntHashtable.
Returns:
An IntHashtable of the tag table that defines the element values.
Since:
JDE 4.0.0

startElement

public void startElement(int ElementCode,
                         String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Implements the SAX parser startElement() method in DefaultHandler to implement parsing of the codebook. It is not intended to be called externally.
Since:
JDE 4.0.0
See Also:
RIMWBXMLHandler



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.