it.unitn.disi.smatch.data
Interface INode

All Known Implementing Classes:
Node

public interface INode

The interface to Node datastructure.

Author:
Mikalai Yatskevich mikalai.yatskevich@comlab.ox.ac.uk, Aliaksandr Autayeu avtaev@gmail.com

Method Summary
 void addChild(INode child)
          Adds child to the given node.
 java.util.Vector<INode> getAncestors()
          Returns all ancestors of the given node.
 java.util.Vector<INode> getChildren()
          Returns children of the node.
 int getDescendantCount()
          Returns count of descendant nodes, including itself.
 java.util.Vector<INode> getDescendants()
          Returns all descendants of the node.
 INodeData getNodeData()
          Returns interface to node metadata.
 java.lang.String getNodeId()
          Retunrs node id.
 java.lang.String getNodeName()
          Returns node label.
 INode getParent()
          Returns interface to the parent node.
 boolean isRoot()
          Retunrs true if the node is a root in the context and false otherwise.
 void removeChild(INode child)
          Removes child of the node.
 

Method Detail

addChild

void addChild(INode child)
Adds child to the given node.

Parameters:
child - node to add

getAncestors

java.util.Vector<INode> getAncestors()
Returns all ancestors of the given node. The returned list is orderd from the father node to the root.

Returns:
ancestor list

getDescendants

java.util.Vector<INode> getDescendants()
Returns all descendants of the node. The returned list is order as in depth first traversal.

Returns:
descendants

getDescendantCount

int getDescendantCount()
Returns count of descendant nodes, including itself.

Returns:
count of descendant nodes, including itself

isRoot

boolean isRoot()
Retunrs true if the node is a root in the context and false otherwise.

Returns:
true if node is a root

getParent

INode getParent()
Returns interface to the parent node.

Returns:
interface to the parent node

getNodeId

java.lang.String getNodeId()
Retunrs node id.

Returns:
node id

getNodeName

java.lang.String getNodeName()
Returns node label.

Returns:
node label

getChildren

java.util.Vector<INode> getChildren()
Returns children of the node.

Returns:
node children

removeChild

void removeChild(INode child)
Removes child of the node.

Parameters:
child - child node to remove

getNodeData

INodeData getNodeData()
Returns interface to node metadata.

Returns:
interface to node metadata


© 2010 Knowdive @ DISI