gridiq.poweranalysis
Interface NetworkParser

All Known Implementing Classes:
PSATParser

public interface NetworkParser

Provides an interface for classes that read and write network definition and simulation results for a power simulation tool. Such classes must contain methods to parse network definition files in the specific format of that tool, read simulation results in the format of that tool, and serialise networks into the format for that tool.

Author:
colin

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.
 

Method Detail

readNetworkFile

Network readNetworkFile(java.io.File networkFile)
                        throws java.io.IOException
Parses a network file into a Network object.

Parameters:
networkFile - The file to parse.
Returns:
The resulting network.
Throws:
java.io.IOException

readResults

SimResults readResults(java.io.File resultsFile)
                       throws java.io.IOException
Parses a simulation results file into a SimResults file.

Parameters:
resultsFile - The simulation results to parse.
Returns:
The simulation results.
Throws:
java.io.IOException

writeNetwork

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

Parameters:
network - The network to serialise.
file - The file to write the serialised network to.
Throws:
java.io.IOException