public class PlantComponentReader extends java.lang.Object implements IPlantComponentVisitor
This class is used by the PlantIOFactory
for reading PlantComponents
from HDF5 files. It assumes an HDF5 Group is already opened (including the
tag) and reads all of the attributes and datasets into the PlantComponent.
This class uses the IPlantComponentVisitor
interface to handle
reading for each type of PlantComponent.
Constructor and Description |
---|
PlantComponentReader(HdfIOFactory factory)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
readPlantComponent(PlantComponent component,
int groupId)
Reads a
PlantComponent 's information from the specified HDF5
Group. |
void |
visit(Boundary plantComp)
Visits a PlantComponent of type Boundary.
|
void |
visit(Branch plantComp)
Visits a PlantComponent of type Branch.
|
void |
visit(CoreChannel plantComp)
Visits a PlantComponent of type CoreChannel.
|
void |
visit(DownComer plantComp)
Visits a PlantComponent of type DownComer.
|
void |
visit(FlowJunction plantComp)
Visits a PlantComponent of type FlowJunction.
|
void |
visit(GeometricalComponent plantComp)
Visits a PlantComponent of type GeometricalComponent.
|
void |
visit(HeatExchanger plantComp)
Visits a PlantComponent of type HeatExchanger.
|
void |
visit(IdealPump plantComp)
Visits a PlantComponent of type IdealPump.
|
void |
visit(Inlet plantComp)
Visits a PlantComponent of type Inlet.
|
void |
visit(Junction plantComp)
Visits a PlantComponent of type Junction.
|
void |
visit(MassFlowInlet plantComp)
Visits a PlantComponent of type MassFlowInlet.
|
void |
visit(OneInOneOutJunction plantComp)
Visits a PlantComponent of type OneInOneOutJunction.
|
void |
visit(Outlet plantComp)
Visits a PlantComponent of type Outlet.
|
void |
visit(Pipe plantComp)
Visits a PlantComponent of type Pipe.
|
void |
visit(PipeToPipeJunction plantComp)
Visits a PlantComponent of type PipeToPipeJunction.
|
void |
visit(PipeWithHeatStructure plantComp)
Visits a PlantComponent of type PipeWithHeatStructure.
|
void |
visit(PlantComposite plantComp) |
void |
visit(PointKinetics plantComp)
Visits a PlantComponent of type PointKinetics.
|
void |
visit(Pump plantComp)
Visits a PlantComponent of type Pump.
|
void |
visit(Reactor plantComp)
Visits a PlantComponent of type Reactor.
|
void |
visit(SeparatorDryer plantComp)
Visits a PlantComponent of type SeparatorDryer.
|
void |
visit(SolidWall plantComp)
Visits a PlantComponent of type SolidWall.
|
void |
visit(SpecifiedDensityAndVelocityInlet plantComp)
Visits a PlantComponent of type SpecifiedDensityAndVelocityInlet.
|
void |
visit(Subchannel plantComp)
Visits a PlantComponent of type GeometricalComponent.
|
void |
visit(SubchannelBranch plantComp)
Visits a PlantComponent of type SubchannelBranch.
|
void |
visit(TDM plantComp)
Visits a PlantComponent of type TDM.
|
void |
visit(TimeDependentJunction plantComp)
Visits a PlantComponent of type TimeDependentJunction.
|
void |
visit(TimeDependentVolume plantComp)
Visits a PlantComponent of type TimeDependentVolume.
|
void |
visit(Turbine plantComp)
Visits a PlantComponent of type Turbine.
|
void |
visit(Valve plantComp)
Visits a PlantComponent of type Valve.
|
void |
visit(VolumeBranch plantComp)
Visits a PlantComponent of type VolumeBranch.
|
void |
visit(WetWell plantComp)
Visits a PlantComponent of type WetWell.
|
public PlantComponentReader(HdfIOFactory factory)
factory
- The PlantIOFactory
that is using this reader. We need
access to it for its HDF5 reading methods.public void readPlantComponent(PlantComponent component, int groupId) throws java.lang.NullPointerException, ncsa.hdf.hdf5lib.exceptions.HDF5Exception
PlantComponent
's information from the specified HDF5
Group.component
- The PlantComponent whose information is being read from the
file.groupId
- The HDF5 Group ID for the PlantComponent.java.lang.NullPointerException
ncsa.hdf.hdf5lib.exceptions.HDF5Exception
public void visit(PlantComposite plantComp)
visit
in interface IPlantComponentVisitor
public void visit(GeometricalComponent plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type GeometricalComponent.
visit
in interface IPlantComponentVisitor
plantComp
- The GeometricalComponent accepting visitors.
public void visit(Junction plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Junction.
visit
in interface IPlantComponentVisitor
plantComp
- The Junction accepting visitors.
public void visit(Reactor plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Reactor.
visit
in interface IPlantComponentVisitor
plantComp
- The Reactor accepting visitors.
public void visit(PointKinetics plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type PointKinetics.
visit
in interface IPlantComponentVisitor
plantComp
- The PointKinetics accepting visitors.
public void visit(HeatExchanger plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type HeatExchanger.
visit
in interface IPlantComponentVisitor
plantComp
- The HeatExchanger accepting visitors.
public void visit(Pipe plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Pipe.
visit
in interface IPlantComponentVisitor
plantComp
- The Pipe accepting visitors.
public void visit(CoreChannel plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type CoreChannel.
visit
in interface IPlantComponentVisitor
plantComp
- The CoreChannel accepting visitors.
public void visit(Subchannel plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type GeometricalComponent.
visit
in interface IPlantComponentVisitor
plantComp
- The Subchannel accepting visitors.
public void visit(PipeWithHeatStructure plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type PipeWithHeatStructure.
visit
in interface IPlantComponentVisitor
plantComp
- The PipeWithHeatStructure accepting visitors.
public void visit(Branch plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Branch.
visit
in interface IPlantComponentVisitor
plantComp
- The Branch accepting visitors.
public void visit(SubchannelBranch plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type SubchannelBranch.
visit
in interface IPlantComponentVisitor
plantComp
- The SubchannelBranch accepting visitors.
public void visit(VolumeBranch plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type VolumeBranch.
visit
in interface IPlantComponentVisitor
plantComp
- The VolumeBranch accepting visitors.
public void visit(FlowJunction plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type FlowJunction.
visit
in interface IPlantComponentVisitor
plantComp
- The FlowJunction accepting visitors.
public void visit(WetWell plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type WetWell.
visit
in interface IPlantComponentVisitor
plantComp
- The WetWell accepting visitors.
public void visit(Boundary plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Boundary.
visit
in interface IPlantComponentVisitor
plantComp
- The Boundary accepting visitors.
public void visit(OneInOneOutJunction plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type OneInOneOutJunction.
visit
in interface IPlantComponentVisitor
plantComp
- The OneInOneOutJunction accepting visitors.
public void visit(Turbine plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Turbine.
visit
in interface IPlantComponentVisitor
plantComp
- The Turbine accepting visitors.
public void visit(IdealPump plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type IdealPump.
visit
in interface IPlantComponentVisitor
plantComp
- The IdealPump accepting visitors.
public void visit(Pump plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Pump.
visit
in interface IPlantComponentVisitor
plantComp
- The Pump accepting visitors.
public void visit(Valve plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Valve.
visit
in interface IPlantComponentVisitor
plantComp
- The Valve accepting visitors.
public void visit(PipeToPipeJunction plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type PipeToPipeJunction.
visit
in interface IPlantComponentVisitor
plantComp
- The PipeToPipeJunction accepting visitors.
public void visit(Inlet plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Inlet.
visit
in interface IPlantComponentVisitor
plantComp
- The Inlet accepting visitors.
public void visit(MassFlowInlet plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type MassFlowInlet.
visit
in interface IPlantComponentVisitor
plantComp
- The MassFlowInlet accepting visitors.
public void visit(SpecifiedDensityAndVelocityInlet plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type SpecifiedDensityAndVelocityInlet.
visit
in interface IPlantComponentVisitor
plantComp
- The SpecifiedDensityAndVelocityInlet accepting visitors.
public void visit(Outlet plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type Outlet.
visit
in interface IPlantComponentVisitor
plantComp
- The Outlet accepting visitors.
public void visit(SolidWall plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type SolidWall.
visit
in interface IPlantComponentVisitor
plantComp
- The SolidWall accepting visitors.
public void visit(TDM plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type TDM.
visit
in interface IPlantComponentVisitor
plantComp
- The TDM accepting visitors.
public void visit(TimeDependentJunction plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type TimeDependentJunction.
visit
in interface IPlantComponentVisitor
plantComp
- The TimeDependentJunction accepting visitors.
public void visit(TimeDependentVolume plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type TimeDependentVolume.
visit
in interface IPlantComponentVisitor
plantComp
- The TimeDependentVolume accepting visitors.
public void visit(DownComer plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type DownComer.
visit
in interface IPlantComponentVisitor
plantComp
- The DownComer accepting visitors.
public void visit(SeparatorDryer plantComp)
IPlantComponentVisitor
Visits a PlantComponent of type SeparatorDryer.
visit
in interface IPlantComponentVisitor
plantComp
- The SeparatorDryer accepting visitors.