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()
DocumentHeader
true
iff a version of the file existed at the
time that this view was constructed.exists
in interface DocumentHeader
public final int getVersion()
DocumentHeader
getVersion
in interface DocumentHeader
public final long getEarliestVersionCreateTime()
FileMetadataSchema.ID
property.getEarliestVersionCreateTime
in interface DocumentHeader
public final long getVersionCreateTime()
DocumentHeader
getVersionCreateTime
in interface DocumentHeader
public final long getMetadataUpdateTime()
DocumentHeader
getMetadataUpdateTime
in interface DocumentHeader
public final ITPV[] getAllVersionInfo()
FileMetadataSchema.VERSION
property for this file as of the time
that this view was constructed.public final InputStream getInputStream()
Document
IContentRepository
.getInputStream
in interface Document
public final Reader getReader() throws UnsupportedEncodingException
Document
IContentRepository
where
bytes are decoded to characters using the encoding identified by
DocumentHeader.getContentEncoding()
.getReader
in interface Document
UnsupportedEncodingException
public final String getContentEncoding()
DocumentHeader
Document#getContent()
.getContentEncoding
in interface DocumentHeader
public final String getContentType()
DocumentHeader
getContentType
in interface DocumentHeader
public final String getId()
DocumentHeader
IContentRepository
.getId
in interface DocumentHeader
public final Object getProperty(String name)
DocumentHeader
getProperty
in interface DocumentHeader
public final Map<String,Object> asMap()
DocumentHeader
asMap
in interface DocumentHeader
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.