Class EntityNode

Object
   |
   +--EntityNode
Direct Known Subclasses:
EntityManager

class EntityNode

This class represents a tree node within the entity/indentity hierarchy.


Field Summary
<static>  var collapsedNodeChildren
           Flag to filter out children of collapsed tree nodes.
<static>  var expandedNodesWithChildren
           Flag to filter out expanded nodes that have children (not leafs).
<static>  var nodesWithChildren
           Flag to filter out nodes that have children (not leafs).
 
Constructor Summary
EntityNode (type, value, key)
           
 
Method Summary
 function appendChild(node)
           Appends specified node to this node's children array.
 function getLeafs(node)
           Traverses the subtree rooted at the specified node to find all the leafs.
 function hasChild(value)
           Returns the first child node of this node's children array with the name that equals the specified value.
<static> function walk(node, filter, array)
           Fills an array that traverses the subtree rooted at the specified node in preorder.

Field Detail

collapsedNodeChildren

<static> var collapsedNodeChildren
Flag to filter out children of collapsed tree nodes.

expandedNodesWithChildren

<static> var expandedNodesWithChildren
Flag to filter out expanded nodes that have children (not leafs).

nodesWithChildren

<static> var nodesWithChildren
Flag to filter out nodes that have children (not leafs).

Constructor Detail

EntityNode

function EntityNode(type, value, key)

Method Detail

appendChild

function appendChild(node)
Appends specified node to this node's children array.

Parameters:
node - Node instance to append.


getLeafs

function getLeafs(node)
Traverses the subtree rooted at the specified node to find all the leafs. If no node is specified then the search starts at this node.

Parameters:
node - The subtree to traverse.

Returns:
An array containing all leaf nodes or null if the specified nodes has no children.

hasChild

function hasChild(value)
Returns the first child node of this node's children array with the name that equals the specified value. The value represents the name of the entity/identity type. For a node of type CCM_NODE the name could be for example chaos.lucent.com

Parameters:
value - Name of the node to retrieve.

Returns:
First child node or null if this node has no children that match the specified name.

walk

<static> function walk(node, filter, array)
Fills an array that traverses the subtree rooted at the specified node in preorder.

Parameters:
filter - The array content depends on the filter flags set.

array - The array that will be filled with the traversed subtree.

node - The subtree to traverse.