public class WGFileDerivateMetaData extends java.lang.Object implements WGExtensionDataContainer, WGFileAnnotations
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTDATA_ORIGINALREVISION |
static java.lang.String |
EXTDATA_USAGE |
USAGE_ICON, USAGE_POSTER
Constructor and Description |
---|
WGFileDerivateMetaData(WGDatabase db,
WGDocumentKey relatedDoc,
java.lang.String id,
java.lang.String creator,
java.lang.String name,
java.util.Date created,
java.util.Date modified,
long size,
java.lang.String sha512Checksum,
java.lang.String parentSha512Checksum) |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getCreated()
Returns the date of creation
|
java.lang.String |
getCreator()
Returns a hash identifying the derivate creator
|
java.util.List<java.lang.String> |
getCustomFieldNames()
Returns the names of custom fields annotated for this file
|
java.lang.Object |
getCustomFieldValue(java.lang.String fieldName)
Returns the value of a custom field annotated for this file
|
int |
getDisplayHeight()
Returns the display height in pixels for images or videos
|
int |
getDisplayWidth()
Returns the display width in pixels for images or videos
|
java.lang.Object |
getExtensionData(java.lang.String strName)
Returns the value of an extension data field.
|
java.util.List<java.lang.String> |
getExtensionDataNames()
Returns the names of all extension data fields on this entity
|
java.lang.String |
getId()
Returns the derivate id
|
java.util.Date |
getLastModified()
Returns the date of last modification
|
java.lang.String |
getMimeType()
Returns the mime type
|
java.lang.String |
getName()
Returns the name of this derivate
|
WGDatabaseRevision |
getOriginalRevision()
Returns the revision of the original file for which this derivate was created
|
WGDocument |
getParentDocument()
Returns the parent document to which the file, described by these file annotations, belong
|
java.lang.String |
getParentSha512Checksum()
Returns the checksum of the original files data for which this derivate was created
|
BinaryFieldData |
getPlainText()
returns a plain text representation of the file
|
java.lang.String |
getSha512Checksum()
Returns the SHA-512 checksum of this files data
|
long |
getSize()
Returns the size of this file in bytes
|
java.lang.String |
getUsage()
Returns the usage of a file derivate, using constants #USAGE_...
|
void |
removeCustomField(java.lang.String fieldName)
Removes a custom field annotated for this file
|
void |
removeExtensionData(java.lang.String strName)
Removes an extension data field from this entity
|
void |
setCustomFieldValue(java.lang.String fieldName,
java.lang.Object value)
Sets the value of a custom field annotated for this file
|
void |
setDisplayHeight(int displayHeight)
Sets the display height in pixels for images or videos
|
void |
setDisplayWidth(int displayWidth)
Sets the display width in pixels for images or videos
|
void |
setMimeType(java.lang.String mimeType)
Sets the mime type
|
void |
setOriginalRevision(WGDatabaseRevision rev)
Sets the revision of the original file for which this derivate was created
|
void |
setPlainText(BinaryFieldData data)
sets the plain text representation of this file
|
void |
setUsage(java.lang.String usage)
Sets the usage of this derivate as constant WGFileAnnotations.USAGE_...
|
void |
writeExtensionData(java.lang.String strName,
java.lang.Object value)
Sets the value of an extension data field.
|
public static final java.lang.String EXTDATA_USAGE
public static final java.lang.String EXTDATA_ORIGINALREVISION
public WGFileDerivateMetaData(WGDatabase db, WGDocumentKey relatedDoc, java.lang.String id, java.lang.String creator, java.lang.String name, java.util.Date created, java.util.Date modified, long size, java.lang.String sha512Checksum, java.lang.String parentSha512Checksum)
public long getSize()
getSize
in interface WGFileAnnotations
public java.lang.String getSha512Checksum()
public java.lang.Object getExtensionData(java.lang.String strName)
WGExtensionDataContainer
getExtensionData
in interface WGExtensionDataContainer
strName
- Name of the requested field.public java.util.List<java.lang.String> getExtensionDataNames() throws WGAPIException
WGExtensionDataContainer
getExtensionDataNames
in interface WGExtensionDataContainer
WGBackendException
WGAPIException
public void removeExtensionData(java.lang.String strName)
WGExtensionDataContainer
removeExtensionData
in interface WGExtensionDataContainer
strName
- Name of the field to remove.public void writeExtensionData(java.lang.String strName, java.lang.Object value)
WGExtensionDataContainer
writeExtensionData
in interface WGExtensionDataContainer
strName
- Name of the requested field.value
- The value of the fieldpublic java.lang.String getMimeType()
WGFileAnnotations
getMimeType
in interface WGFileAnnotations
public void setMimeType(java.lang.String mimeType) throws WGAPIException
WGFileAnnotations
setMimeType
in interface WGFileAnnotations
WGAPIException
public int getDisplayHeight()
WGFileAnnotations
getDisplayHeight
in interface WGFileAnnotations
public void setDisplayHeight(int displayHeight) throws WGAPIException
WGFileAnnotations
setDisplayHeight
in interface WGFileAnnotations
WGAPIException
public int getDisplayWidth()
WGFileAnnotations
getDisplayWidth
in interface WGFileAnnotations
public void setDisplayWidth(int displayWidth) throws WGAPIException
WGFileAnnotations
setDisplayWidth
in interface WGFileAnnotations
WGAPIException
public java.lang.String getUsage() throws WGAPIException
WGFileAnnotations
getUsage
in interface WGFileAnnotations
WGAPIException
public void setUsage(java.lang.String usage) throws WGAPIException
usage
- The usageWGAPIException
public java.util.List<java.lang.String> getCustomFieldNames()
WGFileAnnotations
getCustomFieldNames
in interface WGFileAnnotations
public java.lang.Object getCustomFieldValue(java.lang.String fieldName)
WGFileAnnotations
getCustomFieldValue
in interface WGFileAnnotations
fieldName
- Name of the fieldpublic void setCustomFieldValue(java.lang.String fieldName, java.lang.Object value) throws WGAPIException
WGFileAnnotations
setCustomFieldValue
in interface WGFileAnnotations
fieldName
- Name of the fieldvalue
- Value of the fieldWGAPIException
public void removeCustomField(java.lang.String fieldName) throws WGAPIException
WGFileAnnotations
removeCustomField
in interface WGFileAnnotations
fieldName
- Name of the fieldWGAPIException
public java.lang.String getCreator()
public java.lang.String getName()
public java.lang.String getId()
public java.util.Date getCreated()
public java.util.Date getLastModified()
public java.lang.String getParentSha512Checksum()
public WGDatabaseRevision getOriginalRevision()
public void setOriginalRevision(WGDatabaseRevision rev)
public WGDocument getParentDocument() throws WGAPIException
WGFileAnnotations
getParentDocument
in interface WGFileAnnotations
WGAPIException
public BinaryFieldData getPlainText() throws WGAPIException
WGFileAnnotations
getPlainText
in interface WGFileAnnotations
WGAPIException
public void setPlainText(BinaryFieldData data) throws WGAPIException
WGFileAnnotations
setPlainText
in interface WGFileAnnotations
data
- plain text dataWGAPIException