prefuse.data.io
Class AbstractGraphReader

java.lang.Object
  extended by prefuse.data.io.AbstractGraphReader
All Implemented Interfaces:
GraphReader
Direct Known Subclasses:
GraphMLReader, TreeMLReader

public abstract class AbstractGraphReader
extends java.lang.Object
implements GraphReader

Abstract base class implementation of the GraphReader interface. Provides implementations for all but the GraphReader.readGraph(InputStream) method.

Author:
jeffrey heer

Constructor Summary
AbstractGraphReader()
           
 
Method Summary
 Graph readGraph(java.io.File f)
          Read in a graph from the given File.
abstract  Graph readGraph(java.io.InputStream is)
          Read in a graph from the given InputStream.
 Graph readGraph(java.lang.String location)
          Read in a graph from the file at the given location.
 Graph readGraph(java.net.URL url)
          Read in a graph from the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGraphReader

public AbstractGraphReader()
Method Detail

readGraph

public Graph readGraph(java.lang.String location)
                throws DataIOException
Description copied from interface: GraphReader
Read in a graph from the file at the given location. Though not required by this interface, the String is typically resolved using the IOLib.streamFromString(String) method, allowing URLs, classpath references, and files on the file system to be accessed.

Specified by:
readGraph in interface GraphReader
Parameters:
location - the location to read the table from
Returns:
the loaded Graph
Throws:
DataIOException
See Also:
GraphReader.readGraph(java.lang.String)

readGraph

public Graph readGraph(java.net.URL url)
                throws DataIOException
Description copied from interface: GraphReader
Read in a graph from the given URL.

Specified by:
readGraph in interface GraphReader
Parameters:
url - the url to read the graph from
Returns:
the loaded Graph
Throws:
DataIOException
See Also:
GraphReader.readGraph(java.net.URL)

readGraph

public Graph readGraph(java.io.File f)
                throws DataIOException
Description copied from interface: GraphReader
Read in a graph from the given File.

Specified by:
readGraph in interface GraphReader
Parameters:
f - the file to read the graph from
Returns:
the loaded Graph
Throws:
DataIOException
See Also:
GraphReader.readGraph(java.io.File)

readGraph

public abstract Graph readGraph(java.io.InputStream is)
                         throws DataIOException
Description copied from interface: GraphReader
Read in a graph from the given InputStream.

Specified by:
readGraph in interface GraphReader
Parameters:
is - the InputStream to read the graph from
Returns:
the loaded Graph
Throws:
DataIOException
See Also:
GraphReader.readGraph(java.io.InputStream)


Copyright © 2007 Regents of the University of California