oracle.cabo.share.xml
Class BaseParserExtension
java.lang.Object
|
+--oracle.cabo.share.xml.BaseParserExtension
- All Implemented Interfaces:
- ParserExtension
- Direct Known Subclasses:
- BajaParserExtension, JboParserExtension, JboParserExtensionImpl
- public class BaseParserExtension
- extends java.lang.Object
- implements ParserExtension
Base implementation of ParserExtension.
Method Summary |
java.lang.Object |
elementEnded(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.Object parsed,
java.util.Dictionary attributes)
Called after parsing of the parent element has completed
with extension values still to be processed. |
void |
elementStarted(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
java.util.Dictionary attributes)
Called before parsing of the parent element has started. |
protected void |
logError(ParseContext context,
java.lang.String message,
java.lang.Exception e)
|
protected void |
logWarning(ParseContext context,
java.lang.String message)
|
protected void |
logWarning(ParseContext context,
java.lang.String message,
java.lang.Exception e)
|
NodeParser |
startExtensionElement(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
org.xml.sax.Attributes attrs)
Called to notify that a child element has been found
that was not handled by the outer parser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseParserExtension
public BaseParserExtension()
elementStarted
public void elementStarted(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
java.util.Dictionary attributes)
throws org.xml.sax.SAXParseException
- Called before parsing of the parent element has started.
- Specified by:
elementStarted
in interface ParserExtension
- Parameters:
context
- the parsing contextnamespaceURI
- the namespace of the element being processedlocalName
- the local name of the elementattributes
- a Dictionary of all the attributes in the
namespace of this extension
startExtensionElement
public NodeParser startExtensionElement(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXParseException
- Called to notify that a child element has been found
that was not handled by the outer parser. If a NodeParser
is returned here, it will be used for handling that child element,
and the value it returns will be stored in the Dictionary eventually
passed to "elementEnded".
- Specified by:
startExtensionElement
in interface ParserExtension
- Parameters:
context
- the parsing contextnamespaceURI
- the namespace of the child elementlocalName
- the local name of the elementattrs
- the attributes attached to the element.- Returns:
- a node parser if one should be used, or null otherwise
elementEnded
public java.lang.Object elementEnded(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.Object parsed,
java.util.Dictionary attributes)
throws org.xml.sax.SAXParseException
- Called after parsing of the parent element has completed
with extension values still to be processed.
- Specified by:
elementEnded
in interface ParserExtension
- Parameters:
context
- the parsing contextnamespaceURI
- the namespace of the element being processedlocalName
- the local name of the elementparsed
- the object instantiated for the elementattributes
- a Dictionary of all the attributes in the
namespace of this extension
logWarning
protected final void logWarning(ParseContext context,
java.lang.String message)
logWarning
protected void logWarning(ParseContext context,
java.lang.String message,
java.lang.Exception e)
logError
protected void logError(ParseContext context,
java.lang.String message,
java.lang.Exception e)
throws org.xml.sax.SAXParseException