infovis.graph.io
Class AbstractGraphReader

java.lang.Object
  extended by infovis.io.AbstractReader
      extended by infovis.table.io.AbstractTableReader
          extended by infovis.graph.io.AbstractGraphReader
Direct Known Subclasses:
AdjGraphReader, ChacoGraphReader, DOTGraphReader, GMLGraphReader, PajekNetReader, RDFGraphReader, VCGGraphReader

public abstract class AbstractGraphReader
extends AbstractTableReader

Base class for Graph readers, except for formats based on XML. Graph readers hold a graph and can also maintain the shapes of the nodes and the shapes of the links.

Version:
$Revision: 1.6 $
Author:
Jean-Daniel Fekete

Constructor Summary
AbstractGraphReader(InputStream in, String name, Graph graph)
          Creates an AbstractGraphReader from a BufferedReader, a name and a Graph.
 
Method Summary
 Shape findLinkShape(int edge)
           
 ShapeColumn findLinkShapes()
           
 Shape findNodeShape(int node)
           
 ShapeColumn findNodeShapes()
           
abstract  Rectangle2D.Float getBbox()
          Returns the rectangle containing the layed-out graph
 Graph getGraph()
          Returns the Graph
 Shape getLinkShape(int edge)
           
 ShapeColumn getLinkShapes()
           
 Shape getNodeShape(int node)
           
 ShapeColumn getNodeShapes()
           
 void reset()
           
 void setLinkShape(int edge, Shape s)
           
 void setNodeShape(int node, Shape s)
           
 
Methods inherited from class infovis.table.io.AbstractTableReader
close, getBuffer, getBufferedReader, getCommentChar, getField, getIn, getTable, ignoreLine, isEof, read, readInt, readLine, readQuoted, setBuffer, setCommentChar, setEof, setTable, skipToEol
 
Methods inherited from class infovis.io.AbstractReader
createColumn, getEncoding, getName, guessFieldType, load, setEncoding, setIn, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGraphReader

public AbstractGraphReader(InputStream in,
                           String name,
                           Graph graph)
Creates an AbstractGraphReader from a BufferedReader, a name and a Graph.

Parameters:
in - the BufferedReader
name - the file/input name
graph - the Graph
Method Detail

getGraph

public Graph getGraph()
Returns the Graph

Returns:
the Graph

reset

public void reset()

getBbox

public abstract Rectangle2D.Float getBbox()
Returns the rectangle containing the layed-out graph

Returns:
the rectangle containing the layed-out graph or null if it is not computed.

findNodeShapes

public ShapeColumn findNodeShapes()

getNodeShapes

public ShapeColumn getNodeShapes()

getNodeShape

public Shape getNodeShape(int node)

setNodeShape

public void setNodeShape(int node,
                         Shape s)

findNodeShape

public Shape findNodeShape(int node)

findLinkShapes

public ShapeColumn findLinkShapes()

getLinkShapes

public ShapeColumn getLinkShapes()

getLinkShape

public Shape getLinkShape(int edge)

setLinkShape

public void setLinkShape(int edge,
                         Shape s)

findLinkShape

public Shape findLinkShape(int edge)


Copyright 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.