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 WGFileAnnotationspublic java.lang.String getSha512Checksum()
public java.lang.Object getExtensionData(java.lang.String strName)
WGExtensionDataContainergetExtensionData in interface WGExtensionDataContainerstrName - Name of the requested field.public java.util.List<java.lang.String> getExtensionDataNames()
throws WGAPIException
WGExtensionDataContainergetExtensionDataNames in interface WGExtensionDataContainerWGBackendExceptionWGAPIExceptionpublic void removeExtensionData(java.lang.String strName)
WGExtensionDataContainerremoveExtensionData in interface WGExtensionDataContainerstrName - Name of the field to remove.public void writeExtensionData(java.lang.String strName,
java.lang.Object value)
WGExtensionDataContainerwriteExtensionData in interface WGExtensionDataContainerstrName - Name of the requested field.value - The value of the fieldpublic java.lang.String getMimeType()
WGFileAnnotationsgetMimeType in interface WGFileAnnotationspublic void setMimeType(java.lang.String mimeType)
throws WGAPIException
WGFileAnnotationssetMimeType in interface WGFileAnnotationsWGAPIExceptionpublic int getDisplayHeight()
WGFileAnnotationsgetDisplayHeight in interface WGFileAnnotationspublic void setDisplayHeight(int displayHeight)
throws WGAPIException
WGFileAnnotationssetDisplayHeight in interface WGFileAnnotationsWGAPIExceptionpublic int getDisplayWidth()
WGFileAnnotationsgetDisplayWidth in interface WGFileAnnotationspublic void setDisplayWidth(int displayWidth)
throws WGAPIException
WGFileAnnotationssetDisplayWidth in interface WGFileAnnotationsWGAPIExceptionpublic java.lang.String getUsage()
throws WGAPIException
WGFileAnnotationsgetUsage in interface WGFileAnnotationsWGAPIExceptionpublic void setUsage(java.lang.String usage)
throws WGAPIException
usage - The usageWGAPIExceptionpublic java.util.List<java.lang.String> getCustomFieldNames()
WGFileAnnotationsgetCustomFieldNames in interface WGFileAnnotationspublic java.lang.Object getCustomFieldValue(java.lang.String fieldName)
WGFileAnnotationsgetCustomFieldValue in interface WGFileAnnotationsfieldName - Name of the fieldpublic void setCustomFieldValue(java.lang.String fieldName,
java.lang.Object value)
throws WGAPIException
WGFileAnnotationssetCustomFieldValue in interface WGFileAnnotationsfieldName - Name of the fieldvalue - Value of the fieldWGAPIExceptionpublic void removeCustomField(java.lang.String fieldName)
throws WGAPIException
WGFileAnnotationsremoveCustomField in interface WGFileAnnotationsfieldName - Name of the fieldWGAPIExceptionpublic 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
WGFileAnnotationsgetParentDocument in interface WGFileAnnotationsWGAPIExceptionpublic BinaryFieldData getPlainText() throws WGAPIException
WGFileAnnotationsgetPlainText in interface WGFileAnnotationsWGAPIExceptionpublic void setPlainText(BinaryFieldData data) throws WGAPIException
WGFileAnnotationssetPlainText in interface WGFileAnnotationsdata - plain text dataWGAPIException