eu.etaxonomy.cdm.model.common
Class TermBase
java.lang.Object
eu.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.common.TermBase
- All Implemented Interfaces:
- IAnnotatableEntity, ICdmBase, IIdentifiableEntity, ISourceable<IdentifiableSource>, IVersionableEntity, Serializable, Cloneable
- Direct Known Subclasses:
- DefinedTermBase, FeatureTree, TermVocabulary
@MappedSuperclass
public abstract class TermBase
- extends IdentifiableEntity<IIdentifiableEntityCacheStrategy>
- See Also:
- Serialized Form
| Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase |
uuid |
| 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, getTitleCache, getTruncatedCache, initListener, isProtectedTitleCache, regenerateTitleCache, removeCredit, removeCredit, removeExtension, removeRights, removeSource, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache |
| 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 |
TermBase
public TermBase()
TermBase
public TermBase(String term,
String label,
String labelAbbrev)
getRepresentations
public Set<Representation> getRepresentations()
addRepresentation
public void addRepresentation(Representation representation)
removeRepresentation
public void removeRepresentation(Representation representation)
getRepresentation
public Representation getRepresentation(Language lang)
getPreferredRepresentation
public Representation getPreferredRepresentation(Language language)
- Parameters:
language -
- Returns:
- See Also:
getPreferredRepresentation(Language)
getPreferredRepresentation
public Representation getPreferredRepresentation(List<Language> languages)
- Returns the Representation in the preferred language. Preferred languages
are specified by the parameter languages, which receives a list of
Language instances in the order of preference. If no representation in
any preferred languages is found the method falls back to return the
Representation in Language.DEFAULT() and if necessary further falls back
to return the first element found if any.
TODO think about this fall-back strategy &
see also
TextData.getPreferredLanguageString(List)
- Parameters:
languages -
- Returns:
getUri
public URI getUri()
setUri
public void setUri(URI uri)
getLabel
public String getLabel()
getLabel
public String getLabel(Language lang)
setLabel
public void setLabel(String label)
setLabel
public void setLabel(String label,
Language language)
getDescription
public String getDescription()
getDescription
public String getDescription(Language lang)
equals
public boolean equals(Object obj)
- Description copied from class:
VersionableEntity
- Is true if UUID and created timestamp are the same for the passed Object and this one.
- Overrides:
equals in class VersionableEntity
- See Also:
See {@link http://www.hibernate.org/109.html hibernate109}, {@link http://www.geocities.com/technofundo/tech/java/equalhash.html geocities}
or {@link http://www.ibm.com/developerworks/java/library/j-jtp05273.html ibm}
for more information about equals and hashcode.
toString
public String toString()
- Description copied from class:
CdmBase
- Overrides
Object.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().
Specification: This method should never call other object' methods so it can be well used for debugging
without problems like lazy loading, unreal states etc.
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>
- Specified by:
toString in interface IIdentifiableEntity- Overrides:
toString in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>
- See Also:
Object.toString()
clone
public Object clone()
throws CloneNotSupportedException
- Clones this TermBase. This is a shortcut that enables to create
a new instance that differs only slightly from this TermBase by
modifying only some of the attributes.
- Overrides:
clone in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>
- Throws:
CloneNotSupportedException- See Also:
IdentifiableEntity.clone(),
Object.clone()
Copyright © 2007-2013 EDIT. All Rights Reserved.