Enum Class ChildNodeDirection
- All Implemented Interfaces:
Serializable
,Comparable<ChildNodeDirection>
,java.lang.constant.Constable
For every tree there is a natural order of items. For example, BioSource -> Sample -> Extract -> ... -> Experiment. The natural order is the forward-loading direction and the opposite order is the reverse-loading direction.
For example, if we root the tree at a Hybridization we will load children in the forward-loading direction down to experiment and in the revers-loading direction up to biosource and array design. For each node that is added to a tree we need to keep track if we should continue up or down the natural order. Otherwise we will end up in an infinite loop.
In a tree there can also be side-nodes that in most cases are end-point or leaf nodes. This is for example nodes containing information about protocol, software, annotations, etc. We call such nodes property nodes and they are usually loaded in both the forward- and reverse-loading directions.
- Version:
- 2.10
- Author:
- Nicklas
- See Also:
- Last modified
- $Date$
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final boolean
private final boolean
-
Constructor Summary
ModifierConstructorDescriptionprivate
ChildNodeDirection
(boolean loadForward, boolean loadReverse, boolean loadProperty) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
static ChildNodeDirection
Returns the enum constant of this class with the specified name.static ChildNodeDirection[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Represents an end-point node. No more child nodes should be loaded, not even property nodes. -
PROPERTY
Only property child nodes should be loaded. -
FORWARD
Child nodes should be loaded in the forward-loading direction. Property nodes should also be loaded. -
REVERSE
Child nodes should be loaded in the reverse-loading direction. Property nodes should also be loaded. -
ALL
-
-
Field Details
-
loadForward
private final boolean loadForward -
loadReverse
private final boolean loadReverse -
loadProperty
private final boolean loadProperty
-
-
Constructor Details
-
ChildNodeDirection
private ChildNodeDirection(boolean loadForward, boolean loadReverse, boolean loadProperty)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
loadReverse
public boolean loadReverse()- Returns:
- TRUE if child nodes in the reverse-loading direction should be loaded
-
loadForward
public boolean loadForward()- Returns:
- TRUE if child nodes in the forward-loading direction should be loaded
-
loadProperty
public boolean loadProperty()- Returns:
- TRUE if property child nodes should be loaded
-