|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.etaxonomy.cdm.model.common.CdmBase
eu.etaxonomy.cdm.model.common.VersionableEntity
eu.etaxonomy.cdm.model.common.AnnotatableEntity
eu.etaxonomy.cdm.model.common.IdentifiableEntity<IIdentifiableEntityCacheStrategy>
eu.etaxonomy.cdm.model.media.Media
@Entity @Indexed public class Media
A 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.
| Field Summary |
|---|
| Fields inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity |
|---|
cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache |
| Fields inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity |
|---|
annotations, markers |
| Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase |
|---|
uuid |
| Constructor Summary | |
|---|---|
protected |
Media()
Constructor |
| Method Summary | |
|---|---|
void |
addDescription(LanguageString description)
|
void |
addDescription(String text,
Language language)
|
void |
addRepresentation(MediaRepresentation representation)
|
void |
addTitle(LanguageString title)
Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putTitle method instead |
void |
addTitle(String title,
Language language)
Deprecated. should follow the put semantic of maps, this method will be removed in v4.0 Use the putTitle method instead |
Object |
clone()
Clones this versionable entity. |
int |
compareTo(Object o)
|
Map<Language,LanguageString> |
getAllDescriptions()
|
Map<Language,LanguageString> |
getAllTitles()
|
AgentBase |
getArtist()
|
LanguageString |
getDescription(Language language)
|
org.joda.time.DateTime |
getMediaCreated()
|
Set<MediaRepresentation> |
getRepresentations()
|
LanguageString |
getTitle()
|
LanguageString |
getTitle(Language language)
|
String |
getTitleCache()
|
String |
getTitleCacheByLanguage(Language lang)
|
static Media |
NewInstance()
Factory method |
static Media |
NewInstance(URI uri,
Integer size,
String mimeType,
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 |
putTitle(LanguageString title)
|
void |
putTitle(Language language,
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(org.joda.time.DateTime mediaCreated)
|
void |
setTitleCache(String titleCache)
Sets the title cache without changing the protectCache flag |
| Methods inherited from class eu.etaxonomy.cdm.model.common.IdentifiableEntity |
|---|
addCredit, addCredit, addExtension, addExtension, addRights, addSource, addSource, compareTo, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getLsid, getRights, getSources, getTruncatedCache, initListener, isProtectedTitleCache, regenerateTitleCache, removeCredit, removeCredit, removeExtension, removeRights, removeSource, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, toString |
| Methods inherited from class eu.etaxonomy.cdm.model.common.AnnotatableEntity |
|---|
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker |
| Methods inherited from class eu.etaxonomy.cdm.model.common.VersionableEntity |
|---|
equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy |
| Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase |
|---|
addPropertyChangeListener, addPropertyChangeListener, clone, deproxy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isInstanceOf, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface eu.etaxonomy.cdm.model.common.IAnnotatableEntity |
|---|
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker |
| Methods inherited from interface eu.etaxonomy.cdm.model.common.IVersionableEntity |
|---|
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy |
| Methods inherited from interface eu.etaxonomy.cdm.model.common.ICdmBase |
|---|
getCreated, getCreatedBy, getId, getUuid, setCreated, setCreatedBy, setId, setUuid |
| Constructor Detail |
|---|
protected Media()
| Method Detail |
|---|
public static Media NewInstance()
public static Media NewInstance(URI uri,
Integer size,
String mimeType,
String suffix)
null if uri is empty
public 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 Map<Language,LanguageString> getAllTitles()
@Deprecated public void addTitle(LanguageString title)
putTitle method instead
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(LanguageString title)
@Deprecated
public void addTitle(String title,
Language language)
putTitle method instead
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.
text - the title in a particular languagelanguage - the language in which the title string is formulatedgetTitle(),
putTitle(LanguageString)
public void putTitle(Language language,
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 String getTitleCacheByLanguage(Language lang)
public void setTitleCache(String titleCache)
IIdentifiableEntityprotectCache flag
setTitleCache in interface IIdentifiableEntitysetTitleCache in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>IIdentifiableEntity.setTitleCache(String, boolean)public String getTitleCache()
getTitleCache in interface IIdentifiableEntitygetTitleCache in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>public org.joda.time.DateTime getMediaCreated()
public void setMediaCreated(org.joda.time.DateTime mediaCreated)
public Map<Language,LanguageString> getAllDescriptions()
public LanguageString getDescription(Language language)
public void addDescription(LanguageString description)
public void addDescription(String text,
Language language)
public void removeDescription(Language language)
public Object clone()
throws CloneNotSupportedException
VersionableEntity
clone in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>CloneNotSupportedExceptionObject.clone()public int compareTo(Object o)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||