snl.ccss.jpowersystem.parsers.cdf
Class CDFParser

java.lang.Object
  extended by snl.ccss.jpowersystem.parsers.cdf.CDFParser
All Implemented Interfaces:
Parser

public class CDFParser
extends java.lang.Object
implements Parser

This class implements the Parser interface and provides the methods necessary to create a power system from data organized in the IEEE Common Data Format (CDF).

Author:
Bryan T. Richardson, Sandia National Laboratories

Constructor Summary
CDFParser()
          Default CDFParser constructor.
CDFParser(java.lang.String powerSystemClassName, java.lang.String busClassName, java.lang.String branchClassName)
          Argument-accepting CDFParser constructor.
 
Method Summary
 java.lang.String getBranchClassName()
           
 java.lang.String getBusClassName()
           
 java.lang.String getPowerSystemClassName()
           
 PowerSystem loadPowerSystemFromFile(java.lang.String file)
          This method calls all the methods necessary to create a power system from the given file.
 void setBranchClassName(java.lang.String branchClassName)
           
 void setBusClassName(java.lang.String busClassName)
           
 void setPowerSystemClassName(java.lang.String powerSystemClassName)
           
 void writePowerSystemToFile(PowerSystem powerSystem, java.lang.String file)
          This method performs all the actions necessary to write the given power system to the given file with the data arranged in the IEEE Common Data Format.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDFParser

public CDFParser()
Default CDFParser constructor.


CDFParser

public CDFParser(java.lang.String powerSystemClassName,
                 java.lang.String busClassName,
                 java.lang.String branchClassName)
Argument-accepting CDFParser constructor.

Parameters:
powerSystemClassName - Path to user-defined power system class
busClassName - Path to user-defined bus class
branchClassName - Path to user-defined branch class
Method Detail

loadPowerSystemFromFile

public PowerSystem loadPowerSystemFromFile(java.lang.String file)
This method calls all the methods necessary to create a power system from the given file. Note: the given file MUST be organized in the IEEE Common Data Format. Note: the user-defined PowerSystem, Bus and Branch objects MUST implement the CDFLoadable interface.

Specified by:
loadPowerSystemFromFile in interface Parser
Parameters:
file - Data file to be parsed
Returns:
PowerSystem object created from the data in the given file

writePowerSystemToFile

public void writePowerSystemToFile(PowerSystem powerSystem,
                                   java.lang.String file)
This method performs all the actions necessary to write the given power system to the given file with the data arranged in the IEEE Common Data Format. Note: the user-defined PowerSystem, Bus and Branch objects MUST implement the CDFWritable interface.

Specified by:
writePowerSystemToFile in interface Parser
Parameters:
powerSystem - PowerSystem object from which to create the data file
file - Location of data file to be created from power system

getBranchClassName

public java.lang.String getBranchClassName()

getBusClassName

public java.lang.String getBusClassName()

getPowerSystemClassName

public java.lang.String getPowerSystemClassName()

setBranchClassName

public void setBranchClassName(java.lang.String branchClassName)

setBusClassName

public void setBusClassName(java.lang.String busClassName)

setPowerSystemClassName

public void setPowerSystemClassName(java.lang.String powerSystemClassName)