Package com.marklogic.mapreduce
Class DOMDocument
- java.lang.Object
-
- com.marklogic.mapreduce.ForestDocument
-
- com.marklogic.mapreduce.DOMDocument
-
- All Implemented Interfaces:
MarkLogicDocument,org.apache.hadoop.io.Writable
public class DOMDocument extends ForestDocument
AForestDocumentcontaining a DOM document node representation of a document as stored in the expanded tree cache of a forest on disk.You cannot use this class to modify a document. However, you can create a modifiable copy of the underlying document using
DocumentImplon the document returned bygetDocument().
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.commons.logging.LogLOG
-
Constructor Summary
Constructors Constructor Description DOMDocument()DOMDocument(ExpandedTree tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.marklogic.xcc.ContentcreateContent(String uri, com.marklogic.xcc.ContentCreateOptions options, boolean copyCollections, boolean copyMetadata, boolean copyQuality)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.ContentTypegetContentType()Return content type of the document.DocumentgetDocument()voidreadFields(DataInput in)StringtoString()voidwrite(DataOutput out)-
Methods inherited from class com.marklogic.mapreduce.ForestDocument
createDocument, getCollections, getContentAsByteStream, getContentSize, getFragmentOrdinal, getMetadata, getQuality, isStreamable, setContentOptions, setQuality
-
-
-
-
Constructor Detail
-
DOMDocument
public DOMDocument()
-
DOMDocument
public DOMDocument(ExpandedTree tree)
-
-
Method Detail
-
getDocument
public Document getDocument()
-
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
-
createContent
public com.marklogic.xcc.Content createContent(String uri, com.marklogic.xcc.ContentCreateOptions options, boolean copyCollections, boolean copyMetadata, boolean copyQuality) throws IOException
- Specified by:
createContentin classForestDocument- Throws:
IOException
-
-