org.tigris.mbt.io
Class GraphML

java.lang.Object
  extended by org.tigris.mbt.io.AbstractModelHandler
      extended by org.tigris.mbt.io.GraphML

public class GraphML
extends AbstractModelHandler

A file reader for GraphML files. The reader can read one single graphml file or several in a single folder. When several files are read, they will be merged. Regardless if one or several files are read, they all end up into one single SparseGraph object.

Example: Single graphml file
GraphML graphML = new GraphML();
SparseGraph graph = graphML.load( "graph.graphml" );

Example: Folder containing several graphml files
GraphML graphML = new GraphML();
SparseGraph graph = graphML.load( "/home/user/graphml_folder/" );


Constructor Summary
GraphML()
          Default constructor.
 
Method Summary
 void load(String fileOrfolder)
          Reads one single graph, or a folder containing several graphs to be merged into one graph.
 void save(PrintStream ps)
          Writes the graph to a PrintStream, using GraphML format.
 
Methods inherited from class org.tigris.mbt.io.AbstractModelHandler
getModel, setModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphML

public GraphML()
Default constructor. Initializes the default logger.

Method Detail

load

public void load(String fileOrfolder)
Reads one single graph, or a folder containing several graphs to be merged into one graph.

Specified by:
load in class AbstractModelHandler
Parameters:
fileName - The gramphml file or folder.
See Also:
AbstractModelHandler.load(java.lang.String)

save

public void save(PrintStream ps)
Writes the graph to a PrintStream, using GraphML format.

Specified by:
save in class AbstractModelHandler