com.bigdata.bfs
Class DocumentHeaderImpl

java.lang.Object
  extended by com.bigdata.bfs.DocumentHeaderImpl
All Implemented Interfaces:
DocumentHeader
Direct Known Subclasses:
DocumentImpl

public class DocumentHeaderImpl
extends Object
implements DocumentHeader

Flyweight DocumentHeader implementation.

Version:
$Id: DocumentHeaderImpl.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
DocumentHeaderImpl()
          Create a new empty document.
DocumentHeaderImpl(DocumentHeader header)
          Copy constructor for header information.
DocumentHeaderImpl(Map<String,Object> metadata)
           
 
Method Summary
 Map<String,Object> asMap()
          Returns a read-only view of the document metadata.
 boolean exists()
          Always returns false.
 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()
          The time at which the earliest version of this file still on record was created (historical file metadata can be eradicated through compacting merges).
 String getId()
          The unique identifier for the document within 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.
 int getVersion()
          Return the version identifier.
 long getVersionCreateTime()
          The time at which the current version of this file was created.
 void setContentEncoding(String contentEncoding)
           
 void setContentType(String contentType)
           
 void setId(String id)
           
 void setProperty(String name, Object newValue)
          Set an arbitrary property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Constructor Detail

DocumentHeaderImpl

public DocumentHeaderImpl()
Create a new empty document.


DocumentHeaderImpl

public DocumentHeaderImpl(DocumentHeader header)
Copy constructor for header information.

Parameters:
header - to copy

DocumentHeaderImpl

public DocumentHeaderImpl(Map<String,Object> metadata)
Method Detail

setId

public void setId(String id)

setContentType

public void setContentType(String contentType)

setContentEncoding

public void setContentEncoding(String contentEncoding)

getId

public String getId()
Description copied from interface: DocumentHeader
The unique identifier for the document within the IContentRepository.

Specified by:
getId in interface DocumentHeader

getVersion

public int getVersion()
Description copied from interface: DocumentHeader
Return the version identifier.

Specified by:
getVersion in interface DocumentHeader

getContentType

public String getContentType()
Description copied from interface: DocumentHeader
The MIME type for the document.

Specified by:
getContentType in interface DocumentHeader

getContentEncoding

public String getContentEncoding()
Description copied from interface: DocumentHeader
The character set encoding that MUST be used to interpret the byte[] returned by Document#getContent().

Specified by:
getContentEncoding in interface DocumentHeader

setProperty

public void setProperty(String name,
                        Object newValue)
Set an arbitrary property value.

Parameters:
property - The property name.
value - The value.

getProperty

public Object getProperty(String name)
Description copied from interface: DocumentHeader
Get an arbitrary property value.

Specified by:
getProperty in interface DocumentHeader
Returns:
The value.

asMap

public Map<String,Object> asMap()
Description copied from interface: DocumentHeader
Returns a read-only view of the document metadata.

Specified by:
asMap in interface DocumentHeader

exists

public boolean exists()
Always returns false.

Specified by:
exists in interface DocumentHeader

getEarliestVersionCreateTime

public long getEarliestVersionCreateTime()
Description copied from interface: DocumentHeader
The time at which the earliest version of this file still on record was created (historical file metadata can be eradicated through compacting merges).

Specified by:
getEarliestVersionCreateTime in interface DocumentHeader
Throws:
IllegalStateException - always.

getMetadataUpdateTime

public long getMetadataUpdateTime()
Description copied from interface: DocumentHeader
The time at which the metadata for the current version of this file was last updated.

Specified by:
getMetadataUpdateTime in interface DocumentHeader
Throws:
IllegalStateException - always.

getVersionCreateTime

public long getVersionCreateTime()
Description copied from interface: DocumentHeader
The time at which the current version of this file was created.

Specified by:
getVersionCreateTime in interface DocumentHeader
Throws:
IllegalStateException - always.


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.