GraphLab Project

graphlab.plugins.main.saveload
Class Save

java.lang.Object
  extended by graphlab.plugins.main.saveload.Save
All Implemented Interfaces:
BasicExtension, Extension, GraphWriterExtension, GraphWriterInterface

public class Save
extends java.lang.Object
implements GraphWriterExtension

Saves a graph file to GraphML file format

Author:
Reza Mohammadi, Azin Azadi

Constructor Summary
Save()
           
 
Method Summary
 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 void saveGraphML(GraphModel g, java.io.File file)
          saves g in file as a GraphML
 void write(java.io.File file, GraphModel graph)
          Writes the graph to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Save

public Save()
Method Detail

saveGraphML

public static void saveGraphML(GraphModel g,
                               java.io.File file)
                        throws java.io.IOException
saves g in file as a GraphML

Parameters:
g -
file -
Throws:
java.io.IOException

getName

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

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

getExtension

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

Specified by:
getExtension in interface GraphWriterInterface
Returns:
the Extension

write

public void write(java.io.File file,
                  GraphModel graph)
           throws GraphIOException
Description copied from interface: GraphWriterInterface
Writes the graph to the file.

Specified by:
write in interface GraphWriterInterface
Parameters:
file - the file
graph - the graph
Throws:
GraphIOException - In the case of the writer error.

getDescription

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

GraphLab Project