public interface DocumentDescriptor extends ContentDescriptor
A Document Descriptor describes a database document.
| Modifier and Type | Field and Description |
|---|---|
static long |
UNKNOWN_VERSION
Indicates that the version of the database document is not known.
|
UNKNOWN_LENGTH| Modifier and Type | Method and Description |
|---|---|
String |
getUri()
Returns the URI identifier for the database document.
|
long |
getVersion()
Returns the version for the database document.
|
void |
setUri(String uri)
Specifies the URI identifier for a database document.
|
void |
setVersion(long version)
Specifies the document version.
|
DocumentDescriptor |
withFormat(Format format)
Specifies the format for a database document and returns the descriptor object
|
getByteLength, getFormat, getMimetype, setByteLength, setFormat, setMimetypestatic final long UNKNOWN_VERSION
Indicates that the version of the database document is not known.
String getUri()
Returns the URI identifier for the database document.
void setUri(String uri)
Specifies the URI identifier for a database document.
uri - the document URIDocumentDescriptor withFormat(Format format)
Specifies the format for a database document and returns the descriptor object
format - the document formatlong getVersion()
Returns the version for the database document. Each update creates a new version of a document. Version numbering can be used to refresh a client document cache or for optimistic locking. Use ServerConfigurationManager to enable versioning on content.
void setVersion(long version)
Specifies the document version. Checking the existence of a document or reading a document specifies the document version if you have enabled versioning on content.
version - the document version numberCopyright © 2013-2017 MarkLogic Corporation.