@Entity @Indexed(index="eu.etaxonomy.cdm.model.taxon.Classification") public class Classification extends IdentifiableEntity<IIdentifiableEntityCacheStrategy<Classification>> implements IReferencedEntity, ITaxonTreeNode, java.lang.Cloneable
cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
annotations, markers
CLOB_LENGTH, uuid
Modifier | Constructor and Description |
---|---|
protected |
Classification() |
protected |
Classification(java.lang.String name,
Reference reference,
Language language) |
Modifier and Type | Method and Description |
---|---|
TaxonNode |
addChildNode(TaxonNode childNode,
int index,
Reference citation,
java.lang.String microCitation)
Adds a taxon node as a child of this
ITreeNode at the index position. |
TaxonNode |
addChildNode(TaxonNode childNode,
Reference citation,
java.lang.String microCitation)
Adds a taxon node as a child of the ITreeNode at the last position.
|
TaxonNode |
addChildTaxon(Taxon taxon,
int index,
Reference citation,
java.lang.String microCitation)
Adds a taxon as a child of the ITreeNode at the index position.
|
TaxonNode |
addChildTaxon(Taxon taxon,
Reference citation,
java.lang.String microCitation)
Adds a taxon as a child of the ITreeNode at the last position.
|
void |
addGeoScope(NamedArea geoScope)
Adds a
named area to the set of named areas
delimiting the geospatial area where this Classification is valid. |
TaxonNode |
addParentChild(Taxon parent,
Taxon child,
Reference citation,
java.lang.String microCitation)
Relates two taxa as parent-child nodes within a classification.
|
java.lang.Object |
clone()
Clones this classification.
|
int |
compareTo(java.lang.Object o) |
boolean |
deleteChildNode(TaxonNode node)
This recursively removes all child nodes from this node and from this taxonomic view.
|
boolean |
deleteChildNode(TaxonNode node,
boolean deleteChildren) |
java.lang.String |
generateTitle()
Returns a title cache String created by the according cache strategy
with the given identifiable entity WITHOUT setting the titleCache
of
this object. |
java.util.Set<TaxonNode> |
getAllNodes()
Returns a set containing all nodes in this classification.
|
java.util.List<TaxonNode> |
getChildNodes()
Returns the list of direct child nodes of
this ITreeNode. |
Reference |
getCitation() |
java.util.Map<Language,LanguageString> |
getDescription()
Returns the i18n description used to describe
this
Classification . |
java.util.Set<NamedArea> |
getGeoScopes()
Returns the set of
named areas indicating the geospatial
data where this Classification is valid. |
java.lang.String |
getMicroReference() |
LanguageString |
getName() |
TaxonNode |
getNode(Taxon taxon)
Checks if the given taxon is part of this tree.
|
Reference |
getReference() |
TaxonNode |
getRootNode()
Returns the topmost
taxon node (root node) of this
classification. |
TimePeriod |
getTimeperiod()
The point in time, the time period or the season for which this description element
is valid.
|
TaxonNode |
getTopmostNode(Taxon taxon)
Checks if the taxon is a direct child of the root of this tree and returns the according node if true.
|
boolean |
hasChildNodes()
Whether this TreeNode has child nodes attached
|
boolean |
isTaxonInTree(Taxon taxon)
Checks if the given taxon is part of this tree.
|
boolean |
isTopmostInTree(Taxon taxon)
Checks if the given taxon is one of the topmost taxa in this tree.
|
void |
makeTopmostNodeChildOfOtherNode(TaxonNode topmostNode,
TaxonNode otherNode,
Reference ref,
java.lang.String microReference)
Appends an existing topmost node to another node of this tree.
|
static Classification |
NewInstance(java.lang.String name) |
static Classification |
NewInstance(java.lang.String name,
Language language) |
static Classification |
NewInstance(java.lang.String name,
Reference reference) |
static Classification |
NewInstance(java.lang.String name,
Reference reference,
Language language) |
void |
putDescription(LanguageString description)
Adds a translated
text in a particular language
to the description used to describe
this Classification . |
void |
putDescription(Language language,
java.lang.String text)
Creates a
language string based on the given text string
and the given language and adds it to the multilanguage text
used to describe this Classification . |
protected boolean |
removeChildNode(TaxonNode node) |
void |
removeDescription(Language language)
Removes from the
description used to describe
this Classification the one language string
with the given language . |
void |
removeGeoScope(NamedArea geoScope)
Removes one element from the set of
named areas delimiting
the geospatial area where this Classification is valid. |
boolean |
removeRootNode() |
void |
setMicroReference(java.lang.String microReference) |
void |
setName(LanguageString name) |
void |
setReference(Reference reference) |
void |
setRootNode(TaxonNode root) |
void |
setTimeperiod(TimePeriod timeperiod) |
addCredit, addCredit, addExtension, addExtension, addIdentifier, addIdentifier, addIdentifier, addRights, addSource, addSources, createNewSource, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getExtensionsConcat, getExtensionsConcat, getFilteredExtensions, getIdentifiers, getIdentifiers, getIdentifiers, getLsid, getRights, getTitleCache, getTruncatedCache, hasEmptyTitleCache, hasExtension, hasExtension, initListener, isProtectedTitleCache, removeCredit, removeCredit, removeExtension, removeIdentifier, removeIdentifier, removeRights, replaceCredit, replaceIdentifier, resetTitleCache, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache, toString, updateCaches, updateCaches
addAggregationSource, addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, addSource, getSources, removeSource, removeSources
addAnnotation, addMarker, addMarker, getAnnotations, getAnnotations, getMarkers, getMarkers, hasMarker, hasMarker, markerValue, removeAnnotation, removeMarker, removeMarker, setAnnotations
cloneLanguageString, equals, getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
addPropertyChangeListener, addPropertyChangeListener, addToSetWithChangeEvent, deproxy, deproxy, fireOnCreateEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCreated, getCreatedBy, getId, getUserFriendlyDescription, getUserFriendlyFieldName, getUserFriendlyTypeName, getUuid, hashCode, hasListeners, instanceToString, invokeSetMethod, invokeSetMethodWithNull, isBlank, isInstanceOf, isNotBlank, isPersited, removeFromSetWithChangeEvent, removePropertyChangeListener, removePropertyChangeListener, replaceInList, setCreated, setCreatedBy, setId, setNewEntityListener, setUuid
finalize, getClass, notify, notifyAll, wait, wait, wait
addAnnotation, addMarker, getAnnotations, getMarkers, getMarkers, hasMarker, hasMarker, markerValue, removeAnnotation, removeMarker, removeMarker
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
getCreated, getCreatedBy, getId, getUuid, isInstanceOf, isPersited, setCreated, setCreatedBy, setId, setUuid
removeSources
addAggregationSource, addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, addSource, getSources, removeSource
public static Classification NewInstance(java.lang.String name)
public static Classification NewInstance(java.lang.String name, Language language)
public static Classification NewInstance(java.lang.String name, Reference reference)
public static Classification NewInstance(java.lang.String name, Reference reference, Language language)
public TaxonNode getRootNode()
taxon node
(root node) of this
classification. The root node does not have any parent and no taxon. Since taxon nodes
recursively point to their child nodes the complete classification is
defined by its root node.public void setRootNode(TaxonNode root)
public TaxonNode addChildNode(TaxonNode childNode, Reference citation, java.lang.String microCitation)
ITaxonTreeNode
addChildNode
in interface ITaxonTreeNode
public TaxonNode addChildNode(TaxonNode childNode, int index, Reference citation, java.lang.String microCitation)
ITaxonTreeNode
ITreeNode
at the index position.addChildNode
in interface ITaxonTreeNode
public TaxonNode addChildTaxon(Taxon taxon, Reference citation, java.lang.String microCitation)
ITaxonTreeNode
addChildTaxon
in interface ITaxonTreeNode
public TaxonNode addChildTaxon(Taxon taxon, int index, Reference citation, java.lang.String microCitation)
ITaxonTreeNode
addChildTaxon
in interface ITaxonTreeNode
public boolean deleteChildNode(TaxonNode node)
ITaxonTreeNode
deleteChildNode
in interface ITaxonTreeNode
public boolean deleteChildNode(TaxonNode node, boolean deleteChildren)
protected boolean removeChildNode(TaxonNode node)
public boolean removeRootNode()
public void makeTopmostNodeChildOfOtherNode(TaxonNode topmostNode, TaxonNode otherNode, Reference ref, java.lang.String microReference) throws java.lang.IllegalArgumentException
topmostNode
- otherNode
- ref
- microReference
- java.lang.IllegalArgumentException
public boolean isTaxonInTree(Taxon taxon)
taxon
- public TaxonNode getNode(Taxon taxon)
null
is returned.taxon
- public boolean isTopmostInTree(Taxon taxon)
taxon
- public TaxonNode getTopmostNode(Taxon taxon)
null
otherwise.taxon
- public TaxonNode addParentChild(Taxon parent, Taxon child, Reference citation, java.lang.String microCitation) throws java.lang.IllegalStateException
parent
- child
- citation
- microCitation
- java.lang.IllegalStateException
- If the child is a child of another parent alreadypublic Reference getCitation()
getCitation
in interface IReferencedEntity
public LanguageString getName()
public void setName(LanguageString name)
public java.util.Set<TaxonNode> getAllNodes()
public java.util.List<TaxonNode> getChildNodes()
ITaxonTreeNode
this
ITreeNode.getChildNodes
in interface ITaxonTreeNode
public Reference getReference()
getReference
in interface ITaxonTreeNode
public void setReference(Reference reference)
public java.lang.String getMicroReference()
getMicroReference
in interface ITaxonTreeNode
public void setMicroReference(java.lang.String microReference)
public TimePeriod getTimeperiod()
public void setTimeperiod(TimePeriod timeperiod)
getTimeperiod()
public java.util.Set<NamedArea> getGeoScopes()
named areas
indicating the geospatial
data where this Classification
is valid.public void addGeoScope(NamedArea geoScope)
named area
to the set of named areas
delimiting the geospatial area where this Classification
is valid.geoScope
- the named area to be additionally assigned to this taxon descriptiongetGeoScopes()
public void removeGeoScope(NamedArea geoScope)
named areas
delimiting
the geospatial area where this Classification
is valid.geoScope
- the named area which should be removedgetGeoScopes()
,
addGeoScope(NamedArea)
public java.util.Map<Language,LanguageString> getDescription()
Classification
. The different language strings
contained in the multilanguage text should all have the same meaning.public void putDescription(LanguageString description)
text in a particular language
to the description
used to describe
this Classification
.description
- the language string describing the individuals association
in a particular languagegetDescription()
,
putDescription(Language, String)
public void putDescription(Language language, java.lang.String text)
language string
based on the given text string
and the given language
and adds it to the multilanguage text
used to describe this Classification
.text
- the string describing the individuals association
in a particular languagelanguage
- the language in which the text string is formulatedgetDescription()
,
putDescription(LanguageString)
public void removeDescription(Language language)
description
used to describe
this Classification
the one language string
with the given language
.language
- the language in which the language string to be removed
has been formulatedgetDescription()
public java.lang.String generateTitle()
IIdentifiableEntity
this
object.
This method is meant for internal use and usually not needed for
external use. Use IIdentifiableEntity.getTitleCache()
instead.generateTitle
in interface IIdentifiableEntity
generateTitle
in class IdentifiableEntity<IIdentifiableEntityCacheStrategy<Classification>>
IIdentifiableEntity.getTitleCache()
public int compareTo(java.lang.Object o)
public boolean hasChildNodes()
ITaxonTreeNode
hasChildNodes
in interface ITaxonTreeNode
public java.lang.Object clone()
clone
in class IdentifiableEntity<IIdentifiableEntityCacheStrategy<Classification>>
eu.etaxonomy.cdm.model.media.IdentifiableEntity#clone()
,
Object.clone()
Copyright © 2007-2020 EDIT. All Rights Reserved.