org.xistrat.util.d3.vrmlgraph
Class GraphFileInputParser

java.lang.Object
  extended by org.xistrat.util.d3.vrmlgraph.GraphFileInputParser

public class GraphFileInputParser
extends java.lang.Object

An instance of this class can be used to parse a text file that contains a description of connected nodes. This information is then added to the GraphData object that was passed via the constructor of this class.

Since:
0.6.90

Constructor Summary
GraphFileInputParser(GraphData graph)
          Constructor for the GraphFileInputParser object
 
Method Summary
 void populateFromFile(java.lang.String inputFile)
          This method reads from the file specified in inputFile and parses the data into the GraphData object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphFileInputParser

public GraphFileInputParser(GraphData graph)
Constructor for the GraphFileInputParser object

Parameters:
graph - A GraphData object to store the graph in.
Method Detail

populateFromFile

public void populateFromFile(java.lang.String inputFile)
                      throws java.lang.Exception
This method reads from the file specified in inputFile and parses the data into the GraphData object. Any unexpected results will cause an exception to be thrown. Nodes are added to a random location between (0,0,0) and (20,20,20).

Parameters:
inputFile - The filename to read from
Throws:
java.lang.Exception - An exception is thrown if any errors occur