eu.etaxonomy.cdm.model.common
Class TermVocabulary<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.TermVocabulary<T>
- All Implemented Interfaces:
- IAnnotatableEntity, ICdmBase, IIdentifiableEntity, ISourceable<IdentifiableSource>, IVersionableEntity, Serializable, Cloneable, Iterable<T>
- Direct Known Subclasses:
- OrderedTermVocabulary
@Entity
@Indexed(index="eu.etaxonomy.cdm.model.common.TermVocabulary")
public class TermVocabulary<T extends DefinedTermBase>
- extends TermBase
- implements Iterable<T>
A single enumeration must only contain DefinedTerm instances of one kind
(this means a subclass of DefinedTerm).
- 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 |
terms
@IndexedEmbedded(depth=2)
protected Set<T extends DefinedTermBase> terms
TermVocabulary
protected TermVocabulary()
TermVocabulary
protected TermVocabulary(String term,
String label,
String labelAbbrev,
URI termSourceUri)
NewInstance
public static TermVocabulary NewInstance(String description,
String label,
String abbrev,
URI termSourceUri)
findTermByUuid
public T findTermByUuid(UUID uuid)
getTerms
public Set<T> getTerms()
addTerm
public void addTerm(T term)
removeTerm
public void removeTerm(T term)
getTermSourceUri
public URI getTermSourceUri()
setTermSourceUri
public void setTermSourceUri(URI vocabularyUri)
iterator
public Iterator<T> iterator()
- Specified by:
iterator in interface Iterable<T extends DefinedTermBase>
size
public int size()
getTermsOrderedByLabels
public SortedSet<T> getTermsOrderedByLabels(Language language)
- Returns all terms of this vocabulary sorted by their representation defined by the given language.
If such an representation does not exist, the representation of the default language is testing instead for ordering.
- Parameters:
language -
- Returns:
readCsvLine
public TermVocabulary<T> readCsvLine(List<String> csvLine)
readCsvLine
public TermVocabulary<T> readCsvLine(List<String> csvLine,
Language lang)
clone
public Object clone()
- Clones this TermVocabulary. This is a shortcut that enables to create
a new instance that differs only slightly from this TermVocabulary.
The terms of the original vocabulary are cloned
- Overrides:
clone in class TermBase
- See Also:
TermBase.clone(),
Object.clone()
Copyright © 2007-2013 EDIT. All Rights Reserved.