|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines a model that uses a tree-like backing data structure. Instead of defining a formal node entity, this model operates using the notion of a currently selected node in the tree. Using the available model methods, clients of the model can change the current node position or read or check its properties.
Field Summary | |
static int |
BREADTH_FIRST_TRAVERSAL
|
static int |
DEPTH_FIRST_TRAVERSAL
|
static int |
NEXT_CHILD
|
static int |
NEXT_SIBLING
|
static int |
ROOT_NODE_LEVEL
|
static int |
UNDEFINED_NODE_LEVEL
|
Method Summary | |
void |
beforeRoot()
Set the current location to a special position such that the
nextNode() operation will result in setting the root node as the
current node |
java.lang.String |
getNodeID()
Return a unique ID for the current node within the backing data structure. |
int |
getNodeLevel()
Return the current node level, meaning the an index indicating how far this node is removed from being the root of the tree. |
java.lang.String |
getNodeName()
Return the logical name of the current node |
java.lang.String |
getNodeType()
Return the logical type of the current node |
int |
getTraversalType()
Return the tree traversal type. |
boolean |
isChildNode()
Check if the current node is a child of a parent node |
boolean |
isParentNode()
Check if the current node is a parent of other nodes |
boolean |
nextNode()
Make the current node the next available node. |
boolean |
nextNode(int nextNodeType)
Make the current node the next available node according to the provided next node type. |
void |
root()
Make the current node the root node |
void |
setTraversalType(int value)
Sets the tree traversal type. |
Methods inherited from interface com.iplanet.jato.model.Model |
getName, getValue, getValues, setName, setValue, setValues |
Field Detail |
public static final int DEPTH_FIRST_TRAVERSAL
public static final int BREADTH_FIRST_TRAVERSAL
public static final int NEXT_CHILD
public static final int NEXT_SIBLING
public static final int UNDEFINED_NODE_LEVEL
public static final int ROOT_NODE_LEVEL
Method Detail |
public java.lang.String getNodeName() throws ModelControlException
public java.lang.String getNodeType() throws ModelControlException
public int getNodeLevel()
public java.lang.String getNodeID()
public boolean isParentNode()
public boolean isChildNode()
public int getTraversalType() throws ModelControlException
DEPTH_FIRST_TRAVERSAL
.public void setTraversalType(int value) throws ModelControlException
DEPTH_FIRST_TRAVERSAL
.public void beforeRoot() throws ModelControlException
nextNode()
operation will result in setting the root node as the
current nodepublic void root() throws ModelControlException
public boolean nextNode() throws ModelControlException
public boolean nextNode(int nextNodeType) throws ModelControlException
NEXT_CHILD
and NEXT_SIBLING
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |