|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmulan.data.LabelsMetaDataImpl
public class LabelsMetaDataImpl
Implementation of LabelsMetaData info about labels and their structure.
LabelsMetaData,
Serialized Form| Constructor Summary | |
|---|---|
LabelsMetaDataImpl()
Creates a new instance of LabelsMetaDataImpl. |
|
| Method Summary | |
|---|---|
void |
addRootNode(LabelNode rootNode)
Adds a root LabelNode. |
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. |
void |
readExternal(ObjectInput in)
|
int |
removeLabelNode(String labelName)
Removes LabelNode specified by the name. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LabelsMetaDataImpl()
LabelsMetaDataImpl.
| Method Detail |
|---|
public void addRootNode(LabelNode rootNode)
LabelNode. The node is assumed to has linked all
related child nodes, if they exists.
The node is added into root set and all child nodes are added into internal mapping.
The node is uniquely identified by the label name.
rootNode - the root node with underlying hierarchy of nodes
ArgumentNullException - if specified root node is nullpublic LabelNode getLabelNode(String labelName)
LabelsMetaDataLabelNode 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.
getLabelNode in interface LabelsMetaDatalabelName - the name of label of which the node should be retrieved
LabelNode for specified label of null
if LabelNode does not exists for specified label namepublic Set<String> getLabelNames()
LabelsMetaData
getLabelNames in interface LabelsMetaDatapublic boolean containsLabel(String labelName)
LabelsMetaDataLabelsMetaData contains a label with specified name.
containsLabel in interface LabelsMetaDatalabelName - the label name
true if meta data contains the given label name;
false otherwise.public boolean isHierarchy()
LabelsMetaDataLabelNode nodes.
isHierarchy in interface LabelsMetaDatatrue if there is hierarchy defined between labels;
false otherwise.public int getNumLabels()
LabelsMetaDataLabelNode nodes.
getNumLabels in interface LabelsMetaDataLabelNode nodespublic Set<LabelNode> getRootLabels()
LabelsMetaDataSet of root LabelNode
nodes of label attributes hierarchy.
getRootLabels in interface LabelsMetaDataSet of root nodes.public LabelsMetaData clone()
LabelsMetaDataLabelsMetaDataImpl instance.
clone in interface LabelsMetaDataclone in class ObjectLabelsMetaDataImpl instancepublic int removeLabelNode(String labelName)
LabelNode specified by the name. If there is a hierarchy between
label nodes, whole subtree with all its children is also removed.
labelName - the name of LabelNode to be removed
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||