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 |
---|---|
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, setProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isDestructiveWrite
serialize
public final boolean isDestructiveRead()
OMDataSourceExt
public final XMLStreamReader getReader() throws 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
.
XMLStreamException
Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.