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.TermBase
- All Implemented Interfaces:
- ICdmBase, Serializable
- Direct Known Subclasses:
- DefinedTermBase, FeatureTree, TermVocabulary
public abstract class TermBase
- extends VersionableEntity
- See Also:
- Serialized Form
Methods inherited from class eu.etaxonomy.cdm.model.common.VersionableEntity |
clone, getNextVersion, getPreviousVersion, getUpdated, getUpdatedBy, getValidFrom, getValidTo, hashCode, setNextVersion, setPreviousVersion, setUpdated, setUpdatedBy |
Methods inherited from class eu.etaxonomy.cdm.model.common.CdmBase |
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUuid, hasListeners, invokeSetMethod, invokeSetMethodWithNull, removePropertyChangeListener, removePropertyChangeListener, setCreated, setCreatedBy, setId, setUuid |
TermBase
public TermBase()
TermBase
public TermBase(String term,
String label,
String labelAbbrev)
getRepresentations
public Set<Representation> getRepresentations()
setRepresentations
public void setRepresentations(Set<Representation> representations)
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 nessecary further falls back
to return the first element found.
TODO think about this fall-back strategy!
- Parameters:
languages
-
- Returns:
getUri
public String getUri()
setUri
public void setUri(String uri)
getLabel
public String getLabel()
getLabel
public String getLabel(Language lang)
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 beeing necessarily unique.
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
- Overrides:
toString
in class CdmBase
- See Also:
Object.toString()
Copyright © 2008. All Rights Reserved.