GraphLab Project

graphlab.plugins.main.saveload.core
Interface GraphReaderInterface

All Known Subinterfaces:
GraphReaderExtension
All Known Implementing Classes:
Load, LoadMatrix, LoadSimpleGraph

public interface GraphReaderInterface

Author:
azin azadi

Method Summary
 boolean accepts(java.io.File file)
          Reads the file and enters the data in the graph.
 java.lang.String getExtension()
          Retrieves the file extension for the file type.
 java.lang.String getName()
          Retrieves the name of the file type.
 GraphModel read(java.io.File file)
          Reads the file and enters the data in the graph.
 

Method Detail

accepts

boolean accepts(java.io.File file)
Reads the file and enters the data in the graph. The method gets an empty graph object, and initializes it with the data from the file.

Parameters:
file - the file
Returns:
boolean Indicates whether the file is acceptable for reading.

getName

java.lang.String getName()
Retrieves the name of the file type.

Returns:
the Name

getExtension

java.lang.String getExtension()
Retrieves the file extension for the file type. Example: "xml", "gr".

Returns:
the Extension

read

GraphModel read(java.io.File file)
                throws GraphIOException
Reads the file and enters the data in the graph. The method gets an empty graph, and initializes it with the data from the file.

Parameters:
file -
Throws:
GraphIOException - In the case of the reader error.
java.io.IOException - - In the case of the IO error.

GraphLab Project