gridiq.poweranalysis.psat.parser
Class PSATParser

java.lang.Object
  extended by gridiq.poweranalysis.psat.parser.PSATParser
All Implemented Interfaces:
NetworkParser

public class PSATParser
extends java.lang.Object
implements NetworkParser

A NetworkParser to handle PSAT data files.

Author:
colin

Field Summary
(package private)  int lineNumber
           
 
Constructor Summary
PSATParser()
           
 
Method Summary
 Network readNetworkFile(java.io.File networkFile)
          Parses a network file into a Network object.
 SimResults readResults(java.io.File resultsFile)
          Parses a simulation results file into a SimResults file.
 void writeNetwork(Network network, java.io.File file)
          Serialises a network to file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineNumber

int lineNumber
Constructor Detail

PSATParser

public PSATParser()
Method Detail

readNetworkFile

public Network readNetworkFile(java.io.File networkFile)
                        throws java.io.IOException
Description copied from interface: NetworkParser
Parses a network file into a Network object.

Specified by:
readNetworkFile in interface NetworkParser
Parameters:
networkFile - The file to parse.
Returns:
The resulting network.
Throws:
java.io.IOException

writeNetwork

public void writeNetwork(Network network,
                         java.io.File file)
                  throws java.io.IOException
Description copied from interface: NetworkParser
Serialises a network to file. In general the serialised network should be able to be parsed using the NetworkParser.readNetworkFile(java.io.File) method to produce an identical network to that serialised using this method.

Specified by:
writeNetwork in interface NetworkParser
Parameters:
network - The network to serialise.
file - The file to write the serialised network to.
Throws:
java.io.IOException

readResults

public SimResults readResults(java.io.File resultsFile)
                       throws java.io.IOException
Description copied from interface: NetworkParser
Parses a simulation results file into a SimResults file.

Specified by:
readResults in interface NetworkParser
Parameters:
resultsFile - The simulation results to parse.
Returns:
The simulation results.
Throws:
java.io.IOException