Package com.marklogic.mapreduce
Class RegularBinaryDocument
- java.lang.Object
-
- com.marklogic.mapreduce.ForestDocument
-
- com.marklogic.mapreduce.BinaryDocument
-
- com.marklogic.mapreduce.RegularBinaryDocument
-
- All Implemented Interfaces:
MarkLogicDocument,org.apache.hadoop.io.Writable
public class RegularBinaryDocument extends BinaryDocument
ABinaryDocumentrepresenting a binary fragment in MarkLogic accessed via Direct Access.- See Also:
ForestInputFormat
-
-
Field Summary
-
Fields inherited from class com.marklogic.mapreduce.ForestDocument
LOG
-
-
Constructor Summary
Constructors Constructor Description RegularBinaryDocument()RegularBinaryDocument(ExpandedTree tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getContentAsByteArray()Return content as byte array.MarkLogicNodegetContentAsMarkLogicNode()Return content as MarkLogicNode.StringgetContentAsString()Return content as String.org.apache.hadoop.io.TextgetContentAsText()Return content as Text.longgetContentSize()Return byte length of the content.ContentTypegetContentType()Return content type of the document.voidreadFields(DataInput in)voidwrite(DataOutput out)-
Methods inherited from class com.marklogic.mapreduce.BinaryDocument
createContent
-
Methods inherited from class com.marklogic.mapreduce.ForestDocument
createDocument, getCollections, getContentAsByteStream, getFragmentOrdinal, getMetadata, getQuality, isStreamable, setContentOptions, setQuality
-
-
-
-
Constructor Detail
-
RegularBinaryDocument
public RegularBinaryDocument()
-
RegularBinaryDocument
public RegularBinaryDocument(ExpandedTree tree)
-
-
Method Detail
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFieldsin interfaceMarkLogicDocument- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Overrides:
readFieldsin classForestDocument- Throws:
IOException
-
write
public void write(DataOutput out) throws IOException
- Specified by:
writein interfaceMarkLogicDocument- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Overrides:
writein classForestDocument- Throws:
IOException
-
getContentAsByteArray
public byte[] getContentAsByteArray()
Description copied from interface:MarkLogicDocumentReturn content as byte array.- Returns:
- content.
-
getContentAsMarkLogicNode
public MarkLogicNode getContentAsMarkLogicNode()
Description copied from interface:MarkLogicDocumentReturn content as MarkLogicNode.- Returns:
- content.
-
getContentAsText
public org.apache.hadoop.io.Text getContentAsText()
Description copied from interface:MarkLogicDocumentReturn content as Text.- Returns:
- content.
-
getContentType
public ContentType getContentType()
Description copied from interface:MarkLogicDocumentReturn content type of the document.- Returns:
- content type of the document.
-
getContentAsString
public String getContentAsString() throws UnsupportedEncodingException
Description copied from interface:MarkLogicDocumentReturn content as String.- Returns:
- content.
- Throws:
UnsupportedEncodingException
-
getContentSize
public long getContentSize()
Description copied from interface:MarkLogicDocumentReturn byte length of the content.- Specified by:
getContentSizein interfaceMarkLogicDocument- Overrides:
getContentSizein classForestDocument- Returns:
- byte length of the content.
-
-