public class RepositoryDocumentImpl extends Object implements DocumentHeader, Document
Document that has been read from a
BigdataFileSystem.| Constructor and Description |
|---|
RepositoryDocumentImpl(BigdataFileSystem repo,
String id)
Read the metadata for the current version of the file from the
repository.
|
RepositoryDocumentImpl(BigdataFileSystem repo,
String id,
ITPS tps)
Read the metadata for the current version of the file from the
repository.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
asMap()
Returns a read-only view of the document metadata.
|
protected void |
assertExists()
Assert that a version of the file existed when this view was constructed.
|
boolean |
exists()
Return
true iff a version of the file existed at the
time that this view was constructed. |
ITPV[] |
getAllVersionInfo()
Return an array containing all non-eradicated values of the
FileMetadataSchema.VERSION property for this file as of the time
that this view was constructed. |
String |
getContentEncoding()
The character set encoding that MUST be used to interpret the byte[]
returned by
Document#getContent(). |
String |
getContentType()
The MIME type for the document.
|
long |
getEarliestVersionCreateTime()
Note: This is obtained from the earliest available timestamp of the
FileMetadataSchema.ID property. |
String |
getId()
The unique identifier for the document within the
IContentRepository. |
InputStream |
getInputStream()
An input stream on the byte[] stored in the
IContentRepository. |
long |
getMetadataUpdateTime()
The time at which the metadata for the current version of this file
was last updated.
|
Object |
getProperty(String name)
Get an arbitrary property value.
|
Reader |
getReader()
A reader on the byte[] stored in the
IContentRepository where
bytes are decoded to characters using the encoding identified by
DocumentHeader.getContentEncoding(). |
int |
getVersion()
Return the version identifier.
|
long |
getVersionCreateTime()
The time at which the current version of this file was created.
|
public RepositoryDocumentImpl(BigdataFileSystem repo, String id, ITPS tps)
id - The file identifier.tps - The logical row describing the metadata for some file in
the repository.public RepositoryDocumentImpl(BigdataFileSystem repo, String id)
id - The file identifier.protected final void assertExists()
IllegalStateException - unless a version of the file existed at the time that this
view was constructed.public final boolean exists()
DocumentHeadertrue iff a version of the file existed at the
time that this view was constructed.exists in interface DocumentHeaderpublic final int getVersion()
DocumentHeadergetVersion in interface DocumentHeaderpublic final long getEarliestVersionCreateTime()
FileMetadataSchema.ID property.getEarliestVersionCreateTime in interface DocumentHeaderpublic final long getVersionCreateTime()
DocumentHeadergetVersionCreateTime in interface DocumentHeaderpublic final long getMetadataUpdateTime()
DocumentHeadergetMetadataUpdateTime in interface DocumentHeaderpublic final ITPV[] getAllVersionInfo()
FileMetadataSchema.VERSION property for this file as of the time
that this view was constructed.public final InputStream getInputStream()
DocumentIContentRepository.getInputStream in interface Documentpublic final Reader getReader() throws UnsupportedEncodingException
DocumentIContentRepository where
bytes are decoded to characters using the encoding identified by
DocumentHeader.getContentEncoding().getReader in interface DocumentUnsupportedEncodingExceptionpublic final String getContentEncoding()
DocumentHeaderDocument#getContent().getContentEncoding in interface DocumentHeaderpublic final String getContentType()
DocumentHeadergetContentType in interface DocumentHeaderpublic final String getId()
DocumentHeaderIContentRepository.getId in interface DocumentHeaderpublic final Object getProperty(String name)
DocumentHeadergetProperty in interface DocumentHeaderpublic final Map<String,Object> asMap()
DocumentHeaderasMap in interface DocumentHeaderCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.