Class CMSMediaItem
- All Implemented Interfaces:
BrowseElementInfo
,Serializable
,Comparable<CMSMediaItem>
CMSMediaItem class.
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
ConstantCONTENT_TYPE_AUDIO="audio"
static final String
ConstantCONTENT_TYPE_GIF="application/gif"
static final String
ConstantCONTENT_TYPE_SVG="image/svg+xml"
static final String
ConstantCONTENT_TYPE_PDF="application/pdf"
static final String
ConstantCONTENT_TYPE_SVG="image/svg+xml"
static final String
ConstantCONTENT_TYPE_VIDEO="video"
static final String
ConstantCONTENT_TYPE_XML="text/xml"
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addCategory
(CMSCategory cat) addCategory.void
addMetadata
(CMSMediaItemMetadata metadata) Adds a metadata item to the list of image metadata.int
boolean
Getter for the fieldalternativeText
.Determines this media item's file's content type via the extension.getCurrentLanguageMetadata.getDescription.getDescription
(String language) int
Getter for the fieldfileName
.getFilePath.getFinishedLocales.getIconURI.getIconURI
(int size) getIconURI.getIconURI
(int width, int height) getIconURI.getId()
Getter for the fieldid
.getImageURI.Getter for the fieldlastModifiedTime
.getLink()
Getter for the fieldlink
.getLinkURI.getLinkURI
(javax.servlet.http.HttpServletRequest request) getLinkURI.Getter for the fieldmetadata
.getMetadataForLanguage
(String language) getMetadataForLanguage.getMetadataForLocale
(Locale locale) getMetadataForLocale.getName()
getName.de.intranda.metadata.multilanguage.IMetadataValue
getTranslationsForDescription.de.intranda.metadata.multilanguage.IMetadataValue
getTranslationsForName.boolean
hasCateories.int
hashCode()
boolean
isFinished
(Locale locale) isFinished.boolean
Checks whether this media item contains a text file that can be exported for indexing.boolean
boolean
removeCategory.void
setAlternativeText
(String alternativeText) Setter for the fieldalternativeText
.void
setCategories
(List<CMSCategory> categories) Setter for the fieldcategories
.void
setDisplayOrder
(int displayOrder) Setter for the fielddisplayOrder
.void
setFileName
(String fileName) Setter for the fieldfileName
.void
Setter for the fieldid
.void
setImportant
(boolean important) setImportant.void
set the link for this media itemvoid
setMetadata
(List<CMSMediaItemMetadata> metadata) Setter for the fieldmetadata
.void
setPriority
(CMSMediaItem.Priority priority) Setter for the fieldpriority
.toString()
wrapCategories
(List<CMSCategory> categories) wrapCategories.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.goobi.viewer.model.viewer.collections.BrowseElementInfo
hasDescription
-
Field Details
-
CONTENT_TYPE_XML
ConstantCONTENT_TYPE_XML="text/xml"
- See Also:
-
CONTENT_TYPE_SVG
ConstantCONTENT_TYPE_SVG="image/svg+xml"
- See Also:
-
CONTENT_TYPE_ICO
ConstantCONTENT_TYPE_SVG="image/svg+xml"
- See Also:
-
CONTENT_TYPE_PDF
ConstantCONTENT_TYPE_PDF="application/pdf"
- See Also:
-
CONTENT_TYPE_GIF
ConstantCONTENT_TYPE_GIF="application/gif"
- See Also:
-
CONTENT_TYPE_VIDEO
ConstantCONTENT_TYPE_VIDEO="video"
- See Also:
-
CONTENT_TYPE_AUDIO
ConstantCONTENT_TYPE_AUDIO="audio"
- See Also:
-
-
Constructor Details
-
CMSMediaItem
public CMSMediaItem()default constructor -
CMSMediaItem
copy constructor- Parameters:
orig
- aCMSMediaItem
object.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getContentType
Determines this media item's file's content type via the extension.- Returns:
- Content type string
-
isHasExportableText
public boolean isHasExportableText()Checks whether this media item contains a text file that can be exported for indexing.- Returns:
- true if item content types allows for text export; false otherwise
-
getId
Getter for the field
id
.- Returns:
- the id
-
setId
Setter for the field
id
.- Parameters:
id
- the id to set
-
getFileName
Getter for the field
fileName
.- Returns:
- the fileName
-
setFileName
Setter for the field
fileName
.- Parameters:
fileName
- the fileName to set
-
getAlternativeText
Getter for the field
alternativeText
.- Returns:
- the alternativeText
-
setAlternativeText
Setter for the field
alternativeText
.- Parameters:
alternativeText
- the alternativeText to set
-
getMetadataForLocale
getMetadataForLocale.
- Parameters:
locale
- aLocale
object.- Returns:
- media item metadata for the given locale; null if no locale given
-
getMetadataForLanguage
getMetadataForLanguage.
- Parameters:
language
- aString
object.- Returns:
- media item metadata for the given locale
-
getMetadata
Getter for the field
metadata
.- Returns:
- the metadata
-
setMetadata
Setter for the field
metadata
.- Parameters:
metadata
- the metadata to set
-
addMetadata
Adds a metadata item to the list of image metadata. If a metadata item with the same language string exists, it is replaced- Parameters:
metadata
- aCMSMediaItemMetadata
object.
-
getCurrentLanguageMetadata
getCurrentLanguageMetadata.
- Returns:
- metadata list for the current language
-
hasCateories
public boolean hasCateories()hasCateories.
- Returns:
- a boolean.
-
getCategories
-
setCategories
Setter for the field
categories
.- Parameters:
categories
- aList
object.
-
removeCategory
removeCategory.
- Parameters:
cat
- aCMSCategory
object.- Returns:
- a boolean.
-
addCategory
addCategory.
- Parameters:
cat
- aCMSCategory
object.- Returns:
- a boolean.
-
isImportant
public boolean isImportant() -
setImportant
public void setImportant(boolean important) setImportant.
- Parameters:
important
- a boolean.
-
getPriority
-
setPriority
Setter for the field
priority
.- Parameters:
priority
- the priority to set
-
getLinkURI
getLinkURI.
- Specified by:
getLinkURI
in interfaceBrowseElementInfo
- Returns:
- a
URI
object.
-
getLinkURI
getLinkURI.
- Specified by:
getLinkURI
in interfaceBrowseElementInfo
- Parameters:
request
- aHttpServletRequest
object.- Returns:
- a
URI
object.
-
getLink
Getter for the field
link
.- Returns:
- the entered link url
-
setLink
set the link for this media item- Parameters:
linkUrl
- aString
object.- Throws:
URISyntaxException
- if any.
-
getDescription
getDescription.
- Specified by:
getDescription
in interfaceBrowseElementInfo
- Returns:
- a
String
object.
-
getName
getName.
- Specified by:
getName
in interfaceBrowseElementInfo
- Returns:
- a
String
object.
-
getIconURI
getIconURI.
- Specified by:
getIconURI
in interfaceBrowseElementInfo
- Returns:
- a
URI
object.
-
getIconURI
getIconURI.
- Specified by:
getIconURI
in interfaceBrowseElementInfo
- Parameters:
width
- a int.height
- a int.- Returns:
- a
URI
object.
-
getIconURI
getIconURI.
- Specified by:
getIconURI
in interfaceBrowseElementInfo
- Parameters:
size
- a int.- Returns:
- a
URI
object.
-
toString
-
getName
-
getDescription
- Specified by:
getDescription
in interfaceBrowseElementInfo
- Returns:
- a
String
object.
-
getDisplayOrder
public int getDisplayOrder() -
setDisplayOrder
public void setDisplayOrder(int displayOrder) Setter for the field
displayOrder
.- Parameters:
displayOrder
- the displayOrder to set
-
getImageURI
getImageURI.
- Returns:
- a
String
object.
-
getTranslationsForName
public de.intranda.metadata.multilanguage.IMetadataValue getTranslationsForName()getTranslationsForName.
- Specified by:
getTranslationsForName
in interfaceBrowseElementInfo
- Returns:
- a
IMetadataValue
object.
-
getTranslationsForDescription
public de.intranda.metadata.multilanguage.IMetadataValue getTranslationsForDescription()getTranslationsForDescription.
- Specified by:
getTranslationsForDescription
in interfaceBrowseElementInfo
- Returns:
- a
IMetadataValue
object.
-
isFinished
isFinished.
- Parameters:
locale
- aLocale
object.- Returns:
- a boolean.
-
getFinishedLocales
getFinishedLocales.
- Returns:
- a
List
object.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CMSMediaItem>
-
getLastModifiedTime
Getter for the field
lastModifiedTime
.- Returns:
- the lastModifiedTime. May be null only if no file exists or last modified time cannot be read
-
getFilePath
getFilePath.
- Returns:
- a
Path
object.
-
wrapCategories
wrapCategories.
- Parameters:
categories
- aList
object.- Returns:
- the categoryMap. Never null. If it isn't defined yet, create a map from all categories
-