snl.ccss.jpowersystem
Class PowerSystemFactory

java.lang.Object
  extended by snl.ccss.jpowersystem.PowerSystemFactory

public class PowerSystemFactory
extends java.lang.Object

Factory object for vending standard power system objects. This factory is ultimately used by parsers that exist in this library to create new power system objects as they parse data files. Paths to actual user-defined power system objects to be created are passed to the factory methods and as long as the given objects implement the appropriate power system interfaces new instances of the given objects will be created.

Author:
Bryan T. Richardson, Sandia National Laboratories

Constructor Summary
PowerSystemFactory()
           
 
Method Summary
static Branch createNewBranch(java.lang.String branchClassName)
          Creates and returns user-defined implementation of a branch object.
static Bus createNewBus(java.lang.String busClassName)
          Creates and returns user-defined implementation of a bus object.
static BusDevice createNewBusDevice(java.lang.String busDeviceClassName)
          Creates and returns user-defined implementation of a bus device object.
static PowerSystem createNewPowerSystem(java.lang.String powerSystemClassName)
          Creates and returns user-defined implementation of a power system object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PowerSystemFactory

public PowerSystemFactory()
Method Detail

createNewPowerSystem

public static PowerSystem createNewPowerSystem(java.lang.String powerSystemClassName)
                                        throws java.lang.Exception
Creates and returns user-defined implementation of a power system object.

Parameters:
powerSystemClassName - Path to user-defined power system object
Returns:
New instance of the user-defined PowerSystem object
Throws:
java.lang.Exception - if user-defined object does not extend PowerSystem

createNewBus

public static Bus createNewBus(java.lang.String busClassName)
                        throws java.lang.Exception
Creates and returns user-defined implementation of a bus object.

Parameters:
busClassName - Path to user-defined bus object
Returns:
New instance of the user-defined Bus object
Throws:
java.lang.Exception - if user-defined object does not implement Bus

createNewBranch

public static Branch createNewBranch(java.lang.String branchClassName)
                              throws java.lang.Exception
Creates and returns user-defined implementation of a branch object.

Parameters:
branchClassName - Path to user-defined branch object
Returns:
New instance of the user-defined Branch object
Throws:
java.lang.Exception - if user-defined object does not implement Branch

createNewBusDevice

public static BusDevice createNewBusDevice(java.lang.String busDeviceClassName)
                                    throws java.lang.Exception
Creates and returns user-defined implementation of a bus device object.

Parameters:
busDeviceClassName - Path to user-defined bus device object
Returns:
New instance of the user-defined BusDevice object
Throws:
java.lang.Exception - if user-defined object does not implement BusDevice