public class OMStAXWrapper extends javax.xml.stream.util.StreamReaderDelegate implements OMXMLStreamReader
XMLStreamReader
implementation that generates events from a given Axiom tree.
This class does intentionally does not implement XMLStreamReaderContainer because
it does not wrap a parser (it wraps an OM graph).ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
Constructor and Description |
---|
OMStAXWrapper(OMXMLParserWrapper builder,
OMContainer startNode)
When constructing the OMStaxWrapper, the creator must produce the builder (an instance of the
OMXMLparserWrapper of the input) and the Element Node to start parsing.
|
OMStAXWrapper(OMXMLParserWrapper builder,
OMContainer startNode,
boolean cache)
Constructor OMStAXWrapper.
|
Modifier and Type | Method and Description |
---|---|
void |
enableDataSourceEvents(boolean value)
If enabled, treat OMSourcedElements that have
a OMDataSource as leaf nodes.
|
OMXMLParserWrapper |
getBuilder() |
javax.activation.DataHandler |
getDataHandler(String contentID) |
OMDataSource |
getDataSource() |
boolean |
isAllowSwitching() |
boolean |
isClosed() |
boolean |
isInlineMTOM()
By default, an OMText item that has an MTOM datahandler
will be rendered as a inlined text event.
|
void |
releaseParserOnClose(boolean value) |
void |
setAllowSwitching(boolean b) |
void |
setInlineMTOM(boolean value) |
void |
setNamespaceURIInterning(boolean b) |
void |
setParser(javax.xml.stream.XMLStreamReader parser) |
close, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getElementText, getEncoding, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getParent, getPIData, getPITarget, getPrefix, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasName, hasNext, hasText, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartElement, isWhiteSpace, next, nextTag, require, setParent, standaloneSet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getElementText, getEncoding, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getPIData, getPITarget, getPrefix, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasName, hasNext, hasText, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartElement, isWhiteSpace, next, nextTag, require, standaloneSet
public OMStAXWrapper(OMXMLParserWrapper builder, OMContainer startNode)
builder
- startNode
- public OMStAXWrapper(OMXMLParserWrapper builder, OMContainer startNode, boolean cache)
builder
- startNode
- cache
- public boolean isInlineMTOM()
OMXMLStreamReader
isInlineMTOM
in interface OMXMLStreamReader
public void setInlineMTOM(boolean value)
setInlineMTOM
in interface OMXMLStreamReader
value
- set to true if inlining of text is desired (default)
throw OMException if not the value is not supported.public javax.activation.DataHandler getDataHandler(String contentID)
getDataHandler
in interface OMAttachmentAccessor
contentID
- (without the surrounding angle brackets and "cid:" prefix)public OMXMLParserWrapper getBuilder()
public boolean isAllowSwitching()
public boolean isClosed()
public void releaseParserOnClose(boolean value)
public void setAllowSwitching(boolean b)
public void setParser(javax.xml.stream.XMLStreamReader parser)
public void setNamespaceURIInterning(boolean b)
public OMDataSource getDataSource()
public void enableDataSourceEvents(boolean value)
value
- booleanCopyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.