public interface DocumentRecord
Modifier and Type | Method and Description |
---|---|
<T extends AbstractReadHandle> |
getContent(T contentHandle)
Given a handle, populates the handle with the
document contents directly from the server (or the transformed
contents if a ServerTransform was used).
|
<T> T |
getContentAs(java.lang.Class<T> as)
Reads the document content from the multipart
response into the representation specified by the IO class.
|
DocumentDescriptor |
getDescriptor()
Returns a descriptor for the document content
including the document version if enabled on the server.
|
Format |
getFormat()
Returns the format of the document in the
server
|
long |
getLength()
Returns the length of the document
content.
|
<T extends DocumentMetadataReadHandle> |
getMetadata(T metadataHandle)
Given a handle, populates the handle with the
structured metadata directly from the REST API.
|
<T> T |
getMetadataAs(java.lang.Class<T> as)
Reads the metadata from the multipart response
into the representation specified by the IO class.
|
java.lang.String |
getMimetype()
Returns the mime-type ("Content-Type" header) of
the document as specified by the server (uses the server's
mime-type mapping for file extensions)
|
java.lang.String |
getUri()
Returns the uri (unique identifier) of the
document in the server
|
java.lang.String getUri()
DocumentDescriptor getDescriptor()
Format getFormat()
java.lang.String getMimetype()
long getLength()
<T extends DocumentMetadataReadHandle> T getMetadata(T metadataHandle)
T
- the type of DocumentMetadataReadHandle to
returnmetadataHandle
- the handle to populate with the
metadata<T> T getMetadataAs(java.lang.Class<T> as)
ContentHandle
are registered. Learn more
about shortcut methodsT
- the type of object that will be returned by
the handle registered for itas
- the Class which a handle should instantiate,
populate and return<T extends AbstractReadHandle> T getContent(T contentHandle)
format
of this document.T
- the type of AbstractReadHandle to returncontentHandle
- the handle to populate with the
contents<T> T getContentAs(java.lang.Class<T> as)
ContentHandle
are registered. Learn more
about shortcut methodsT
- the type of object that will be returned by
the handle registered for itas
- the Class which a handle should instantiate,
populate and returnCopyright © 2024 MarkLogic Corporation. All Rights Reserved.