class XMLCallbackWrapper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
isMemptrInCharacterCallback
Character callback may use memptr and longchar in parameters, this variable will be
initialize once in constructor.
|
private boolean |
isMemptrInIgnorableWhitespaceCallback
IgnorableWhitespace callback may use memptr and longchar in parameters, this variable will
be initialize once in constructor.
|
private static java.util.logging.Logger |
LOG
Anonymous log instance.
|
private handle |
procHandle
The procedure name to be associated with the given handle object.
|
private handle |
saxReader
The SaxReader instance to be associated with the given handle object.
|
Constructor and Description |
---|
XMLCallbackWrapper(handle procHandle,
handle saxReader)
Default constructor accepting a handle to procedure and SaxReader instance.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(javax.xml.stream.events.Characters characters)
Receive notification of character data inside an element.
|
void |
endDocument()
Receive notification of the ending of the document.
|
void |
endElement(javax.xml.stream.events.EndElement endElement)
Receive notification of the end of an element.
|
void |
endPrefixMapping(java.lang.String prefix)
Receive notification of the end of a Namespace mapping.
|
void |
error(java.lang.String message)
Receive notification of a error messages.
|
java.lang.Boolean |
fatalError(java.lang.Exception e)
Receive notification of a fatal errors.
|
void |
ignorableWhitespace(javax.xml.stream.events.Characters characters)
Receive notification of ignorable whitespace in element content.
|
private java.lang.Boolean |
invokeProcedure(XMLCallbackWrapper.CallBack callBack,
java.lang.Object... args)
Method can invoke procedure callback and valid input parameters.
|
(package private) void |
notationDecl(javax.xml.stream.events.NotationDeclaration notationDeclaration)
Receive notification of a notation declaration.
|
void |
processingInstruction(javax.xml.stream.events.ProcessingInstruction pi)
Receive notification of a processing instruction.
|
(package private) org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Allow the application to resolve external entities.
|
(package private) void |
startDocument()
Receive notification of the beginning of the document.
|
void |
startElement(javax.xml.stream.events.StartElement startElement)
Receive notification of the start of an element.
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Receive notification of the start of a Namespace mapping.
|
private ControlFlowOps.ArgValidationErrors |
validateCallback(XMLCallbackWrapper.CallBack callBack,
java.lang.Object... args)
Check if an internal procedure or function is reachable and valid.
|
void |
warning(java.lang.String msg)
Receive notification of a warning messages.
|
private static final java.util.logging.Logger LOG
private final handle procHandle
private final handle saxReader
private final boolean isMemptrInCharacterCallback
private final boolean isMemptrInIgnorableWhitespaceCallback
XMLCallbackWrapper(handle procHandle, handle saxReader)
procHandle
- The procedure name to be associated with the given handle object.saxReader
- The SaxReader instance to be associated with the given handle object.void notationDecl(javax.xml.stream.events.NotationDeclaration notationDeclaration) throws javax.xml.stream.XMLStreamException
notationDeclaration
- NotationDeclaration xml event which provide all information about notation.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.void startDocument() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void endDocument() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws javax.xml.stream.XMLStreamException
prefix
- The Namespace prefix being declared.uri
- The Namespace URI mapped to the prefixjavax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void endPrefixMapping(java.lang.String prefix) throws javax.xml.stream.XMLStreamException
prefix
- The Namespace prefix being declared.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void startElement(javax.xml.stream.events.StartElement startElement) throws javax.xml.stream.XMLStreamException
startElement
- Provides access to information about start element.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void endElement(javax.xml.stream.events.EndElement endElement) throws javax.xml.stream.XMLStreamException
endElement
- Provides access to information about end element.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void characters(javax.xml.stream.events.Characters characters) throws javax.xml.stream.XMLStreamException
characters
- Provides access to information about characters element.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void ignorableWhitespace(javax.xml.stream.events.Characters characters) throws javax.xml.stream.XMLStreamException
characters
- Provides access to information about characters element.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void processingInstruction(javax.xml.stream.events.ProcessingInstruction pi) throws javax.xml.stream.XMLStreamException
pi
- An interface that describes the data found in processing instructions.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws javax.xml.stream.XMLStreamException
publicId
- The public identifier, or null if none is available.systemId
- The system identifier provided in the XML document.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void warning(java.lang.String msg) throws javax.xml.stream.XMLStreamException
msg
- warning messagejavax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public void error(java.lang.String message) throws javax.xml.stream.XMLStreamException
message
- error messagejavax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.public java.lang.Boolean fatalError(java.lang.Exception e) throws javax.xml.stream.XMLStreamException
e
- Fatal error exceptionnull
if the callback is not exists or a fatal error.
true
if the callback is successful executed but return some error.
false
if the callback is successful executed but doesn't return error.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.private java.lang.Boolean invokeProcedure(XMLCallbackWrapper.CallBack callBack, java.lang.Object... args) throws javax.xml.stream.XMLStreamException
callBack
- Callback entity.args
- Array of input/output arguments.null
if the callback is not exists or a fatal error.
true
if the callback is successful executed but return some error.
false
if the callback is successful executed but doesn't return error.javax.xml.stream.XMLStreamException
- if any problem in callback, i.e. mismatch parameters or wrong types in callback.private ControlFlowOps.ArgValidationErrors validateCallback(XMLCallbackWrapper.CallBack callBack, java.lang.Object... args)
callBack
- Callback entity.args
- Array of input/output arguments.