prefuse.data.io
Interface GraphReader

All Known Implementing Classes:
AbstractGraphReader, GraphMLReader, TreeMLReader

public interface GraphReader

nterface for classes that read in Graph or Tree data from a particular file format.

Author:
jeffrey heer

Method Summary
 Graph readGraph(java.io.File f)
          Read in a graph from the given File.
 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.
 

Method Detail

readGraph

Graph readGraph(java.lang.String location)
                throws DataIOException
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.

Parameters:
location - the location to read the table from
Returns:
the loaded Graph
Throws:
java.io.FileNotFoundException
java.io.IOException
DataIOException

readGraph

Graph readGraph(java.net.URL url)
                throws DataIOException
Read in a graph from the given URL.

Parameters:
url - the url to read the graph from
Returns:
the loaded Graph
Throws:
java.io.IOException
DataIOException

readGraph

Graph readGraph(java.io.File f)
                throws DataIOException
Read in a graph from the given File.

Parameters:
f - the file to read the graph from
Returns:
the loaded Graph
Throws:
java.io.FileNotFoundException
java.io.IOException
DataIOException

readGraph

Graph readGraph(java.io.InputStream is)
                throws DataIOException
Read in a graph from the given InputStream.

Parameters:
is - the InputStream to read the graph from
Returns:
the loaded Graph
Throws:
java.io.IOException
DataIOException


Copyright © 2007 Regents of the University of California