oracle.cle.util.xml
Class CLEDefaultHandler

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--oracle.cle.util.xml.CLEDefaultHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public abstract class CLEDefaultHandler
extends org.xml.sax.helpers.DefaultHandler

This class is a superclass for classes used to load an XML document
Extend this class to load and XML document specific to your needs
i.e. XMLServiceLoader, XMLDisplayGroupLoader, etc


Field Summary
protected  java.lang.String dtdName
           
protected static java.lang.String ELEMENT_NAME
          Constant for retrieving the Attribute Hashtable element that contains the element name for the attributes.
protected static int TYPE
          Constants for accessing the array that comes out of the Attribute Hashtable
protected static int VALUE
           
 
Constructor Summary
CLEDefaultHandler()
           
 
Method Summary
 void debug(java.lang.String text)
          a simple way to print some debug messages out
abstract  void endElement(java.lang.String namespaceURI, java.lang.String name, java.lang.String qualifiedName)
          Handle the closing of an element.
 void error(org.xml.sax.SAXParseException exception)
          Forward notification of a parsing error to the application supplied
error handler (if any).
 void fatalError(org.xml.sax.SAXParseException exception)
          Forward notification of a fatal parsing error to the application supplied
error handler (if any).
protected  java.lang.String getClassname()
           
 void log(java.lang.String message)
          Log a message to the log writer associated with this context.
 void log(java.lang.String message, java.lang.Throwable exception)
          Log a message and associated exception to the log writer
associated with this context.
protected  java.util.Hashtable makeAttributeTable(java.lang.String elementName, org.xml.sax.Attributes attributes)
          Make a Hastable out of the specified XML Attributes.
The resulting table will have separate entries for each attribute keyed by name with a String array for the value.
The values are: [x][0]=XML type string and [x][1]=String value.
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          Resolve the requested external entity.
abstract  void startElement(java.lang.String uri, java.lang.String name, java.lang.String qualifiedName, org.xml.sax.Attributes attributes)
          Handle the starting of an element as required by your class
 void warning(org.xml.sax.SAXParseException exception)
          Forward notification of a parse warning to the application supplied
error handler (if any).
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

protected static final int TYPE
Constants for accessing the array that comes out of the Attribute Hashtable

VALUE

protected static final int VALUE

ELEMENT_NAME

protected static final java.lang.String ELEMENT_NAME
Constant for retrieving the Attribute Hashtable element that contains the element name for the attributes.

dtdName

protected java.lang.String dtdName
Constructor Detail

CLEDefaultHandler

public CLEDefaultHandler()
Method Detail

startElement

public abstract void startElement(java.lang.String uri,
                                  java.lang.String name,
                                  java.lang.String qualifiedName,
                                  org.xml.sax.Attributes attributes)
                           throws org.xml.sax.SAXException
Handle the starting of an element as required by your class
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public abstract void endElement(java.lang.String namespaceURI,
                                java.lang.String name,
                                java.lang.String qualifiedName)
                         throws org.xml.sax.SAXException
Handle the closing of an element. In general, attribute map tables are popped off the element stack
and dealt with according to the type of element it represents.
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

makeAttributeTable

protected java.util.Hashtable makeAttributeTable(java.lang.String elementName,
                                                 org.xml.sax.Attributes attributes)
Make a Hastable out of the specified XML Attributes.
The resulting table will have separate entries for each attribute keyed by name with a String array for the value.
The values are: [x][0]=XML type string and [x][1]=String value. The element's name is also added to the table keyed by the ELEMENT_NAME constant and with a single String value representing the name of the element.

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException
Resolve the requested external entity.
Overrides:
resolveEntity in class org.xml.sax.helpers.DefaultHandler
Parameters:
publicId - The public identifier of the entity being referenced
systemId - The system identifier of the entity being referenced
Throws:
org.xml.sax.SAXException - if a parsing exception occurs

error

public void error(org.xml.sax.SAXParseException exception)
           throws org.xml.sax.SAXException
Forward notification of a parsing error to the application supplied
error handler (if any).
Overrides:
error in class org.xml.sax.helpers.DefaultHandler
Parameters:
exception - The error information
Throws:
org.xml.sax.SAXException - if a parsing exception occurs

fatalError

public void fatalError(org.xml.sax.SAXParseException exception)
                throws org.xml.sax.SAXException
Forward notification of a fatal parsing error to the application supplied
error handler (if any).
Overrides:
fatalError in class org.xml.sax.helpers.DefaultHandler
Parameters:
exception - The fatal error informati
Throws:
org.xml.sax.SAXException - if a parsing exception occurs

warning

public void warning(org.xml.sax.SAXParseException exception)
             throws org.xml.sax.SAXException
Forward notification of a parse warning to the application supplied
error handler (if any).
Overrides:
warning in class org.xml.sax.helpers.DefaultHandler
Parameters:
exception - The warning information
Throws:
org.xml.sax.SAXException - if a parsing exception occurs

log

public void log(java.lang.String message)
Log a message to the log writer associated with this context.
Parameters:
message - The message to be logged

log

public void log(java.lang.String message,
                java.lang.Throwable exception)
Log a message and associated exception to the log writer
associated with this context.
Parameters:
message - The message to be logged
exception - The associated exception to be logged

debug

public void debug(java.lang.String text)
a simple way to print some debug messages out

getClassname

protected final java.lang.String getClassname()


Copyright © 2003 ORACLE Corp. All Rights Reserved.