gov.nasa.gsfc.drl.rtstps.core.output.hdf5
Class UserBlock

java.lang.Object
  extended by gov.nasa.gsfc.drl.rtstps.core.output.hdf5.UserBlock

public class UserBlock
extends java.lang.Object

Create the user block for the RDR file.


Field Summary
private  MissionName missionName
           
private  java.io.RandomAccessFile out
           
private  PlatformShortName platformShortName
           
private  java.util.List<RDR> rdrs
           
private  java.lang.StringBuffer xmlBuffer
           
 
Constructor Summary
UserBlock(MissionName missionName, PlatformShortName platformShortName, java.util.List<RDR> rdrs)
          Use the mission name, the platform short and the list of RDR sensors in the file to build the user block
 
Method Summary
 void close()
          Close the internal descriptor used to write the UserBlock portion of the file
 MissionName getMissionName()
          Return the mission name
 int getNumberOfProducts()
          Return the number products (RDR objects) being used
 PlatformShortName getPlatformShortName()
          Return the platform short name
 java.util.List<RDR> getRDRs()
          Return the list of RDR object used as inputs into the user block
 java.lang.StringBuffer getXML()
          Return the XML created from the inputs
private  void rdrProductToXML(RDRProduct rdrProduct)
          Build out the XML related to the RDRProduct objects
private  void toXML()
          Build out the XML #1
 void write(java.io.File hdfFile)
          Write the XML to the UserBlock of the RDR file given the HDF file handle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

missionName

private MissionName missionName

platformShortName

private PlatformShortName platformShortName

rdrs

private java.util.List<RDR> rdrs

xmlBuffer

private java.lang.StringBuffer xmlBuffer

out

private java.io.RandomAccessFile out
Constructor Detail

UserBlock

public UserBlock(MissionName missionName,
                 PlatformShortName platformShortName,
                 java.util.List<RDR> rdrs)
Use the mission name, the platform short and the list of RDR sensors in the file to build the user block

Parameters:
missionName - the mission name
platformShortName - the platform short name
rdrs - the list of RDR objects
Method Detail

getMissionName

public MissionName getMissionName()
Return the mission name

Returns:
the MissionName

getPlatformShortName

public PlatformShortName getPlatformShortName()
Return the platform short name

Returns:
the PlatformShortName

getNumberOfProducts

public int getNumberOfProducts()
Return the number products (RDR objects) being used

Returns:
the number of products

getRDRs

public java.util.List<RDR> getRDRs()
Return the list of RDR object used as inputs into the user block

Returns:
the list of RDRs

getXML

public java.lang.StringBuffer getXML()
Return the XML created from the inputs

Returns:
a StringBuffer containing the XML

write

public void write(java.io.File hdfFile)
           throws RtStpsException
Write the XML to the UserBlock of the RDR file given the HDF file handle. The handle is used to open another descriptor into the file and this is used to write the user block.

Parameters:
hdfFile - the handle to the RDR file
Throws:
RtStpsException - wraps any IOExceptions as an RtStpsException

close

public void close()
           throws RtStpsException
Close the internal descriptor used to write the UserBlock portion of the file

Throws:
RtStpsException

toXML

private void toXML()
Build out the XML #1


rdrProductToXML

private void rdrProductToXML(RDRProduct rdrProduct)
Build out the XML related to the RDRProduct objects

Parameters:
rdrProduct - RDRProduct of interest