public abstract class AbstractPushOMDataSource extends AbstractOMDataSource
OMDataSourceExt implementations that can easily serialize the content to
an XMLStreamWriter but that are unable to produce the content as an
XMLStreamReader.
OMSourcedElement will handle OMDataSource implementations extending this class
differently when it comes to expansion: instead of using OMDataSource.getReader() to
expand the element, it will use OMDataSource.serialize(XMLStreamWriter) (with a special
XMLStreamWriter that builds the descendants of the OMSourcedElement). This means
that such an OMSourcedElement will be expanded instantly, and that deferred building of
the descendants is not applicable.
LOSSY_PREFIX| Constructor and Description |
|---|
AbstractPushOMDataSource() |
| Modifier and Type | Method and Description |
|---|---|
javax.xml.stream.XMLStreamReader |
getReader()
Get parser for element data.
|
boolean |
isDestructiveRead()
Returns true if reading the backing object is destructive.
|
close, copy, getObject, getProperty, getXMLBytes, getXMLInputStream, hasProperty, serialize, serialize, setPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisDestructiveWriteserializepublic final boolean isDestructiveRead()
OMDataSourceExtpublic final javax.xml.stream.XMLStreamReader getReader() throws javax.xml.stream.XMLStreamException
OMDataSource
It is assumed that this method consumed the content (i.e. destroys the backing object) unless
the data source also implements OMDataSourceExt and
OMDataSourceExt.isDestructiveRead() returns false.
OMSourcedElement implementations are expected to call XMLStreamReader.close()
on the returned reader as soon as the element is completely built.
javax.xml.stream.XMLStreamExceptionCopyright © The Apache Software Foundation. All Rights Reserved.