public interface ResultItem extends XdmItem
An XdmItem
that is a member of a ResultSequence
. The
values associated with ResultItem instances may be transient. ResultItem wraps an XdmItem
instance and also implements the XdmItem
interface. Invoking the methods of the
XdmItem
interface are passed through to the contained instance.
Because a ResultSequence
may be streaming, the contained XdmItem
may be have been
partially consumed. Use the isFetchable()
method to determine if it is safe to access
the value.
com.marklogic.xcc.types
Modifier and Type | Method and Description |
---|---|
void |
cache()
If this item is not already cached, read it fully from the result stream so that it is
buffered in memory.
|
java.lang.String |
getDocumentURI()
Returns the URI of the document represented by this ResultItem, as returned by xdmp:node-uri($node).
|
int |
getIndex()
The position (zero-based) of this ResultItem in its containing
ResultSequence . |
XdmItem |
getItem()
Returns the actual
XdmItem value wrapped by this ResultItem. |
java.lang.String |
getNodePath()
Returns the path of the node represented by this ResultItem, as returned by xdmp:path($node, false()).
|
boolean |
isFetchable()
Indicates if the value of this ResultItem may be fetched.
|
asInputStream, asReader, getItemType, isCached, writeTo, writeTo
asString, getValueType
java.lang.String getDocumentURI()
Returns the URI of the document represented by this ResultItem, as returned by xdmp:node-uri($node).
Returns null for non-node items and constructed nodes.
java.lang.String getNodePath()
Returns the path of the node represented by this ResultItem, as returned by xdmp:path($node, false()).
Returns null for non-node items.
XdmItem getItem()
XdmItem
value wrapped by this ResultItem. The instance returned
may be tested with instanceof
.XdmItem
.int getIndex()
ResultSequence
.boolean isFetchable()
XdmItem.asInputStream()
or XdmItem.asReader()
is
called.ResultSequence.next()
is called and returns this
XdmItem
.void cache()
StreamingResultException
- If an IOException ocurrs reading the result data.Copyright © 2018 MarkLogic Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com