GraphLab Project

graphlab.plugins.main.saveload
Class SaveLoadPluginMethods

java.lang.Object
  extended by graphlab.plugins.main.saveload.SaveLoadPluginMethods
All Implemented Interfaces:
PluginMethods

public class SaveLoadPluginMethods
extends java.lang.Object
implements PluginMethods

Author:
azin azadi

Constructor Summary
SaveLoadPluginMethods(BlackBoard blackboard)
           
 
Method Summary
 void copySelectedAsMatrix(SubGraph sd)
          copies the Vertices and Edges as a graph to clipboard
static java.lang.String getExtension(java.io.File f)
          Return the extension portion of the file's name .
 GraphModel loadGraphML(java.io.File f)
          clears the current graph and load a graphml file saved in file to the current graph
 GraphModel loadMatrix(java.io.File file)
          loads the matrix saved in file to the current graph
 java.lang.String matrix2String(GraphModel g)
           
 void saveAsGraphML(java.io.File file)
           
 void saveAsGraphML(GraphModel g, java.io.File f)
           
 void saveAsImage(java.io.File file, java.lang.String format)
          saves the current graph as a (format) image.
 void saveAsImage(GraphModel g, java.io.File file, java.lang.String extension)
          saves g in file as a (jpeg) image
 void saveAsMatrix(java.io.File file)
          saves the current graph as matrix
 void saveAsMatrix(GraphModel g, java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaveLoadPluginMethods

public SaveLoadPluginMethods(BlackBoard blackboard)
Method Detail

saveAsMatrix

public void saveAsMatrix(java.io.File file)
                  throws java.io.IOException
saves the current graph as matrix

Throws:
java.io.IOException
See Also:
SaveMatrix.saveMatrix(graphlab.graph.graph.GraphModel,java.io.File)

saveAsMatrix

public void saveAsMatrix(GraphModel g,
                         java.io.File file)
                  throws java.io.IOException
Throws:
java.io.IOException
See Also:
SaveMatrix.saveMatrix(graphlab.graph.graph.GraphModel,java.io.File)

matrix2String

public java.lang.String matrix2String(GraphModel g)

saveAsImage

public void saveAsImage(java.io.File file,
                        java.lang.String format)
saves the current graph as a (format) image. format e.g. jpeg, png, ...


saveAsImage

public void saveAsImage(GraphModel g,
                        java.io.File file,
                        java.lang.String extension)
saves g in file as a (jpeg) image


saveAsGraphML

public void saveAsGraphML(java.io.File file)
                   throws java.io.IOException
Throws:
java.io.IOException
See Also:
Save.saveGraphML(graphlab.graph.graph.GraphModel,java.io.File)

saveAsGraphML

public void saveAsGraphML(GraphModel g,
                          java.io.File f)
                   throws java.io.IOException
Throws:
java.io.IOException
See Also:
Save.saveGraphML(graphlab.graph.graph.GraphModel,java.io.File)

loadMatrix

public GraphModel loadMatrix(java.io.File file)
                      throws java.io.IOException
loads the matrix saved in file to the current graph

Parameters:
file -
Throws:
java.io.IOException

loadGraphML

public GraphModel loadGraphML(java.io.File f)
                       throws java.io.IOException,
                              javax.xml.parsers.ParserConfigurationException,
                              org.xml.sax.SAXException
clears the current graph and load a graphml file saved in file to the current graph

Throws:
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

copySelectedAsMatrix

public void copySelectedAsMatrix(SubGraph sd)
copies the Vertices and Edges as a graph to clipboard

Parameters:
sd -

getExtension

public static java.lang.String getExtension(java.io.File f)
Return the extension portion of the file's name .

See Also:
getExtension(java.io.File), FileFilter.accept(java.io.File)

GraphLab Project