org.tigris.mbt.io
Class GraphML
java.lang.Object
org.tigris.mbt.io.AbstractModelHandler
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. |
GraphML
public GraphML()
- Default constructor. Initializes the default logger.
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