public class WGFileMetaData extends java.lang.Object implements WGExtensionDataContainer, WGFileAnnotations, MetaInfoProvider
_extData are mutable and stored back.| Modifier and Type | Class and Description |
|---|---|
static class |
WGFileMetaData.ManualDerivate
A file derivate that was created manually
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXTDATA_COPYRIGHT |
static java.lang.String |
EXTDATA_CUSTOM_FIELD_PREFIX |
static java.lang.String |
EXTDATA_DESCRIPTION |
static java.lang.String |
EXTDATA_DISPLAY_HEIGHT |
static java.lang.String |
EXTDATA_DISPLAY_WIDTH |
static java.lang.String |
EXTDATA_MANUAL_DERIVATE_DATA_PREFIX |
static java.lang.String |
EXTDATA_MANUAL_DERIVATE_DEFINITION_PREFIX |
static java.lang.String |
EXTDATA_MIMETYPE |
static java.lang.String |
EXTDATA_PLAINTEXT |
static java.lang.String |
EXTDATA_TITLE |
static java.lang.String |
EXTDATA_UPDATE_REVISION |
static java.lang.String |
META_COPYRIGHT |
static java.lang.String |
META_CREATED |
static java.lang.String |
META_DESCRIPTION |
static java.lang.String |
META_LASTMODIFIED |
static java.lang.String |
META_MD5CHECKSUM |
static java.lang.String |
META_MIMETYPE |
static java.lang.String |
META_NAME |
static java.lang.String |
META_SHA512CHECKSUM |
static java.lang.String |
META_SIZE |
static java.lang.String |
META_TITLE |
static MetaInfo |
METAINFO_COPYRIGHT |
static MetaInfo |
METAINFO_CREATED |
static MetaInfo |
METAINFO_DESCRIPTION |
static MetaInfo |
METAINFO_LASTMODIFIED |
static MetaInfo |
METAINFO_MD5CHECKSUM |
static MetaInfo |
METAINFO_MIMETYPE |
static MetaInfo |
METAINFO_NAME |
static MetaInfo |
METAINFO_SHA512CHECKSUM |
static MetaInfo |
METAINFO_SIZE |
static MetaInfo |
METAINFO_TITLE |
USAGE_ICON, USAGE_POSTER| Constructor and Description |
|---|
WGFileMetaData(WGFileMetaDataContext context,
java.lang.String name,
long size,
java.util.Date created,
java.util.Date lastModified,
java.lang.String md5Checksum,
java.lang.String sha512Checksum,
java.util.Map<java.lang.String,java.lang.Object> extData) |
| Modifier and Type | Method and Description |
|---|---|
WGFileMetaData |
createClone()
Creates an identical clone of this metadata object
|
WGFileMetaDataContext |
getContext()
Returns the file metadata context
|
java.lang.String |
getCopyright()
Returns the copyright of this image
|
java.util.Date |
getCreated()
returns the date the file was attached on the document
|
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
|
java.lang.String |
getDescription()
Returns the description of this image
|
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.util.Date |
getLastmodified()
returns the date the file was last modified for e.g. renamed
|
WGFileMetaData.ManualDerivate |
getManualDerivate(java.lang.String name)
Retrieves a manual derivate defined for this file
|
java.util.List<java.lang.String> |
getManualDerivateNames()
Returns the names of all manual derivates registered for this file
|
java.lang.String |
getMd5Checksum()
returns an md5 checksum of the file binary data
|
java.lang.Object |
getMetaData(java.lang.String name)
Returns a file metadata value by its field name
|
java.lang.String |
getMimeType()
Returns the mime type
|
java.lang.String |
getName()
returns the name of the file
|
WGDocument |
getParentDocument()
Returns the parent document to which the file, described by these file annotations, belong
|
BinaryFieldData |
getPlainText()
returns a plain text representation of the file
|
java.lang.String |
getSha512Checksum()
returns an SHA-512 checksum of the file binary data, available only since content store version 5 patch level 4
|
long |
getSize()
returns the file size in bytes
|
java.lang.String |
getTitle()
Returns the title of this file
|
WGDatabaseRevision |
getUpdateRevision()
Returns the revision when the contents of this file was updated the last time
|
java.lang.String |
getUsage()
Returns the usage of a file derivate, using constants #USAGE_...
|
void |
pushData(WGFileMetaData clone)
Pushes all data from this file metadata object to the parameter object
|
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 |
removeManualDerivate(java.lang.String name)
Removes a manual derivate
|
void |
setContext(WGFileMetaDataContext parent)
Sets the file metadata context
|
void |
setCopyright(java.lang.String copyright)
Sets the copyright for this image
|
void |
setCustomFieldValue(java.lang.String fieldName,
java.lang.Object value)
Sets the value of a custom field annotated for this file
|
void |
setDescription(java.lang.String desc)
Sets the description of this image
|
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 |
setManualDerivate(java.lang.String name,
java.lang.String usage,
java.io.InputStream data)
Defines a manual derivate for this file
|
void |
setMimeType(java.lang.String mimeType)
Sets the mime type
|
void |
setPlainText(BinaryFieldData plaintext)
sets the plain text representation of this file
|
void |
setTitle(java.lang.String title)
Sets the title of this file
|
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_MIMETYPE
public static final java.lang.String EXTDATA_DISPLAY_WIDTH
public static final java.lang.String EXTDATA_DISPLAY_HEIGHT
public static final java.lang.String EXTDATA_TITLE
public static final java.lang.String EXTDATA_DESCRIPTION
public static final java.lang.String EXTDATA_COPYRIGHT
public static final java.lang.String EXTDATA_CUSTOM_FIELD_PREFIX
public static final java.lang.String EXTDATA_MANUAL_DERIVATE_DEFINITION_PREFIX
public static final java.lang.String EXTDATA_MANUAL_DERIVATE_DATA_PREFIX
public static final java.lang.String EXTDATA_UPDATE_REVISION
public static final java.lang.String EXTDATA_PLAINTEXT
public static final java.lang.String META_NAME
public static final MetaInfo METAINFO_NAME
public static final java.lang.String META_TITLE
public static final MetaInfo METAINFO_TITLE
public static final java.lang.String META_DESCRIPTION
public static final MetaInfo METAINFO_DESCRIPTION
public static final java.lang.String META_COPYRIGHT
public static final MetaInfo METAINFO_COPYRIGHT
public static final java.lang.String META_CREATED
public static final MetaInfo METAINFO_CREATED
public static final java.lang.String META_LASTMODIFIED
public static final MetaInfo METAINFO_LASTMODIFIED
public static final java.lang.String META_SIZE
public static final MetaInfo METAINFO_SIZE
public static final java.lang.String META_MD5CHECKSUM
public static final MetaInfo METAINFO_MD5CHECKSUM
public static final java.lang.String META_SHA512CHECKSUM
public static final MetaInfo METAINFO_SHA512CHECKSUM
public static final java.lang.String META_MIMETYPE
public static final MetaInfo METAINFO_MIMETYPE
public WGFileMetaData(WGFileMetaDataContext context, java.lang.String name, long size, java.util.Date created, java.util.Date lastModified, java.lang.String md5Checksum, java.lang.String sha512Checksum, java.util.Map<java.lang.String,java.lang.Object> extData)
public java.lang.String getName()
public long getSize()
getSize in interface WGFileAnnotationspublic java.util.Date getCreated()
public java.util.Date getLastmodified()
public java.lang.String getMd5Checksum()
public 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)
throws WGAPIException
WGExtensionDataContainerremoveExtensionData in interface WGExtensionDataContainerstrName - Name of the field to remove.WGAPIExceptionpublic void writeExtensionData(java.lang.String strName,
java.lang.Object value)
throws WGAPIException
WGExtensionDataContainerwriteExtensionData in interface WGExtensionDataContainerstrName - Name of the requested field.value - The value of the fieldWGAPIExceptionpublic 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 WGFileMetaDataContext getContext()
public void setContext(WGFileMetaDataContext parent)
parent - The contextpublic WGFileMetaData createClone() throws WGAPIException
WGAPIExceptionpublic void pushData(WGFileMetaData clone) throws WGAPIException
clone - The target objectWGAPIExceptionpublic 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 getTitle()
public void setTitle(java.lang.String title)
throws WGAPIException
title - The titleWGAPIExceptionpublic java.lang.String getDescription()
public void setDescription(java.lang.String desc)
throws WGAPIException
desc - The descriptionWGAPIExceptionpublic java.lang.String getCopyright()
public void setCopyright(java.lang.String copyright)
throws WGAPIException
copyright - The copyrightWGAPIExceptionpublic java.lang.String getUsage()
throws WGAPIException
WGFileAnnotationsgetUsage in interface WGFileAnnotationsWGAPIExceptionpublic WGDatabaseRevision getUpdateRevision() throws WGAPIException
WGAPIExceptionpublic BinaryFieldData getPlainText() throws WGAPIException
WGFileAnnotationsgetPlainText in interface WGFileAnnotationsWGAPIExceptionpublic void setPlainText(BinaryFieldData plaintext) throws WGAPIException
WGFileAnnotationssetPlainText in interface WGFileAnnotationsplaintext - plain text dataWGAPIExceptionpublic java.lang.Object getMetaData(java.lang.String name)
name - The field namepublic WGDocument getParentDocument() throws WGAPIException
WGFileAnnotationsgetParentDocument in interface WGFileAnnotationsWGAPIExceptionpublic java.util.List<java.lang.String> getManualDerivateNames()
throws WGAPIException
WGAPIExceptionpublic WGFileMetaData.ManualDerivate getManualDerivate(java.lang.String name) throws WGAPIException
name - Name of the derivateWGAPIExceptionpublic void setManualDerivate(java.lang.String name,
java.lang.String usage,
java.io.InputStream data)
throws WGAPIException
name - Name of the derivateusage - Usage of the derivate. Use WGFileAnnotations.USAGE_* constants.data - The data for the derivateWGAPIExceptionpublic void removeManualDerivate(java.lang.String name)
throws WGAPIException
name - Name of the derivateWGAPIException