org.apache.axiom.om.util
Class OMXMLStreamReaderValidator
java.lang.Object
org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper
org.apache.axiom.util.stax.debug.XMLStreamReaderValidator
org.apache.axiom.om.util.OMXMLStreamReaderValidator
- All Implemented Interfaces:
- XMLStreamConstants, XMLStreamReader, OMAttachmentAccessor, OMXMLStreamReader
public class OMXMLStreamReaderValidator
- extends XMLStreamReaderValidator
- implements OMXMLStreamReader
There are several places in the code where events are passed from
a source to a consumer using XMLStreamReader events.
OMXMLStreamReader (impl)--> consumer of XMLStreamReader events
This simple class can be interjected as a filter and used to do some simple validation.
Validating the events coming from source (impl) can help find and correct errors
when they occur. Otherwise the errors may be caught much further downstream and hard to fix.
OMXMLStreamReader (impl)--> OMXMLStreamReaderValiator-> consumer of XMLStreamReader events
In the initial version, the XMStreamValidator ensures that the start element events match the
end element events.
- See Also:
OMContainer.getXMLStreamReader(boolean)
Fields inherited from interface javax.xml.stream.XMLStreamConstants |
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Methods inherited from class org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper |
close, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, 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, require, standaloneSet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.xml.stream.XMLStreamReader |
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 |
OMXMLStreamReaderValidator
public OMXMLStreamReaderValidator(OMXMLStreamReader delegate,
boolean throwExceptions)
- Parameters:
delegate
- XMLStreamReader to validatethrowExceptions
- (true if exceptions should be thrown when errors are encountered)
getDataHandler
public DataHandler getDataHandler(String blobcid)
- Specified by:
getDataHandler
in interface OMAttachmentAccessor
- Parameters:
blobcid
- (without the surrounding angle brackets and "cid:" prefix)
- Returns:
- The DataHandler of the mime part referred by the Content-Id or *null* if the mime
part referred by the content-id does not exist
isInlineMTOM
public boolean isInlineMTOM()
- Description copied from interface:
OMXMLStreamReader
- By default, an OMText item that has an MTOM datahandler
will be rendered as a inlined text event.
- Specified by:
isInlineMTOM
in interface OMXMLStreamReader
- Returns:
- true if inlined as TEXT, false if XOP_INCLUDE is used
setInlineMTOM
public void setInlineMTOM(boolean value)
- Specified by:
setInlineMTOM
in interface OMXMLStreamReader
- Parameters:
value
- set to true if inlining of text is desired (default)
throw OMException if not the value is not supported.
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.