@Entity public class FeatureTree<T extends DefinedTermBase> extends IdentifiableEntity<IIdentifiableEntityCacheStrategy> implements IHasTermType, java.lang.Cloneable
features
(characters) in a tree structure.
Feature trees are essential as interactive multiple-access keys for
determination process and for systematical output arrangement of
description elements
according to different goals
but may also be used to define flat feature subsets for filtering purposes.feature nodes
.
This class corresponds partially to ConceptTreeDefType according to the SDD schema.
Note: The tree structure of features used for purposes described above has nothing in common with the possible hierarchical structure of features depending on their grade of precision.
MediaKey
,
Serialized FormcacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
annotations, markers
CLOB_LENGTH, uuid
Modifier | Constructor and Description |
---|---|
protected |
FeatureTree()
Deprecated.
|
protected |
FeatureTree(TermType termType)
Class constructor: creates a new feature tree instance with an empty
root node . |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clones this FeatureTree.
|
java.util.Set<T> |
getDistinctFeatures()
Computes a set of distinct terms that are present in this feature tree
|
FeatureNode<T> |
getRoot()
Returns the topmost
feature node (root node) of this
feature tree. |
java.util.List<FeatureNode<T>> |
getRootChildren()
Returns the (ordered) list of
feature nodes which are immediate
children of the root node of this feature tree. |
TermType |
getTermType() |
boolean |
isAllowDuplicates() |
static FeatureTree<Feature> |
NewInstance()
Creates a new feature tree instance with an empty
root node . |
static FeatureTree<Feature> |
NewInstance(java.util.List<Feature> featureList)
|
static <T extends DefinedTermBase<T>> |
NewInstance(TermType termType)
Creates a new term collection instance for the given term type
with an empty
root node . |
static <T extends DefinedTermBase<T>> |
NewInstance(java.util.UUID uuid)
Creates a new feature tree instance with an empty
root node
and assigns to the new feature tree the given
UUID (universally unique identifier). |
void |
removeRootNode()
Deprecated.
this method is only for internal use when deleting a
FeatureTree
from a database. It should never be called for other reasons. |
void |
setAllowDuplicates(boolean allowDuplicates) |
addCredit, addCredit, addExtension, addExtension, addIdentifier, addIdentifier, addIdentifier, addRights, addSource, addSources, createNewSource, generateTitle, getCacheStrategy, getCredits, getCredits, getData, getExtensions, getExtensions, getExtensions, getExtensionsConcat, getIdentifiers, getIdentifiers, getIdentifiers, getLsid, getRights, getTitleCache, getTruncatedCache, hasEmptyTitleCache, hasExtension, hasExtension, initListener, isProtectedTitleCache, removeCredit, removeCredit, removeExtension, removeIdentifier, removeIdentifier, removeRights, replaceCredit, replaceIdentifier, setCacheStrategy, setLsid, setProtectedTitleCache, setTitleCache, setTitleCache, toString, updateCaches, updateCaches
addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, getSources, removeSource, removeSources
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, 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, isPersited, removeFromSetWithChangeEvent, removePropertyChangeListener, removePropertyChangeListener, replaceInList, setCreated, setCreatedBy, setId, setNewEntityListener, setUuid
finalize, getClass, notify, notifyAll, wait, wait, wait
checkTermTypeEqualOrDescendant, checkTermTypeNull, checkTermTypes
removeSources
addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, getSources, removeSource
addAnnotation, addMarker, getAnnotations, getMarkers, hasMarker, hasMarker, removeAnnotation, removeMarker
getUpdated, getUpdatedBy, setUpdated, setUpdatedBy
getCreated, getCreatedBy, getId, getUuid, isInstanceOf, isPersited, setCreated, setCreatedBy, setId, setUuid
public static <T extends DefinedTermBase<T>> FeatureTree<T> NewInstance(@NotNull TermType termType)
root node
.termType
- the term type
, must not be nullpublic static FeatureTree<Feature> NewInstance()
root node
.NewInstance(UUID)
,
NewInstance(List)
public static <T extends DefinedTermBase<T>> FeatureTree<T> NewInstance(java.util.UUID uuid)
root node
and assigns to the new feature tree the given
UUID (universally unique identifier).uuid
- the universally unique identifierNewInstance()
,
NewInstance(List)
public static FeatureTree<Feature> NewInstance(java.util.List<Feature> featureList)
root node
the children of which are the feature nodes build on the base of the
given list of features
. This corresponds to a flat feature tree.
For each feature within the list a new feature node
without
children nodes will be created.featureList
- the feature listNewInstance()
,
NewInstance(UUID)
public TermType getTermType()
getTermType
in interface IHasTermType
public FeatureNode<T> getRoot()
feature node
(root node) of this
feature tree. The root node does not have any parent. Since feature nodes
recursively point to their child nodes the complete feature tree is
defined by its root node.@Deprecated public void removeRootNode()
FeatureTree
from a database. It should never be called for other reasons.public java.util.List<FeatureNode<T>> getRootChildren()
feature nodes
which are immediate
children of the root node of this feature tree.public boolean isAllowDuplicates()
public void setAllowDuplicates(boolean allowDuplicates)
public java.util.Set<T> getDistinctFeatures()
public java.lang.Object clone()
clone
in class IdentifiableEntity<IIdentifiableEntityCacheStrategy>
TermBase.clone()
,
Object.clone()
Copyright © 2007-2019 EDIT. All Rights Reserved.