eu.etaxonomy.cdm.model.common
Class DefinedTermBase<T extends DefinedTermBase>
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
eu.etaxonomy.cdm.model.common.DefinedTermBase<T>
- All Implemented Interfaces:
- IAnnotatableEntity, ICdmBase, IDefinedTerm<T>, IIdentifiableEntity, ILoadableTerm<T>, ISourceable<IdentifiableSource>, IVersionableEntity, Serializable, Cloneable
- Direct Known Subclasses:
- AnnotationType, DerivationEventType, ExtensionType, Feature, InstitutionType, Language, MarkerType, MeasurementUnit, NamedAreaType, NaturalLanguageTerm, OrderedTermBase, PreservationMethod, ReferenceSystem, RightsTerm, StatisticalMeasure, TextFormat
@Entity
@ClassBridge(impl=DefinedTermBaseClassBridge.class)
public abstract class DefinedTermBase<T extends DefinedTermBase>
- extends TermBase
- implements ILoadableTerm<T>, IDefinedTerm<T>
workaround for enumerations, base type according to TDWG. For linear ordering
use partOf relation and BreadthFirst. Default iterator order should therefore
be BreadthFirst (not DepthFirst)
- Version:
- 1.0
- Author:
- m.doering
- See Also:
- Serialized Form
| Fields inherited from class eu.etaxonomy.cdm.model.common.CdmBase |
uuid |
| Methods inherited from class eu.etaxonomy.cdm.model.common.TermBase |
addRepresentation, equals, getDescription, getDescription, getLabel, getLabel, getPreferredRepresentation, getPreferredRepresentation, getRepresentation, getRepresentations, getUri, removeRepresentation, setLabel, setLabel, setUri, toString |
| 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 |
partOf
protected T extends DefinedTermBase partOf
vocabulary
protected TermVocabulary<T extends DefinedTermBase> vocabulary
DefinedTermBase
public DefinedTermBase()
DefinedTermBase
public DefinedTermBase(String term,
String label,
String labelAbbrev)
resetTerms
public abstract void resetTerms()
setDefaultTerms
protected abstract void setDefaultTerms(TermVocabulary<T> termVocabulary)
readCsvLine
public T readCsvLine(Class<T> termClass,
List<String> csvLine,
Map<UUID,DefinedTermBase> terms)
- Description copied from interface:
ILoadableTerm
- Fills the
term with contents from a csvLine. If the csvLine represents the default language
the csvLine attributes are merged into the existing default language and the default Language is returned.
- Specified by:
readCsvLine in interface ILoadableTerm<T extends DefinedTermBase>
- Returns:
readCsvLine
protected static <TERM extends DefinedTermBase> TERM readCsvLine(TERM newInstance,
List<String> csvLine,
Language lang)
writeCsvLine
public void writeCsvLine(au.com.bytecode.opencsv.CSVWriter writer,
T term)
- Specified by:
writeCsvLine in interface ILoadableTerm<T extends DefinedTermBase>
getByUuid
public T getByUuid(UUID uuid)
- Specified by:
getByUuid in interface IDefinedTerm<T extends DefinedTermBase>
getKindOf
public T getKindOf()
- Description copied from interface:
IDefinedTerm
- Returns the defined term this term is a kind of.
Therefore the returned term is a generalization of
this term
- Specified by:
getKindOf in interface IDefinedTerm<T extends DefinedTermBase>
setKindOf
public void setKindOf(T kindOf)
getGeneralizationOf
public Set<T> getGeneralizationOf()
- Description copied from interface:
IDefinedTerm
- Returns all defined terms this term is a generalization for.
Therefore the returned terms are kind of
this term
- Specified by:
getGeneralizationOf in interface IDefinedTerm<T extends DefinedTermBase>
setGeneralizationOf
protected void setGeneralizationOf(Set<T> value)
addGeneralizationOf
public void addGeneralizationOf(T generalization)
removeGeneralization
public void removeGeneralization(T generalization)
getPartOf
public T getPartOf()
- Description copied from interface:
IDefinedTerm
- Returns the defined term this term is a part of.
Therefore the returned term includes
this term
- Specified by:
getPartOf in interface IDefinedTerm<T extends DefinedTermBase>
setPartOf
public void setPartOf(T partOf)
getIncludes
public Set<T> getIncludes()
- Description copied from interface:
IDefinedTerm
- Returns all defined terms this term includes.
Therefore the returned terms are part of
this term
- Specified by:
getIncludes in interface IDefinedTerm<T extends DefinedTermBase>
setIncludes
protected void setIncludes(Set<T> includes)
addIncludes
public void addIncludes(T includes)
removeIncludes
public void removeIncludes(T includes)
getMedia
public Set<Media> getMedia()
- Specified by:
getMedia in interface IDefinedTerm<T extends DefinedTermBase>
addMedia
public void addMedia(Media media)
removeMedia
public void removeMedia(Media media)
getVocabulary
public TermVocabulary<T> getVocabulary()
- Returns:
setVocabulary
protected void setVocabulary(TermVocabulary<T> newVocabulary)
- Parameters:
newVocabulary -
clone
public Object clone()
- Clones this DefinedTermBase. This is a shortcut that enables to create
a new instance that differs only slightly from this defined term base by
modifying only some of the attributes.
- Overrides:
clone in class TermBase
- See Also:
TermBase.clone(),
Object.clone()
Copyright © 2007-2013 EDIT. All Rights Reserved.