@Entity public class Media extends IdentifiableEntity<IIdentifiableEntityCacheStrategy> implements IMultiLanguageTextHolder, IIntextReferenceTarget, java.lang.Cloneable
media
is any kind of media that represents a media object.
This media object can have multiple media representations
that differ in MIME-type
and/or quality.
E.g.
(1) an image can have a tiff and a jpg media representation.
(2) an formatted text can have a text/html or an application/pdf representation.cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
annotations, markers
CLOB_LENGTH, uuid
Modifier | Constructor and Description |
---|---|
protected |
Media()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addDescription(LanguageString description) |
IdentifiableSource |
addPrimaryMediaSource(Reference citation,
java.lang.String microCitation) |
void |
addRepresentation(MediaRepresentation representation) |
java.lang.Object |
clone()
Clones this versionable entity.
|
int |
compareTo(java.lang.Object o) |
java.util.Map<Language,LanguageString> |
getAllDescriptions() |
java.util.Map<Language,LanguageString> |
getAllTitles() |
AgentBase |
getArtist() |
LanguageString |
getDescription(Language language) |
TimePeriod |
getMediaCreated() |
java.util.Set<MediaRepresentation> |
getRepresentations() |
LanguageString |
getTitle() |
LanguageString |
getTitle(Language language) |
java.lang.String |
getTitleCache()
Returns the title cache.
|
java.lang.String |
getTitleCacheByLanguage(Language lang) |
static Media |
NewInstance()
Factory method
|
static Media |
NewInstance(java.net.URI uri,
java.lang.Integer size,
java.lang.String mimeType,
java.lang.String suffix)
Factory method which creates a new media, adds a reprsentation including mime type and suffix information
and adds to the later a representation part for a given uri and size
Returns
null if uri is empty |
void |
putDescription(Language language,
java.lang.String text) |
void |
putTitle(LanguageString title)
Adds the languageString to the
multilanguage text
used to be the title of this media. |
void |
putTitle(Language language,
java.lang.String title)
Creates a
language string based on the given text string
and the given language and adds it to the multilanguage text
used to be the title of this media. |
void |
removeDescription(Language language) |
void |
removeRepresentation(MediaRepresentation representation) |
void |
removeTitle(Language language) |
void |
setArtist(AgentBase artist) |
void |
setMediaCreated(TimePeriod mediaCreated) |
void |
setTitleCache(java.lang.String titleCache)
Puts the title into the title field which is a multi-language string
with default language as language
|
addCredit, addCredit, addExtension, addExtension, addIdentifier, addIdentifier, addIdentifier, addRights, addSource, addSources, createNewSource, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getExtensionsConcat, getExtensionsConcat, getFilteredExtensions, getIdentifiers, getIdentifiers, getIdentifiers, getLsid, getRights, getTruncatedCache, hasEmptyTitleCache, hasExtension, hasExtension, initListener, isProtectedTitleCache, removeCredit, removeCredit, removeExtension, removeIdentifier, removeIdentifier, removeRights, replaceCredit, replaceIdentifier, resetTitleCache, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, toString, updateCaches, updateCaches
addAggregationSource, addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, addSource, getSources, removeSource, removeSources
addAnnotation, addMarker, addMarker, getAnnotations, getAnnotations, getMarkers, getMarkers, hasMarker, hasMarker, markerValue, removeAnnotation, removeMarker, removeMarker, setAnnotations
cloneLanguageString, equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
addPropertyChangeListener, addPropertyChangeListener, addToSetWithChangeEvent, deproxy, deproxy, fireOnCreateEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUserFriendlyDescription, getUserFriendlyFieldName, getUserFriendlyTypeName, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isBlank, isInstanceOf, isNotBlank, isPersited, removeFromSetWithChangeEvent, removePropertyChangeListener, removePropertyChangeListener, replaceInList, setCreated, setCreatedBy, setId, setNewEntityListener, setUuid
finalize, getClass, notify, notifyAll, wait, wait, wait
getCreated, getCreatedBy, getId, getUuid, isInstanceOf, isPersited, setCreated, setCreatedBy, setId, setUuid
removeSources
addAggregationSource, addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, addSource, getSources, removeSource
addAnnotation, addMarker, getAnnotations, getMarkers, getMarkers, hasMarker, hasMarker, markerValue, removeAnnotation, removeMarker, removeMarker
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
public static Media NewInstance()
public static Media NewInstance(java.net.URI uri, java.lang.Integer size, java.lang.String mimeType, java.lang.String suffix)
null
if uri is emptypublic java.util.Set<MediaRepresentation> getRepresentations()
public void addRepresentation(MediaRepresentation representation)
public void removeRepresentation(MediaRepresentation representation)
public AgentBase getArtist()
public void setArtist(AgentBase artist)
public LanguageString getTitle()
public LanguageString getTitle(Language language)
public java.util.Map<Language,LanguageString> getAllTitles()
public void putTitle(LanguageString title)
multilanguage text
used to be the title of this media.title
- the languageString with the title in a particular languagegetTitle()
,
#putTitle(Language String)
public void putTitle(Language language, java.lang.String title)
language string
based on the given text string
and the given language
and adds it to the multilanguage text
used to be the title of this media.language
- the language in which the title string is formulatedtext
- the title in a particular languagegetTitle()
,
putTitle(LanguageString)
public void removeTitle(Language language)
public java.lang.String getTitleCacheByLanguage(Language lang)
public void setTitleCache(java.lang.String titleCache)
setTitleCache
in interface IIdentifiableEntity
setTitleCache
in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>
IIdentifiableEntity.setTitleCache(String, boolean)
,
IIdentifiableEntity.getTitleCache()
public java.lang.String getTitleCache()
IIdentifiableEntity
getTitleCache
in interface IIdentifiableEntity
getTitleCache
in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>
IIdentifiableEntity.generateTitle()
public TimePeriod getMediaCreated()
public void setMediaCreated(TimePeriod mediaCreated)
public java.util.Map<Language,LanguageString> getAllDescriptions()
public LanguageString getDescription(Language language)
public void addDescription(LanguageString description)
public void putDescription(Language language, java.lang.String text)
public void removeDescription(Language language)
public IdentifiableSource addPrimaryMediaSource(Reference citation, java.lang.String microCitation)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
VersionableEntity
clone
in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>
java.lang.CloneNotSupportedException
Object.clone()
public int compareTo(java.lang.Object o)
Copyright © 2007-2020 EDIT. All Rights Reserved.