|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jamonapi.utils.NodeTree
A NodeTree works with Compositenodes 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 CompoisteNodes. TreeNodes can be viewed as the top level of the tree structures. For JAMon monitors are grouped in heirarchical with the CompositeNodes being MonitorComposite. MonitorComposites can contain other MonitorComposites or LeafNodes which are the actual Monitors. Monitors are identified by monitor lables which are strings seperated by a common delimiter for example "MyApp.jsp.homePage". The first two levels of the heirarchy are CompositeNodes/MonitorComposites (MyApp and jsp), and the entry after the last delimiter is always the LeafNode (in this case a Monitor). Note that NodeTrees/CompositeNodes/LeafNodes can represent ANY hierarchical/tree structure. JAMon uses this generic pattern to model Monitors. NodeTree's use the first non-alphanumeric to represent the token delimiter. For example any combination of the following are considered token delimiters. (i.e. the following are all valid) pages.homepage (token delimeter is .) pages\homepage (token delimeter is \) pages\homepage.button (token delimeter is \ not .) note - Exception to the rule that token delimeters are the first non-alphanumeric characters are - and _. They are considered part of the variable name. A token delimeter can be any of the following: !@#$%^&*()+=[]\\{}|;':\",./<>?`~
Constructor Summary | |
NodeTree(CompositeNode compositeNodeFactory)
|
Method Summary | |
boolean |
compositeNodeExists(java.lang.String locator)
Determine if the CompositeNode represented by the locator string exists. |
CompositeNode |
getCompositeNode(java.lang.String locator)
Return the NodeTree's CompositeNode object that is identified by the locator. |
LeafNode |
getLeafNode(java.lang.String locator,
java.lang.String type)
Return the NodeTree's LeafNode object that is identified by the locator and type. |
CompositeNode |
getRootNode()
Return the highest level CompositeNode in the NodeTree. |
boolean |
leafNodeExists(java.lang.String locator)
Determine if the leaf represented by the locator string exists. |
boolean |
nodeExists(java.lang.String locator)
Determine if the Node represented by the locator string exists. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NodeTree(CompositeNode compositeNodeFactory)
Method Detail |
public CompositeNode getRootNode()
public LeafNode getLeafNode(java.lang.String locator, java.lang.String type)
public CompositeNode getCompositeNode(java.lang.String locator)
public boolean compositeNodeExists(java.lang.String locator)
public boolean leafNodeExists(java.lang.String locator)
public boolean nodeExists(java.lang.String locator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |