com.jamonapi.utils
Interface CompositeNode

All Known Implementing Classes:
MonitorComposite

public interface CompositeNode

A CompositeNode works with NodeTrees and LeafNodes to create heirarchical object trees. An example is a file system where directories can be viewed LeafNodes and directories can be viewed as CompositeNodes. TreeNodes can be viewed as the top level of the tree structures.


Method Summary
 void addCompositeNode(java.lang.String childNodeName, CompositeNode addNode)
           
 void addLeafNode(java.lang.String childNodeName, LeafNode addNode)
           
 boolean compositeNodeExists(java.lang.String childNodeName)
          Returns true if the compositeNodeExists
 CompositeNode getCompositeNode(java.lang.String childNodeName)
          Return the composite node pointed to by the node name
 java.lang.String getCompositeNodeKey(java.lang.String nodeName)
           
 LeafNode getLeafNode(java.lang.String childNodeName, java.lang.String childNodeType)
          Return the leaf node pointed to by the node name.
 java.lang.String getLeafNodeKey(java.lang.String nodeName)
           
 CompositeNode getRootNode()
          Return the NodeTrees root CompositeNode i.e.
 boolean leafNodeExists(java.lang.String childNodeName)
          Returns true if the leafNodeExists
 

Method Detail

getRootNode

public CompositeNode getRootNode()
Return the NodeTrees root CompositeNode i.e. the root of the heirarchy.


getCompositeNode

public CompositeNode getCompositeNode(java.lang.String childNodeName)
Return the composite node pointed to by the node name


getLeafNode

public LeafNode getLeafNode(java.lang.String childNodeName,
                            java.lang.String childNodeType)
Return the leaf node pointed to by the node name. childNodeType allows us to return different node types with the same interface


leafNodeExists

public boolean leafNodeExists(java.lang.String childNodeName)
Returns true if the leafNodeExists


compositeNodeExists

public boolean compositeNodeExists(java.lang.String childNodeName)
Returns true if the compositeNodeExists


addCompositeNode

public void addCompositeNode(java.lang.String childNodeName,
                             CompositeNode addNode)

addLeafNode

public void addLeafNode(java.lang.String childNodeName,
                        LeafNode addNode)

getCompositeNodeKey

public java.lang.String getCompositeNodeKey(java.lang.String nodeName)

getLeafNodeKey

public java.lang.String getLeafNodeKey(java.lang.String nodeName)