public class DatabaseDocument extends Object implements MarkLogicDocument
MarkLogicDocument retrieved from a database via
MarkLogic Server.| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
content |
protected ContentType |
contentType |
static org.apache.commons.logging.Log |
LOG |
| Constructor and Description |
|---|
DatabaseDocument() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContentAsByteArray()
Return content as byte array.
|
InputStream |
getContentAsByteStream()
Return content as byte stream.
|
MarkLogicNode |
getContentAsMarkLogicNode()
Return content as MarkLogicNode.
|
String |
getContentAsString()
Return content as String.
|
org.apache.hadoop.io.Text |
getContentAsText()
Return content as Text.
|
long |
getContentSize()
Return byte length of the content.
|
ContentType |
getContentType()
Return content type of the document.
|
boolean |
isStreamable()
Whether the content can be streamed.
|
void |
readFields(DataInput in) |
void |
set(com.marklogic.xcc.ResultItem item) |
void |
setContent(byte[] content) |
void |
setContentType(ContentType type) |
void |
write(DataOutput out) |
public static final org.apache.commons.logging.Log LOG
protected byte[] content
protected ContentType contentType
public ContentType getContentType()
MarkLogicDocumentgetContentType in interface MarkLogicDocumentpublic org.apache.hadoop.io.Text getContentAsText()
MarkLogicDocumentgetContentAsText in interface MarkLogicDocumentpublic byte[] getContentAsByteArray()
MarkLogicDocumentgetContentAsByteArray in interface MarkLogicDocumentpublic InputStream getContentAsByteStream()
MarkLogicDocumentgetContentAsByteStream in interface MarkLogicDocumentpublic MarkLogicNode getContentAsMarkLogicNode()
MarkLogicDocumentgetContentAsMarkLogicNode in interface MarkLogicDocumentpublic String getContentAsString() throws UnsupportedEncodingException
MarkLogicDocumentgetContentAsString in interface MarkLogicDocumentUnsupportedEncodingExceptionpublic void set(com.marklogic.xcc.ResultItem item)
public void setContent(byte[] content)
public void setContentType(ContentType type)
public void readFields(DataInput in) throws IOException
readFields in interface MarkLogicDocumentreadFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(DataOutput out) throws IOException
write in interface MarkLogicDocumentwrite in interface org.apache.hadoop.io.WritableIOExceptionpublic long getContentSize()
MarkLogicDocumentgetContentSize in interface MarkLogicDocumentpublic boolean isStreamable()
MarkLogicDocumentisStreamable in interface MarkLogicDocumentCopyright © 2016 MarkLogic Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com