org.caida.otter
Class Node

java.lang.Object
  |
  +--org.caida.otter.Coordinate
        |
        +--org.caida.otter.Node

public class Node
extends Coordinate

Nodes may be connected by lines. This class otherwise serves as a container for all the information needed to draw the node.


Fields inherited from class org.caida.otter.Coordinate
colName, colNum, index, isSetColRow, isSetXY, name, nodeNumber, rowNum, x, y
 
Constructor Summary
Node(int index)
          Make a new node
Node(int index, int col, int row, java.lang.String name, java.lang.String colName)
          Make a new node.
Node(int index, int col, int row, java.lang.String name, java.lang.String colName, int nodeNumber)
          Make a new node.
 
Method Summary
 java.lang.Object addAttribute(java.lang.Object category, java.lang.Object attribute, java.lang.Object value)
          Add an attribute to inside a category
 java.lang.Object addCategory(java.lang.Object category)
          Add a category to the set.
 void addNeighborNode(Node neighbor)
          Add a node neighbor by its index (either parent or child)
 java.lang.Object changeAttribute(java.lang.Object category, java.lang.Object attribute, java.lang.Object value)
          Replace an attribute inside a category
 java.lang.Object deleteAttribute(java.lang.Object category, java.lang.Object attribute)
          Remove an attribute from inside a category
 java.lang.Object deleteCategory(java.lang.Object category)
          Remove an attribute from the set of categories.
 java.lang.Object[] enumerateAttributes(java.lang.Object category)
          Get a list of attributes in a given category
 java.lang.Object[] enumerateCategories()
          Get a list of objects that represent all of the categories contained in this node's category set.
 java.lang.Object getAttribute(java.lang.Object category, java.lang.Object attribute)
          Get an attribute from inside a category
 Node[] getNeighborNodes()
          Get neighbor node list.
 boolean hasNeighborNodes()
          See if the node has any neighbors at all.
 boolean isHidden()
          Test isHidden flag
 boolean isRoot()
          Test isRoot flag.
 void setIsHidden(boolean isHidden)
          Set isHidden flag.
 void setIsRoot(boolean newIsRoot)
          Flip root flag on node.
 
Methods inherited from class org.caida.otter.Coordinate
debug, equals, getColNum, getColumnName, getName, getRowNum, setColumnName, setColumnNum, setName, setRowNum
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

public Node(int index)
Make a new node
Parameters:
index - The index of the new node.

Node

public Node(int index,
            int col,
            int row,
            java.lang.String name,
            java.lang.String colName)
Make a new node.
Parameters:
index - The index of the new node.
col - The column number of the new node.
row - The row number of the new node.
name - The name of the new node.
colName - The column name of the new node.

Node

public Node(int index,
            int col,
            int row,
            java.lang.String name,
            java.lang.String colName,
            int nodeNumber)
Make a new node. John Tusson Tue Aug 14 16:26:41 PDT 2001
Parameters:
index - The index of the new node.
col - The column number of the new node.
row - The row number of the new node.
name - The name of the new node.
colName - The column name of the new node.
nodeNumber -  
Method Detail

addNeighborNode

public void addNeighborNode(Node neighbor)
Add a node neighbor by its index (either parent or child)
Parameters:
idx - The index of the node that will be our neighbor.

getNeighborNodes

public Node[] getNeighborNodes()
Get neighbor node list.
Returns:
array of our neighbors.

hasNeighborNodes

public boolean hasNeighborNodes()
See if the node has any neighbors at all.
Returns:
true if we have neighbors, false otherwise.

setIsRoot

public void setIsRoot(boolean newIsRoot)
Flip root flag on node.
Parameters:
newIsRoot - true if we want this to be a root, false otherwise.

isRoot

public boolean isRoot()
Test isRoot flag.
Returns:
true if this node is a root, false otherwise.

setIsHidden

public void setIsHidden(boolean isHidden)
Set isHidden flag.
Parameters:
isHidden - true if we want this node to be hidden, false if otherwise.

isHidden

public boolean isHidden()
Test isHidden flag
Returns:
true if this node is hidden, flase otherwise.

addCategory

public java.lang.Object addCategory(java.lang.Object category)
Add a category to the set.

addAttribute

public java.lang.Object addAttribute(java.lang.Object category,
                                     java.lang.Object attribute,
                                     java.lang.Object value)
Add an attribute to inside a category

getAttribute

public java.lang.Object getAttribute(java.lang.Object category,
                                     java.lang.Object attribute)
Get an attribute from inside a category

deleteCategory

public java.lang.Object deleteCategory(java.lang.Object category)
Remove an attribute from the set of categories.

deleteAttribute

public java.lang.Object deleteAttribute(java.lang.Object category,
                                        java.lang.Object attribute)
Remove an attribute from inside a category

changeAttribute

public java.lang.Object changeAttribute(java.lang.Object category,
                                        java.lang.Object attribute,
                                        java.lang.Object value)
Replace an attribute inside a category

enumerateCategories

public java.lang.Object[] enumerateCategories()
Get a list of objects that represent all of the categories contained in this node's category set.

enumerateAttributes

public java.lang.Object[] enumerateAttributes(java.lang.Object category)
Get a list of attributes in a given category