public class FeatureNodeContainer
extends java.lang.Object
FeatureNode
s that are relevant for a specific
TaxonDescription
as well as the DescriptionElementBase
at the leaf level.
This kind of datastructure is needed by interface elements such as viewers and greatly simplify
the handling of FeatureTree
s in conjunction with TaxonDescription
s.Modifier | Constructor and Description |
---|---|
protected |
FeatureNodeContainer(FeatureNodeContainerTree containerTree) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(FeatureNodeContainer container)
Adds a child container to the list of this containers children
|
void |
addDescriptionElement(eu.etaxonomy.cdm.model.description.DescriptionElementBase descriptionElement) |
void |
clear() |
protected void |
findLeaves(eu.etaxonomy.cdm.model.description.FeatureNode featureNode)
Recursively traverse a branch of a feature tree and check if there are
|
java.util.List<FeatureNodeContainer> |
getChildren()
Getter for the field
children . |
FeatureNodeContainerTree |
getContainerTree() |
eu.etaxonomy.cdm.model.description.DescriptionBase |
getDescription()
Getter for the field
description . |
java.util.List<eu.etaxonomy.cdm.model.description.DescriptionElementBase> |
getDescriptionElements()
If
isLeaf() is true, i.e. |
java.util.List<eu.etaxonomy.cdm.model.description.DescriptionElementBase> |
getDescriptionElementsForEntireBranch()
Cumulates description elements for
this container as well as child feature nodes recursively,
thus returning a list of description elements for the branch of the feature tree starting with this
node. |
eu.etaxonomy.cdm.model.description.Feature |
getFeature()
getFeature
|
eu.etaxonomy.cdm.model.description.FeatureNode |
getFeatureNode()
Getter for the field
featureNode . |
protected java.util.List<FeatureNodeContainer> |
getLeafs() |
FeatureNodeContainer |
getParent() |
boolean |
isEmpty() |
boolean |
isLeaf()
If the container is a leaf, it will hold a description element and no child containers
|
void |
removeDescriptionElement(eu.etaxonomy.cdm.model.description.DescriptionElementBase descriptionElement) |
void |
setChildren(java.util.List<FeatureNodeContainer> children)
Sets the list of children of this containers children
|
void |
setDescriptionElements(java.util.List<eu.etaxonomy.cdm.model.description.DescriptionElementBase> descriptionElements)
Set the description element
|
void |
setFeatureNode(eu.etaxonomy.cdm.model.description.FeatureNode featureNode)
Setter for the field
featureNode . |
void |
setParent(FeatureNodeContainer parent) |
protected FeatureNodeContainer(FeatureNodeContainerTree containerTree)
description
- protected void findLeaves(eu.etaxonomy.cdm.model.description.FeatureNode featureNode)
featureNode
- description
- public java.util.List<FeatureNodeContainer> getChildren()
Getter for the field children
.
List
object.public void setChildren(java.util.List<FeatureNodeContainer> children)
children
- a List
object.java.lang.IllegalStateException
- when this
container contains a description element.public void addChild(FeatureNodeContainer container)
container
- a FeatureNodeContainer
object.java.lang.IllegalStateException
- when this
container contains a description element.public void addDescriptionElement(eu.etaxonomy.cdm.model.description.DescriptionElementBase descriptionElement)
public void removeDescriptionElement(eu.etaxonomy.cdm.model.description.DescriptionElementBase descriptionElement)
public java.util.List<eu.etaxonomy.cdm.model.description.DescriptionElementBase> getDescriptionElements()
isLeaf()
is true, i.e. this container should have elements, returns the list of description elements.List
object.public java.util.List<eu.etaxonomy.cdm.model.description.DescriptionElementBase> getDescriptionElementsForEntireBranch()
this
container as well as child feature nodes recursively,
thus returning a list of description elements for the branch of the feature tree starting with this
node.List
object.protected java.util.List<FeatureNodeContainer> getLeafs()
public void setDescriptionElements(java.util.List<eu.etaxonomy.cdm.model.description.DescriptionElementBase> descriptionElements)
descriptionElements
- a List
object.java.lang.IllegalStateException
- when this
container contains child container.public boolean isLeaf()
public void setFeatureNode(eu.etaxonomy.cdm.model.description.FeatureNode featureNode)
Setter for the field featureNode
.
featureNode
- a FeatureNode
object.public eu.etaxonomy.cdm.model.description.FeatureNode getFeatureNode()
Getter for the field featureNode
.
FeatureNode
object.public eu.etaxonomy.cdm.model.description.Feature getFeature()
getFeature
Feature
object.public eu.etaxonomy.cdm.model.description.DescriptionBase getDescription()
Getter for the field description
.
DescriptionBase
object.public FeatureNodeContainerTree getContainerTree()
public void clear()
public boolean isEmpty()
public FeatureNodeContainer getParent()
public void setParent(FeatureNodeContainer parent)
parent
- the parent to setCopyright © 2007-2018. All Rights Reserved.