public class DotParser extends Object implements GraphConstants
DIRECTED, DOUBLE, NORMAL, PLURAL_DUMMY, REVERSED, SINGULAR_DUMMY| Constructor and Description |
|---|
DotParser(Reader input,
FastVector nodes,
FastVector edges)
Dot parser Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
parse()
This method parses the string or the InputStream that we
passed in through the constructor and builds up the
m_nodes and m_edges vectors
|
static void |
writeDOT(String filename,
String graphName,
FastVector nodes,
FastVector edges)
This method saves a graph in a file in DOT format.
|
public DotParser(Reader input, FastVector nodes, FastVector edges)
input - - The input, if passing in a string then
encapsulate that in String reader objectnodes - - Vector to put in GraphNode objects,
corresponding to the nodes parsed in from
the inputedges - - Vector to put in GraphEdge objects,
corresponding to the edges parsed in from
the inputpublic String parse()
public static void writeDOT(String filename, String graphName, FastVector nodes, FastVector edges)
filename - - The name of the file to write in. (will overwrite)graphName - - The name of the graphnodes - - Vector containing all the nodesedges - - Vector containing all the edgesCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.