@Entity public class TermTree<T extends DefinedTermBase> extends TermGraphBase<T,TermNode> implements ITermTree<T,TermNode>
terms
in a tree structure.
A term tree is build on term nodes
.
Special term trees:
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.If used as feature tree this class corresponds partially to ConceptTreeDefType according to the SDD schema.
Note: The tree structure of terms used for purposes described above has nothing in common with the possible hierarchical structure of terms depending on their grade of precision.
cacheStrategy, NOT_PROTECTED, PROTECTED, protectedTitleCache, titleCache
annotations, markers
CLOB_LENGTH, uuid
Modifier | Constructor and Description |
---|---|
protected |
TermTree()
Deprecated.
|
protected |
TermTree(TermType termType)
Class constructor: creates a new feature tree instance with an empty
root node . |
Modifier and Type | Method and Description |
---|---|
java.util.List<T> |
asTermList() |
java.lang.Object |
clone()
Clones this
TermTree . |
java.util.Set<T> |
getDistinctTerms()
Computes a set of distinct terms that are present in this term tree
|
TermNode<T> |
getRoot()
Returns the topmost
feature node (root node) of this
feature tree. |
java.util.List<TermNode<T>> |
getRootChildren()
Returns the (ordered) list of
feature nodes which are immediate
children of the root node of this feature tree. |
java.util.Set<T> |
independentTerms() |
static TermTree<Feature> |
NewFeatureInstance() |
static TermTree<Feature> |
NewFeatureInstance(java.util.List<Feature> featureList)
|
static <T extends DefinedTermBase<T>> |
NewFeatureInstance(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). |
static TermTree<Feature> |
NewInstance()
Deprecated.
since 5.9. Use
NewFeatureInstance() instead |
static TermTree<Feature> |
NewInstance(java.util.List<Feature> featureList)
Deprecated.
sinde 5.9 use
NewFeatureInstance(List) instead |
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> |
NewInstance(TermType termType,
java.lang.Class<T> clazz)
Creates a new term collection instance for the given term type
with an empty
root node . |
static TermTree<? extends Feature> |
NewInstance(java.util.UUID uuid)
Deprecated.
since 5.9, use
NewFeatureInstance(UUID) instead |
void |
removeRootNode()
Deprecated.
this method is only for internal use when deleting a
TermTree
from a database. It should never be called for other reasons. |
getTermRelations, setTermRelations
isAllowDuplicates, isFlat, isOrderRelevant, setAllowDuplicates, setFlat, setOrderRelevant, termRelations, termRelations
addRepresentation, getDescription, getDescription, getLabel, getLabel, getPreferredRepresentation, getPreferredRepresentation, getRepresentation, getRepresentations, getTermType, getUri, removeRepresentation, setLabel, setLabel, setTermType, setUri, toString
addCredit, addCredit, addExtension, addExtension, addIdentifier, addIdentifier, addIdentifier, addRights, addSource, addSources, createNewSource, generateTitle, 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, 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
getTermRelations
checkTermTypeEqualOrDescendant, checkTermTypeNull, checkTermTypes
removeSources
addAggregationSource, addImportSource, addPrimaryTaxonomicSource, addPrimaryTaxonomicSource, addSource, addSource, getSources, removeSource
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
public static <T extends DefinedTermBase<T>> TermTree<T> NewInstance(@NotNull TermType termType)
root node
.termType
- the term type
, must not be nullpublic static <T extends DefinedTermBase> TermTree<T> NewInstance(@NotNull TermType termType, java.lang.Class<T> clazz)
root node
.termType
- the term type
, must not be null@Deprecated public static TermTree<Feature> NewInstance()
NewFeatureInstance()
insteadroot node
.NewInstance(UUID)
,
NewInstance(List)
@Deprecated public static TermTree<? extends Feature> NewInstance(java.util.UUID uuid)
NewFeatureInstance(UUID)
insteadpublic static <T extends DefinedTermBase<T>> TermTree<T> NewFeatureInstance(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)
@Deprecated public static TermTree<Feature> NewInstance(java.util.List<Feature> featureList)
NewFeatureInstance(List)
insteadpublic static TermTree<Feature> NewFeatureInstance(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 TermNode<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()
TermTree
from a database. It should never be called for other reasons.public java.util.List<TermNode<T>> getRootChildren()
feature nodes
which are immediate
children of the root node of this feature tree.getRootChildren
in interface ITermTree<T extends DefinedTermBase,TermNode>
public java.util.Set<T> getDistinctTerms()
getDistinctTerms
in class TermGraphBase<T extends DefinedTermBase,TermNode>
public java.util.List<T> asTermList()
asTermList
in interface ITermTree<T extends DefinedTermBase,TermNode>
public java.util.Set<T> independentTerms()
public java.lang.Object clone()
TermTree
. This is a shortcut that enables to create
a new instance that differs only slightly from this tree by
modifying only some of the attributes.
tree nodes
always belong only to one tree, so all
tree nodes
are cloned to build
the new TermTree
clone
in class TermGraphBase<T extends DefinedTermBase,TermNode>
TermBase.clone()
,
Object.clone()
Copyright © 2007-2020 EDIT. All Rights Reserved.