mulan.data
Interface LabelsMetaData

All Known Implementing Classes:
LabelsMetaDataImpl

public interface LabelsMetaData

Represents meta data about label attributes and their structure. The labels can be organized in hierarchical structure. If no hierarchy is defined between labels, they are stored in a flat structure. This means all labels are represented as root LabelNode element.

Author:
Jozef Vilcek

Method Summary
 LabelsMetaData clone()
          Returns a deep copy of the LabelsMetaDataImpl instance.
 boolean containsLabel(String labelName)
          Determines if LabelsMetaData contains a label with specified name.
 Set<String> getLabelNames()
          Gets the names of all labels.
 LabelNode getLabelNode(String labelName)
          Gets the LabelNode specified by label name.
 int getNumLabels()
          Gets the total number of LabelNode nodes.
 Set<LabelNode> getRootLabels()
          Gets the unmodifiable Set of root LabelNode nodes of label attributes hierarchy.
 boolean isHierarchy()
          Determines if there is a hierarchy defined between labels.
 

Method Detail

getRootLabels

Set<LabelNode> getRootLabels()
Gets the unmodifiable Set of root LabelNode nodes of label attributes hierarchy.

Returns:
the Set of root nodes.

getLabelNode

LabelNode getLabelNode(String labelName)
Gets the LabelNode specified by label name. The name is unique identifier of the node and corresponds to label attribute in the data set. If LabelNode for given label name does not exists, null is returned.

Parameters:
labelName - the name of label of which the node should be retrieved
Returns:
the LabelNode for specified label of null if LabelNode does not exists for specified label name

getLabelNames

Set<String> getLabelNames()
Gets the names of all labels. The label name is a unique identifier among all labels in the meta data.

Returns:
the names of all labels.

containsLabel

boolean containsLabel(String labelName)
Determines if LabelsMetaData contains a label with specified name.

Parameters:
labelName - the label name
Returns:
true if meta data contains the given label name; false otherwise.

isHierarchy

boolean isHierarchy()
Determines if there is a hierarchy defined between labels. If not, all labels are represented as root LabelNode nodes.

Returns:
true if there is hierarchy defined between labels; false otherwise.

getNumLabels

int getNumLabels()
Gets the total number of LabelNode nodes.

Returns:
total number of LabelNode nodes

clone

LabelsMetaData clone()
Returns a deep copy of the LabelsMetaDataImpl instance.

Returns:
a deep copy of the LabelsMetaDataImpl instance