graphlab.gui.plugins.main.saveload
Class SaveLoadPluginMethods

java.lang.Object
  extended by graphlab.gui.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(SelectData sd)
          copies the Vertices and Edges as a graph to clipboard
 void loadGraphML(java.io.File f)
          clears the current graph and load a graphml file saved in file to the current graph
 void loadGraphML(Graph g, java.io.File f)
          clears g and load a graphml file saved in file to the current graph
 void loadMatrix(java.io.File file)
          loads the matrix saved in file to the current graph
static java.lang.String matrix2String(Graph g)
           
 void saveAsGraphML(java.io.File file)
          saves the current graph as a GraphML file
static void saveAsGraphML(Graph g, java.io.File f)
          saves g in f as a GraphML
 void saveAsImage(java.io.File file)
          saves the current graph as a (jpeg) image
static void saveAsImage(Graph g, java.io.File file)
          saves g in file as a (jpeg) image
 void saveAsMatrix(java.io.File file)
          saves the current graph as matrix
static void saveAsMatrix(Graph g, java.io.File file)
          saves g as matrix in file
 
Methods inherited from class java.lang.Object
equals, 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

saveAsMatrix

public static void saveAsMatrix(Graph g,
                                java.io.File file)
                         throws java.io.IOException
saves g as matrix in file

Throws:
java.io.IOException

matrix2String

public static java.lang.String matrix2String(Graph g)

saveAsImage

public void saveAsImage(java.io.File file)
saves the current graph as a (jpeg) image


saveAsImage

public static void saveAsImage(Graph g,
                               java.io.File file)
saves g in file as a (jpeg) image


saveAsGraphML

public void saveAsGraphML(java.io.File file)
                   throws java.io.IOException
saves the current graph as a GraphML file

Throws:
java.io.IOException

saveAsGraphML

public static void saveAsGraphML(Graph g,
                                 java.io.File f)
                          throws java.io.IOException
saves g in f as a GraphML

Throws:
java.io.IOException

loadMatrix

public void 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 void 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

loadGraphML

public void loadGraphML(Graph g,
                        java.io.File f)
                 throws java.io.IOException,
                        javax.xml.parsers.ParserConfigurationException,
                        org.xml.sax.SAXException
clears g 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(SelectData sd)
copies the Vertices and Edges as a graph to clipboard

Parameters:
sd -