GraphLab Project

graphlab.plugins.main.saveload.matrix
Class LoadMatrix

java.lang.Object
  extended by graphlab.plugins.main.saveload.matrix.LoadMatrix
All Implemented Interfaces:
BasicExtension, Extension, GraphReaderExtension, GraphReaderInterface

public class LoadMatrix
extends java.lang.Object
implements GraphReaderExtension

Author:
Azin Azadi

Constructor Summary
LoadMatrix()
           
 
Method Summary
 boolean accepts(java.io.File file)
          Reads the file and enters the data in the graph.
 java.lang.String getDescription()
           
 java.lang.String getExtension()
          Retrieves the file extension for the file type.
 java.lang.String getName()
          Retrieves the name of the file type.
static GraphModel loadMatrix(java.io.File selectedFile)
           
 GraphModel read(java.io.File file)
          Reads the file and enters the data in the graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadMatrix

public LoadMatrix()
Method Detail

accepts

public boolean accepts(java.io.File file)
Description copied from interface: GraphReaderInterface
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.

Specified by:
accepts in interface GraphReaderInterface
Parameters:
file - the file
Returns:
boolean Indicates whether the file is acceptable for reading.

getName

public java.lang.String getName()
Description copied from interface: GraphReaderInterface
Retrieves the name of the file type.

Specified by:
getName in interface Extension
Specified by:
getName in interface GraphReaderInterface
Returns:
the Name

getExtension

public java.lang.String getExtension()
Description copied from interface: GraphReaderInterface
Retrieves the file extension for the file type. Example: "xml", "gr".

Specified by:
getExtension in interface GraphReaderInterface
Returns:
the Extension

read

public GraphModel read(java.io.File file)
                throws GraphIOException
Description copied from interface: GraphReaderInterface
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.

Specified by:
read in interface GraphReaderInterface
Throws:
GraphIOException - In the case of the reader error.

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Extension

loadMatrix

public static GraphModel loadMatrix(java.io.File selectedFile)
                             throws java.io.IOException
Throws:
java.io.IOException

GraphLab Project