mulan.data
Interface LabelNode

All Known Implementing Classes:
LabelNodeImpl

public interface LabelNode

Represents a label attribute as a node in the labels hierarchy. The identity of the node is represented by label name, which must be unique within labels hierarchy.

Author:
Jozef Vilcek

Method Summary
 Set<LabelNode> getChildren()
          Gets the unmodifiable Set of child LabelNode of this node, if hierarchy exists.
 Set<String> getDescendantLabels()
          Gets a Set of the names of descendant LabelNode of this node, if hierarchy exists.
 String getName()
          Gets the name of the label this node represents.
 LabelNode getParent()
          Gets the parent LabelNode of this node if hierarchy exists.
 boolean hasChildren()
          Determines whether the LabelNode has child nodes.
 boolean hasParent()
          Determines whether the LabelNode has a parent node in a hierarchy.
 

Method Detail

getName

String getName()
Gets the name of the label this node represents. The name corresponds to the ID of label attribute in the arff data set. The name of the label must be unique within the data set, because the identity of LabelNode is determined by the name.

Returns:
the name of the label this node represents

hasParent

boolean hasParent()
Determines whether the LabelNode has a parent node in a hierarchy.

Returns:
true if the node has parent; false otherwise.

getParent

LabelNode getParent()
Gets the parent LabelNode of this node if hierarchy exists. If the node has not a parent LabelNode, null is returned.

Returns:
the parent LabelNode or null if the parent does not exists.

hasChildren

boolean hasChildren()
Determines whether the LabelNode has child nodes.

Returns:
true if the node has child nodes; false otherwise.

getChildren

Set<LabelNode> getChildren()
Gets the unmodifiable Set of child LabelNode of this node, if hierarchy exists. If no child nodes exists for this LabelNode, empty Set is returned.

Returns:
the Set of child nodes

getDescendantLabels

Set<String> getDescendantLabels()
Gets a Set of the names of descendant LabelNode of this node, if hierarchy exists. If no descendant nodes exists for this LabelNode, empty Set is returned.

Returns:
the Set of child nodes