org.dronus.graph.Graph Class Reference

Collaboration diagram for org.dronus.graph.Graph:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Graph ()
 Graph (BufferedReader r, boolean silent) throws IOException
int nodeCount ()
void addNode (Node node)
void addEdge (Edge edge)
Node findNode (int id)
Edge findEdge (Node from, Node to)
boolean deleteEdge (Edge edge)
synchronized boolean removeNode (Node node)
synchronized boolean deleteNode (Node node)
Node getRoot ()
synchronized void clearAll ()
void dump (PrintStream p)

Public Attributes

List< Nodenodes = new ArrayList<Node>()
HashSet< Edgeedges = new HashSet<Edge>()

Protected Attributes

HashMap< Integer, NodenodeIDRegistry = new HashMap<Integer,Node>()

Package Functions

void load (BufferedReader r, boolean silent) throws IOException
String unescape (String escaped)

Package Attributes

Node root

Detailed Description

a generic graph.

Author:
paul

Definition at line 19 of file Graph.java.


Constructor & Destructor Documentation

org.dronus.graph.Graph.Graph (  ) 

Definition at line 29 of file Graph.java.

org.dronus.graph.Graph.Graph ( BufferedReader  r,
boolean  silent 
) throws IOException

create a Graph from a given reader.

Definition at line 34 of file Graph.java.

References org.dronus.graph.Graph.load().

Here is the call graph for this function:


Member Function Documentation

int org.dronus.graph.Graph.nodeCount (  ) 

Return the number of Nodes in the cumulative Vector.

Definition at line 39 of file Graph.java.

References org.dronus.graph.Graph.nodes.

Referenced by org.dronus.graph.Graph.load().

Here is the caller graph for this function:

void org.dronus.graph.Graph.addNode ( Node  node  ) 

Add the Node node to the graph, and registers the Node via its ID.

Definition at line 46 of file Graph.java.

References org.dronus.graph.Graph.findNode(), org.dronus.graph.Node.id, org.dronus.graph.Graph.nodeIDRegistry, org.dronus.graph.Graph.nodes, and org.dronus.graph.Graph.root.

Referenced by org.hfbk.vis.source.Source.add(), org.dronus.graph.Graph.load(), org.hfbk.vis.visnode.VisFilesys.scandir(), org.hfbk.vis.visnode.VisFilesysTree.scanfile(), org.hfbk.vis.visnode.VisFilesys.VisFilesys(), and org.hfbk.vis.visnode.VisSetExample.VisSetExample().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.dronus.graph.Graph.addEdge ( Edge  edge  ) 

Add the Edge edge to the graph.

Definition at line 56 of file Graph.java.

References org.dronus.graph.Graph.edges.

Referenced by org.hfbk.vis.source.Source.add(), org.dronus.graph.Graph.load(), org.hfbk.vis.visnode.VisFilesys.scandir(), org.hfbk.vis.visnode.VisFilesysTree.scanfile(), and org.hfbk.vis.visnode.VisSetExample.VisSetExample().

Here is the caller graph for this function:

Node org.dronus.graph.Graph.findNode ( int  id  ) 

Return the Node whose ID matches the String id, null if no match is found.

Definition at line 66 of file Graph.java.

References org.dronus.graph.Graph.nodeIDRegistry.

Referenced by org.hfbk.vis.source.Source.add(), org.dronus.graph.Graph.addNode(), org.dronus.graph.Graph.load(), org.hfbk.vis.visnode.VisFilesys.scandir(), org.hfbk.vis.visnode.VisFilesysTree.scanfile(), and org.hfbk.vis.visnode.VisSetExample.VisSetExample().

Here is the caller graph for this function:

Edge org.dronus.graph.Graph.findEdge ( Node  from,
Node  to 
)

Return an Edge spanning Node from to Node to.

Definition at line 73 of file Graph.java.

References org.dronus.graph.Node.getEdges(), and org.dronus.graph.Edge.getTo().

Here is the call graph for this function:

boolean org.dronus.graph.Graph.deleteEdge ( Edge  edge  ) 

Delete the Edge edge.

Definition at line 81 of file Graph.java.

References org.dronus.graph.Graph.edges, org.dronus.graph.Edge.getFrom(), and org.dronus.graph.Node.removeEdge().

Here is the call graph for this function:

synchronized boolean org.dronus.graph.Graph.removeNode ( Node  node  ) 

removes the node, leaving its linking untouched

Definition at line 92 of file Graph.java.

References org.dronus.graph.Node.id, org.dronus.graph.Graph.nodeIDRegistry, and org.dronus.graph.Graph.nodes.

synchronized boolean org.dronus.graph.Graph.deleteNode ( Node  node  ) 

Delete the Node node, returning true if successful.

Definition at line 101 of file Graph.java.

References org.dronus.graph.Graph.edges, org.dronus.graph.Node.getEdges(), org.dronus.graph.Edge.getFrom(), org.dronus.graph.Edge.getTo(), org.dronus.graph.Node.id, org.dronus.graph.Graph.nodeIDRegistry, org.dronus.graph.Graph.nodes, and org.dronus.graph.Node.removeEdge().

Here is the call graph for this function:

Node org.dronus.graph.Graph.getRoot (  ) 

very dirty, currently relies on an ordered filling of the graph.

Returns:
the root Node if any

Definition at line 122 of file Graph.java.

References org.dronus.graph.Graph.root.

Referenced by org.hfbk.vis.source.SourceClass.buildGraph(), org.dronus.graph.Graph.load(), org.hfbk.vis.visnode.VisLog.renderSelf(), org.hfbk.vis.visnode.VisFilesysTree.renderSelf(), org.hfbk.vis.visnode.VisFilesys.renderSelf(), and org.hfbk.vis.visnode.VisFilesys.scandir().

Here is the caller graph for this function:

synchronized void org.dronus.graph.Graph.clearAll (  ) 

Clear all nodes and edges.

Definition at line 127 of file Graph.java.

References org.dronus.graph.Graph.edges, org.dronus.graph.Graph.nodeIDRegistry, and org.dronus.graph.Graph.nodes.

void org.dronus.graph.Graph.load ( BufferedReader  r,
boolean  silent 
) throws IOException [package]

Definition at line 133 of file Graph.java.

References org.dronus.graph.Graph.addEdge(), org.dronus.graph.Graph.addNode(), org.dronus.graph.Graph.edges, org.dronus.graph.Node.equals(), org.dronus.graph.Graph.findNode(), org.dronus.graph.Graph.getRoot(), org.dronus.graph.Graph.nodeCount(), org.dronus.graph.Graph.nodes, and org.dronus.graph.Graph.unescape().

Referenced by org.dronus.graph.Graph.Graph().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.dronus.graph.Graph.dump ( PrintStream  p  ) 

Definition at line 170 of file Graph.java.

References org.dronus.graph.Graph.edges, and org.dronus.graph.Graph.nodes.

Referenced by org.hfbk.vis.VisServer.handleSourceRequest().

Here is the caller graph for this function:

String org.dronus.graph.Graph.unescape ( String  escaped  )  [package]

Definition at line 178 of file Graph.java.

Referenced by org.dronus.graph.Graph.load().

Here is the caller graph for this function:


Member Data Documentation

List<Node> org.dronus.graph.Graph.nodes = new ArrayList<Node>()

Definition at line 20 of file Graph.java.

Referenced by org.dronus.graph.Graph.addNode(), org.dronus.graph.Graph.clearAll(), org.dronus.graph.Graph.deleteNode(), org.dronus.graph.Graph.dump(), org.dronus.graph.Graph.load(), org.dronus.graph.Graph.nodeCount(), and org.dronus.graph.Graph.removeNode().

HashSet<Edge> org.dronus.graph.Graph.edges = new HashSet<Edge>()

Definition at line 21 of file Graph.java.

Referenced by org.dronus.graph.Graph.addEdge(), org.dronus.graph.Graph.clearAll(), org.dronus.graph.Graph.deleteEdge(), org.dronus.graph.Graph.deleteNode(), org.dronus.graph.Graph.dump(), and org.dronus.graph.Graph.load().

HashMap<Integer,Node> org.dronus.graph.Graph.nodeIDRegistry = new HashMap<Integer,Node>() [protected]

The Hashtable containing references to the Node IDs of the current graph.

Definition at line 24 of file Graph.java.

Referenced by org.dronus.graph.Graph.addNode(), org.dronus.graph.Graph.clearAll(), org.dronus.graph.Graph.deleteNode(), org.dronus.graph.Graph.findNode(), and org.dronus.graph.Graph.removeNode().

Node org.dronus.graph.Graph.root [package]

Definition at line 27 of file Graph.java.

Referenced by org.dronus.graph.Graph.addNode(), and org.dronus.graph.Graph.getRoot().


The documentation for this class was generated from the following file:
Generated on Tue Apr 7 17:57:42 2009 for visclient by  doxygen 1.5.1