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

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

public class RDRCreateFile
extends java.lang.Object

Create an HDF file with basics of the RDR structure. Provide some methods to further build out the RDR.


Field Summary
private  AllData allData
           
private  DataProducts dataProducts
           
private  PDSDate firstDateTime
           
private  int hdfFile
           
private  PDSDate lastDateTime
           
private  int propertyId
           
private  java.util.HashMap<RDRName,RDR> rdrs
           
private  SpacecraftDiaryRDR2 spacecraftDiaryRDR2
           
private  Stats stats
           
static boolean timeBaseCalculation
           
private static int xmlSize
           
 
Constructor Summary
RDRCreateFile(Stats stats, java.lang.String destPath, java.lang.String filename, int rdrCount)
           
RDRCreateFile(java.lang.String destPath, java.lang.String filename, int rdrCount)
          Open the specified file, wipe out a file of the same name if it exists A user block space is created based on the rdrCount given.
 
Method Summary
 void close()
          Close the HDF file completely, including any open RDRs, AllData and DataProducts
 AllData getAllData()
          Return the AllData object which is created through this class
 DataProducts getDataProducts()
          Return the DataProducts object which is created through this class
 PDSDate getFirstDateTime()
          Get the first time of the first packet with a time stamp given to this class
 PDSDate getLastDataTime()
          Get the last time of the last packet with a time stamp given to this class
private  RDR getRDR(RDRName anRdrName)
          Get the RDR from the pool of created RDRs, or create a new one if its new
 java.util.List<RDR> getRDRs()
          Return a list of the RDRs created by this class
 void put(Packet p)
          Put a packet into this RDR file
 void writeAttributes(java.util.Date creationDateAndTime, Origin distributor, MissionName missionName, Origin datasetSource, PlatformShortName platformShortname)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hdfFile

private int hdfFile

propertyId

private int propertyId

xmlSize

private static final int xmlSize
See Also:
Constant Field Values

allData

private AllData allData

dataProducts

private DataProducts dataProducts

firstDateTime

private PDSDate firstDateTime

lastDateTime

private PDSDate lastDateTime

spacecraftDiaryRDR2

private SpacecraftDiaryRDR2 spacecraftDiaryRDR2

rdrs

private java.util.HashMap<RDRName,RDR> rdrs

timeBaseCalculation

public static boolean timeBaseCalculation

stats

private Stats stats
Constructor Detail

RDRCreateFile

public RDRCreateFile(java.lang.String destPath,
                     java.lang.String filename,
                     int rdrCount)
              throws RtStpsException
Open the specified file, wipe out a file of the same name if it exists A user block space is created based on the rdrCount given.

Parameters:
destPath - the path of interest
filename - the file name of interest
rdrCount - the number of RDRs that will go in this file, used to create the space for the user block
Throws:
RtStpsException - wraps any HDF exceptions

RDRCreateFile

public RDRCreateFile(Stats stats,
                     java.lang.String destPath,
                     java.lang.String filename,
                     int rdrCount)
              throws RtStpsException
Throws:
RtStpsException
Method Detail

getRDR

private RDR getRDR(RDRName anRdrName)
            throws RtStpsException
Get the RDR from the pool of created RDRs, or create a new one if its new

Parameters:
anRdrName - an RDR name as an RDRName
Returns:
an RDR
Throws:
RtStpsException - wraps an any HDF files

getAllData

public AllData getAllData()
Return the AllData object which is created through this class

Returns:
the AllData object

getDataProducts

public DataProducts getDataProducts()
Return the DataProducts object which is created through this class

Returns:
the DataProducts object

close

public void close()
           throws RtStpsException
Close the HDF file completely, including any open RDRs, AllData and DataProducts

Throws:
RtStpsException

getRDRs

public java.util.List<RDR> getRDRs()
Return a list of the RDRs created by this class

Returns:
a List of RDRs

getFirstDateTime

public PDSDate getFirstDateTime()
Get the first time of the first packet with a time stamp given to this class

Returns:
a PDSDate from that packet

getLastDataTime

public PDSDate getLastDataTime()
Get the last time of the last packet with a time stamp given to this class

Returns:
a PDSDate from that packet

put

public void put(Packet p)
         throws RtStpsException
Put a packet into this RDR file

Parameters:
p - a Packet
Throws:
RtStpsException - wraps any HDF exception

writeAttributes

public void writeAttributes(java.util.Date creationDateAndTime,
                            Origin distributor,
                            MissionName missionName,
                            Origin datasetSource,
                            PlatformShortName platformShortname)
                     throws RtStpsException
Throws:
RtStpsException