Class CMSMediaItem
- All Implemented Interfaces:
BrowseElementInfo,Serializable,Comparable<CMSMediaItem>
CMSMediaItem class.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstantCONTENT_TYPE_AUDIO="audio"static final StringConstantCONTENT_TYPE_GIF="application/gif"static final StringConstantCONTENT_TYPE_SVG="image/svg+xml"static final StringConstantCONTENT_TYPE_PDF="application/pdf"static final StringConstantCONTENT_TYPE_SVG="image/svg+xml"static final StringConstantCONTENT_TYPE_VIDEO="video"static final StringConstantCONTENT_TYPE_XML="text/xml" -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddCategory(CMSCategory cat) addCategory.voidaddMetadata(CMSMediaItemMetadata metadata) Adds a metadata item to the list of image metadata.intbooleanGetter for the fieldalternativeText.Determines this media item's file's content type via the extension.getCurrentLanguageMetadata.getDescription.getDescription(String language) intGetter 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(jakarta.servlet.http.HttpServletRequest request) getLinkURI.Getter for the fieldmetadata.getMetadataForLanguage(String language) getMetadataForLanguage.getMetadataForLocale(Locale locale) getMetadataForLocale.getName()getName.de.intranda.metadata.multilanguage.IMetadataValuegetTranslationsForDescription.de.intranda.metadata.multilanguage.IMetadataValuegetTranslationsForName.booleanhasCateories.inthashCode()booleanisFinished(Locale locale) isFinished.booleanChecks whether this media item contains a text file that can be exported for indexing.booleanbooleanremoveCategory.voidsetAlternativeText(String alternativeText) Setter for the fieldalternativeText.voidsetCategories(List<CMSCategory> categories) Setter for the fieldcategories.voidsetDisplayOrder(int displayOrder) Setter for the fielddisplayOrder.voidsetFileName(String fileName) Setter for the fieldfileName.voidSetter for the fieldid.voidsetImportant(boolean important) setImportant.voidset the link for this media itemvoidsetMetadata(List<CMSMediaItemMetadata> metadata) Setter for the fieldmetadata.voidsetPriority(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, waitMethods 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- aCMSMediaItemobject.
-
-
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- aLocaleobject.- Returns:
- media item metadata for the given locale; null if no locale given
-
getMetadataForLanguage
getMetadataForLanguage.
- Parameters:
language- aStringobject.- 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- aCMSMediaItemMetadataobject.
-
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- aListobject.
-
removeCategory
removeCategory.
- Parameters:
cat- aCMSCategoryobject.- Returns:
- a boolean.
-
addCategory
addCategory.
- Parameters:
cat- aCMSCategoryobject.- 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:
getLinkURIin interfaceBrowseElementInfo- Returns:
- a
URIobject.
-
getLinkURI
getLinkURI.
- Specified by:
getLinkURIin interfaceBrowseElementInfo- Parameters:
request- aHttpServletRequestobject.- Returns:
- a
URIobject.
-
getLink
Getter for the field
link.- Returns:
- the entered link url
-
setLink
set the link for this media item- Parameters:
linkUrl- aStringobject.- Throws:
URISyntaxException- if any.
-
getDescription
getDescription.
- Specified by:
getDescriptionin interfaceBrowseElementInfo- Returns:
- a
Stringobject.
-
getName
getName.
- Specified by:
getNamein interfaceBrowseElementInfo- Returns:
- a
Stringobject.
-
getIconURI
getIconURI.
- Specified by:
getIconURIin interfaceBrowseElementInfo- Returns:
- a
URIobject.
-
getIconURI
getIconURI.
- Specified by:
getIconURIin interfaceBrowseElementInfo- Parameters:
width- a int.height- a int.- Returns:
- a
URIobject.
-
getIconURI
getIconURI.
- Specified by:
getIconURIin interfaceBrowseElementInfo- Parameters:
size- a int.- Returns:
- a
URIobject.
-
toString
-
getName
-
getDescription
- Specified by:
getDescriptionin interfaceBrowseElementInfo- Parameters:
language-- Returns:
- a
Stringobject.
-
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
Stringobject.
-
getTranslationsForName
public de.intranda.metadata.multilanguage.IMetadataValue getTranslationsForName()getTranslationsForName.
- Specified by:
getTranslationsForNamein interfaceBrowseElementInfo- Returns:
- a
IMetadataValueobject.
-
getTranslationsForDescription
public de.intranda.metadata.multilanguage.IMetadataValue getTranslationsForDescription()getTranslationsForDescription.
- Specified by:
getTranslationsForDescriptionin interfaceBrowseElementInfo- Returns:
- a
IMetadataValueobject.
-
isFinished
isFinished.
- Parameters:
locale- aLocaleobject.- Returns:
- a boolean.
-
getFinishedLocales
getFinishedLocales.
- Returns:
- a
Listobject.
-
compareTo
- Specified by:
compareToin 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
Pathobject.
-
wrapCategories
wrapCategories.
- Parameters:
categories- aListobject.- Returns:
- the categoryMap. Never null. If it isn't defined yet, create a map from all categories
-