prefuse.data.tuple
Class TableEdge

java.lang.Object
  extended by prefuse.data.tuple.TableTuple
      extended by prefuse.data.tuple.TableEdge
All Implemented Interfaces:
Edge, Tuple

public class TableEdge
extends TableTuple
implements Edge

Edge implementation that reads Edge data from a backing edge table.

Author:
jeffrey heer

Field Summary
protected  Graph m_graph
          The backing graph.
 
Fields inherited from class prefuse.data.tuple.TableTuple
m_row, m_table
 
Constructor Summary
TableEdge()
           
 
Method Summary
 Node getAdjacentNode(Node n)
          Given a Node upon which this Edge is incident, the opposite incident Node is returned.
 Graph getGraph()
          Returns the graph of which this Edge is a member.
 Node getSourceNode()
          Returns the first, or source, node upon which this Edge is incident.
 Node getTargetNode()
          Returns the second, or target, node upon which this Edge is incident.
protected  void init(Table table, Graph graph, int row)
          Initialize a new Edge backed by an edge table.
 boolean isDirected()
          Indicates if this edge is directed or undirected.
 
Methods inherited from class prefuse.data.tuple.TableTuple
canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSet, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, get, get, getBoolean, getBoolean, getColumnCount, getColumnIndex, getColumnName, getColumnType, getColumnType, getDate, getDate, getDefault, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getRow, getSchema, getString, getString, getTable, isValid, revertToDefault, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface prefuse.data.Tuple
canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSet, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, get, get, getBoolean, getBoolean, getColumnCount, getColumnIndex, getColumnName, getColumnType, getColumnType, getDate, getDate, getDefault, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getRow, getSchema, getString, getString, getTable, isValid, revertToDefault, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString
 

Field Detail

m_graph

protected Graph m_graph
The backing graph.

Constructor Detail

TableEdge

public TableEdge()
Method Detail

init

protected void init(Table table,
                    Graph graph,
                    int row)
Initialize a new Edge backed by an edge table. This method is used by the appropriate TupleManager instance, and should not be called directly by client code, unless by a client-supplied custom TupleManager.

Overrides:
init in class TableTuple
Parameters:
table - the edge Table
graph - the backing Graph
row - the row in the edge table to which this Node instance corresponds.

getGraph

public Graph getGraph()
Description copied from interface: Edge
Returns the graph of which this Edge is a member.

Specified by:
getGraph in interface Edge
Returns:
the Graph containing this Edge
See Also:
Edge.getGraph()

isDirected

public boolean isDirected()
Description copied from interface: Edge
Indicates if this edge is directed or undirected.

Specified by:
isDirected in interface Edge
Returns:
true if directed, false if undirected.
See Also:
Edge.isDirected()

getSourceNode

public Node getSourceNode()
Description copied from interface: Edge
Returns the first, or source, node upon which this Edge is incident.

Specified by:
getSourceNode in interface Edge
Returns:
the source Node
See Also:
Edge.getSourceNode()

getTargetNode

public Node getTargetNode()
Description copied from interface: Edge
Returns the second, or target, node upon which this Edge is incident.

Specified by:
getTargetNode in interface Edge
Returns:
the source Node
See Also:
Edge.getTargetNode()

getAdjacentNode

public Node getAdjacentNode(Node n)
Description copied from interface: Edge
Given a Node upon which this Edge is incident, the opposite incident Node is returned. Throws an exception if the input node is not incident on this Edge.

Specified by:
getAdjacentNode in interface Edge
Parameters:
n - a Node upon which this Edge is incident
Returns:
the other Node touched by this Edge
See Also:
Edge.getAdjacentNode(prefuse.data.Node)


Copyright © 2007 Regents of the University of California