prefuse.data.tuple
Class TableEdge

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

public class TableEdge
extends TableTuple<TableEdge>
implements Edge<TableNode,TableEdge>

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

Author:
jeffrey heer

Field Summary
protected  Graph<?,TableNode,TableEdge> m_graph
          The backing graph.
 
Fields inherited from class prefuse.data.tuple.TableTuple
m_row, m_table
 
Constructor Summary
TableEdge()
           
 
Method Summary
 TableNode getAdjacentNode(TableNode n)
          Given a Node upon which this Edge is incident, the opposite incident Node is returned.
 Graph<?,TableNode,TableEdge> getGraph()
          Returns the graph of which this Edge is a member.
 TableNode getSourceNode()
          Returns the first, or source, node upon which this Edge is incident.
 TableNode getTargetNode()
          Returns the second, or target, node upon which this Edge is incident.
 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, invalidate, 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, invalidate, isValid, revertToDefault, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString
 

Field Detail

m_graph

protected Graph<?,TableNode,TableEdge> m_graph
The backing graph.

Constructor Detail

TableEdge

public TableEdge()
Method Detail

init

public 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.

Specified by:
init in interface Tuple<TableEdge>
Overrides:
init in class TableTuple<TableEdge>
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<?,TableNode,TableEdge> getGraph()
Description copied from interface: Edge
Returns the graph of which this Edge is a member.

Specified by:
getGraph in interface Edge<TableNode,TableEdge>
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<TableNode,TableEdge>
Returns:
true if directed, false if undirected.
See Also:
Edge.isDirected()

getSourceNode

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

Specified by:
getSourceNode in interface Edge<TableNode,TableEdge>
Returns:
the source Node
See Also:
Edge.getSourceNode()

getTargetNode

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

Specified by:
getTargetNode in interface Edge<TableNode,TableEdge>
Returns:
the source Node
See Also:
Edge.getTargetNode()

getAdjacentNode

public TableNode getAdjacentNode(TableNode 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<TableNode,TableEdge>
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 © 2008 Regents of the University of California