org.embl.ebi.escience.scuflui.graph
Class GraphUtilities

java.lang.Object
  extended by org.embl.ebi.escience.scuflui.graph.GraphUtilities

public class GraphUtilities
extends java.lang.Object

COMMENT

Version:
$Revision: 1.3 $
Author:
Kevin Glover

Constructor Summary
GraphUtilities()
           
 
Method Summary
static java.util.Set getAllEdges(org.jgraph.graph.GraphModel model)
           
static java.util.Set getIncomingEdges(org.jgraph.graph.GraphModel model, java.lang.Object node)
           
static java.util.Set getOutgoingEdges(org.jgraph.graph.GraphModel model, java.lang.Object node)
           
static java.lang.Object getRoot(org.jgraph.graph.GraphModel model, java.lang.Object node)
           
static java.lang.Object getSourceNode(org.jgraph.graph.GraphModel model, java.lang.Object edge)
           
static java.lang.Object getTargetNode(org.jgraph.graph.GraphModel model, java.lang.Object edge)
           
static boolean isParentOf(org.jgraph.graph.GraphModel model, java.lang.Object parent, java.lang.Object node)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphUtilities

public GraphUtilities()
Method Detail

getAllEdges

public static java.util.Set getAllEdges(org.jgraph.graph.GraphModel model)
Parameters:
model -
Returns:
all edges in the model

getSourceNode

public static java.lang.Object getSourceNode(org.jgraph.graph.GraphModel model,
                                             java.lang.Object edge)
Parameters:
model -
edge -
Returns:
root source node of edge

getTargetNode

public static java.lang.Object getTargetNode(org.jgraph.graph.GraphModel model,
                                             java.lang.Object edge)
Parameters:
model -
edge -
Returns:
root target node of edge

getRoot

public static java.lang.Object getRoot(org.jgraph.graph.GraphModel model,
                                       java.lang.Object node)
Parameters:
model -
node -
Returns:
root node of object

isParentOf

public static boolean isParentOf(org.jgraph.graph.GraphModel model,
                                 java.lang.Object parent,
                                 java.lang.Object node)
Parameters:
model -
parent -
node -
Returns:
true if parent is a parent of node

getIncomingEdges

public static java.util.Set getIncomingEdges(org.jgraph.graph.GraphModel model,
                                             java.lang.Object node)
Parameters:
model -
node -
Returns:
all the edges entering the given node

getOutgoingEdges

public static java.util.Set getOutgoingEdges(org.jgraph.graph.GraphModel model,
                                             java.lang.Object node)
Parameters:
model -
node -
Returns:
all the edges leaving the given node