|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.bfs.RepositoryDocumentImpl
public class RepositoryDocumentImpl
A read-only view of a Document that has been read from a
BigdataFileSystem.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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.| Method Detail |
|---|
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()
DocumentHeader
getVersion in interface DocumentHeaderpublic final long getEarliestVersionCreateTime()
FileMetadataSchema.ID property.
getEarliestVersionCreateTime in interface DocumentHeaderpublic final long getVersionCreateTime()
DocumentHeader
getVersionCreateTime in interface DocumentHeaderpublic final long getMetadataUpdateTime()
DocumentHeader
getMetadataUpdateTime in interface DocumentHeaderpublic final ITPV[] getAllVersionInfo()
FileMetadataSchema.VERSION property for this file as of the time
that this view was constructed.
BigdataFileSystem.getAllVersionInfo(String)public final InputStream getInputStream()
DocumentIContentRepository.
getInputStream in interface Document
public 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()
DocumentHeader
getContentType in interface DocumentHeaderpublic final String getId()
DocumentHeaderIContentRepository.
getId in interface DocumentHeaderpublic final Object getProperty(String name)
DocumentHeader
getProperty in interface DocumentHeaderpublic final Map<String,Object> asMap()
DocumentHeader
asMap in interface DocumentHeader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||