|
||||||||||
| 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<S>
@MappedSuperclass public abstract class IdentifiableEntity<S extends IIdentifiableEntityCacheStrategy>
Superclass for the primary CDM classes that can be referenced from outside via LSIDs and contain a simple generated title string as a label for human reading.
All subclasses inherit the ability to store additional properties that are stored as Extensions, basically a string value with a type term.
Any number of right statements can be attached as well as multiple OriginalSourceBase objects.
Original sources carry a reference to the source, an ID within that source and the original title/label of this object as it was used in that source (originalNameString).
A Taxon for example that was taken from 2 sources like FaunaEuropaea and IPNI would have two originalSource objects.
The originalSource representing that taxon as it was found in IPNI would contain IPNI as the reference, the IPNI id of the taxon and the name of the taxon exactly as it was used in IPNI.
| Field Summary | |
|---|---|
protected S |
cacheStrategy
|
static boolean |
NOT_PROTECTED
|
static boolean |
PROTECTED
|
protected boolean |
protectedTitleCache
|
protected String |
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 |
IdentifiableEntity()
|
| Method Summary | |
|---|---|
void |
addCredit(Credit credit)
|
void |
addCredit(Credit credit,
int index)
|
void |
addExtension(Extension extension)
|
void |
addExtension(String value,
ExtensionType extensionType)
|
void |
addRights(Rights right)
|
void |
addSource(IdentifiableSource source)
Adds a source to this object |
IdentifiableSource |
addSource(String id,
String idNamespace,
Reference citation,
String microCitation)
Adds a source that is newly created by its components. |
Object |
clone()
Clones this versionable entity. |
int |
compareTo(IdentifiableEntity identifiableEntity)
|
String |
generateTitle()
|
S |
getCacheStrategy()
Returns the cache strategy used to generate
several strings corresponding to this identifiable entity
(in particular taxon name caches and author strings). |
List<Credit> |
getCredits()
|
Credit |
getCredits(Integer index)
|
byte[] |
getData()
By default, we expect most cdm objects to be abstract things i.e. |
Set<Extension> |
getExtensions()
|
Set<String> |
getExtensions(ExtensionType type)
|
Set<String> |
getExtensions(UUID extensionTypeUuid)
|
LSID |
getLsid()
|
Set<Rights> |
getRights()
|
Set<IdentifiableSource> |
getSources()
Returns the set of original sources (citations) for this sourceable object |
String |
getTitleCache()
|
protected String |
getTruncatedCache(String cache)
|
protected void |
initListener()
|
boolean |
isProtectedTitleCache()
|
protected boolean |
regenerateTitleCache()
The titleCache will be regenerated from scratch if not protected |
void |
removeCredit(Credit credit)
|
void |
removeCredit(int index)
|
void |
removeExtension(Extension extension)
|
void |
removeRights(Rights right)
|
void |
removeSource(IdentifiableSource source)
Removes a source from this object |
void |
setCacheStrategy(S cacheStrategy)
|
void |
setLsid(LSID lsid)
|
void |
setProtectedTitleCache(boolean protectedTitleCache)
|
void |
setTitleCache(String titleCache)
Sets the title cache without changing the protectCache flag |
void |
setTitleCache(String titleCache,
boolean protectCache)
|
String |
toString()
Overrides Object.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 |
| Field Detail |
|---|
public static final boolean PROTECTED
public static final boolean NOT_PROTECTED
@NotEmpty(groups=Level2.class)
@Size(max=255)
@Fields(value={@Field(store=YES),@Field(name="titleCache__sort",analyze=NO,store=YES)})
@FieldBridge(impl=StripHtmlBridge.class)
protected String titleCache
protected boolean protectedTitleCache
protected S extends IIdentifiableEntityCacheStrategy cacheStrategy
| Constructor Detail |
|---|
protected IdentifiableEntity()
| Method Detail |
|---|
protected void initListener()
public byte[] getData()
getData in interface IIdentifiableEntitypublic String getTitleCache()
getTitleCache in interface IIdentifiableEntityprotected boolean regenerateTitleCache()
true if title cache was regenerated, false otherwisepublic void setTitleCache(String titleCache)
IIdentifiableEntityprotectCache flag
setTitleCache in interface IIdentifiableEntityIIdentifiableEntity.setTitleCache(String, boolean)
public void setTitleCache(String titleCache,
boolean protectCache)
setTitleCache in interface IIdentifiableEntityprotected String getTruncatedCache(String cache)
cache -
public LSID getLsid()
getLsid in interface IIdentifiableEntitypublic void setLsid(LSID lsid)
setLsid in interface IIdentifiableEntitypublic Set<Rights> getRights()
getRights in interface IIdentifiableEntitypublic void addRights(Rights right)
addRights in interface IIdentifiableEntitypublic void removeRights(Rights right)
removeRights in interface IIdentifiableEntitypublic List<Credit> getCredits()
getCredits in interface IIdentifiableEntitypublic Credit getCredits(Integer index)
getCredits in interface IIdentifiableEntitypublic void addCredit(Credit credit)
addCredit in interface IIdentifiableEntity
public void addCredit(Credit credit,
int index)
addCredit in interface IIdentifiableEntitypublic void removeCredit(Credit credit)
removeCredit in interface IIdentifiableEntitypublic void removeCredit(int index)
removeCredit in interface IIdentifiableEntitypublic Set<Extension> getExtensions()
getExtensions in interface IIdentifiableEntitypublic Set<String> getExtensions(ExtensionType type)
type -
public Set<String> getExtensions(UUID extensionTypeUuid)
extensionTypeUuid -
public void addExtension(String value,
ExtensionType extensionType)
public void addExtension(Extension extension)
addExtension in interface IIdentifiableEntitypublic void removeExtension(Extension extension)
removeExtension in interface IIdentifiableEntitypublic boolean isProtectedTitleCache()
isProtectedTitleCache in interface IIdentifiableEntitypublic void setProtectedTitleCache(boolean protectedTitleCache)
setProtectedTitleCache in interface IIdentifiableEntitypublic Set<IdentifiableSource> getSources()
ISourceable
getSources in interface ISourceable<IdentifiableSource>public void addSource(IdentifiableSource source)
ISourceable
addSource in interface ISourceable<IdentifiableSource>
public IdentifiableSource addSource(String id,
String idNamespace,
Reference citation,
String microCitation)
ISourceablenull
no source is added.
- Specified by:
addSource in interface ISourceable<IdentifiableSource>
public void removeSource(IdentifiableSource source)
ISourceable
removeSource in interface ISourceable<IdentifiableSource>public String toString()
CdmBaseObject.toString().
This returns an String that identifies the object well without being necessarily unique. Internally the method is delegating the
call to {link CdmBase.instanceToString().Note: If overriding this method's javadoc always copy or link the above requirement. If not overwritten by a subclass method returns the class, id and uuid as a string for any CDM object.
For example: Taxon#13<b5938a98-c1de-4dda-b040-d5cc5bfb3bc0>
toString in interface IIdentifiableEntitytoString in class CdmBaseObject.toString()public int compareTo(IdentifiableEntity identifiableEntity)
public S getCacheStrategy()
cache strategy used to generate
several strings corresponding to this identifiable entity
(in particular taxon name caches and author strings).
IIdentifiableEntityCacheStrategypublic void setCacheStrategy(S cacheStrategy)
getCacheStrategy()public String generateTitle()
generateTitle in interface IIdentifiableEntity
public Object clone()
throws CloneNotSupportedException
VersionableEntity
clone in class AnnotatableEntityCloneNotSupportedExceptionObject.clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||