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

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

public class Granule
extends CommonDataSetObject

Create Granules in the RDR/HDF file. There is a one corresponding in this package to Granules and RawApplicationPackets. For example any XXX-SCIENCE_RDR_Gran_x should correspond to a RawApplicationsPacket_x in the RDR/HDF file


Field Summary
private  java.lang.String beginningDateStr
           
private  long beginningIET
           
private  PDSDate beginningObservationDateTime
           
private  java.lang.String beginningTimeStr
           
private  java.lang.String creationDateStr
           
private  java.util.Date creationDateTime
           
private  java.lang.String creationTimeStr
           
private  int dataSet
           
private  int dataSpace
           
private  int dataSpaceOfRaw
           
private  java.lang.String docName
           
private  java.lang.String endingDateStr
           
private  long endingIET
           
private  PDSDate endingObservationDateTime
           
private  java.lang.String endingTimeStr
           
private  GranuleId granuleId
           
private  java.lang.String granuleName
           
private  int granuleNumber
           
private  java.lang.String granuleStatusStr
           
private  java.lang.String granuleVersionStr
           
private  LEOAFlag leoaState
           
private  java.lang.String nl
           
private  long orbit
           
private  long[] packetTypeCounts
           
private  java.lang.String[] packetTypes
           
private  float percentMissingData
           
private  RDRName rdrReferenceName
           
private  ReferenceId referenceId
           
private  java.lang.String softwareVersionStr
           
 
Constructor Summary
Granule(int groupId, java.lang.String granuleName)
          Read the Granule out of the HDF file and fill in the various attributes and items in it for these access methods
Granule(PDSDate beginningObservationDateTime, PDSDate endingObservationDateTime, long orbit, GranuleId granuleId, LEOAFlag leoaState, java.lang.String docName, java.lang.String[] packetTypes, long[] packetTypeCounts, ReferenceId referenceId, int granuleNumber, int dataSpaceOfRaw, RDRName rdrReferenceName)
          Package private constructor for a Granule instance, the arguments are associated with the granule's attributes.
 
Method Summary
 void close()
           
 java.lang.String getBeginning_Date()
           
 java.lang.String getBeginning_Time()
           
 long getBeginningIET()
           
 PDSDate getBeginningObservationDateTime()
           
 java.util.Date getCreationDateTime()
           
 int getDataSpaceOfRaw()
           
 java.lang.String getDocName()
           
 java.lang.String getEnding_Date()
           
 java.lang.String getEnding_Time()
           
 long getEndingIET()
           
 PDSDate getEndingObservationDateTime()
           
 GranuleId getGranuleId()
           
 int getGranuleNumber()
           
 java.lang.String getgranuleStatusStr()
           
 java.lang.String getGranuleVersionStr()
           
 LEOAFlag getLeoaState()
           
 long getN_Beginning_Orbit_Number()
           
 long getN_Beginning_Time_IET()
           
 java.lang.String getN_Creation_Date()
           
 java.lang.String getN_Creation_Time()
           
 long getN_Ending_Time_IET()
           
 GranuleId getN_Granule_ID()
           
 java.lang.String getN_Granule_Status()
           
 java.lang.String getN_Granule_Version()
           
 LEOAFlag getN_LEOA_Flag()
           
 java.lang.String getN_NPOESS_Document_Ref()
           
 java.lang.String getN_Packet_Type_Count()
           
 java.lang.String getN_Packet_Type()
           
 float getN_Percent_Missing_Data()
           
 ReferenceId getN_Reference_ID()
           
 java.lang.String getN_Software_Version()
           
 java.lang.String getName()
           
 long getOrbit()
           
 long[] getPacketTypeCounts()
           
 java.lang.String[] getPacketTypes()
           
 float getPercentMissingData()
           
 RawApplicationPackets getReferencedRawApplicationPackets()
          Return the RDR_All RDRAllReader that the reference points to in the Aggregate
 ReferenceId getReferenceId()
           
 java.lang.String getSoftwareVersion()
           
static java.lang.String makeName(RDRName rdrName, int granuleNumber)
          Static builder to build Granule names that could be in the HDF
private  void readAttributes()
           
 java.lang.String toString()
           
 void write(int hdfFile, int rootGroup, int rdrGroup)
           
private  void writeAttributes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataSpace

private int dataSpace

dataSet

private int dataSet

beginningObservationDateTime

private PDSDate beginningObservationDateTime

endingObservationDateTime

private PDSDate endingObservationDateTime

orbit

private long orbit

beginningIET

private long beginningIET

endingIET

private long endingIET

creationDateTime

private java.util.Date creationDateTime

granuleId

private GranuleId granuleId

leoaState

private LEOAFlag leoaState

docName

private java.lang.String docName

packetTypes

private java.lang.String[] packetTypes

packetTypeCounts

private long[] packetTypeCounts

referenceId

private ReferenceId referenceId

granuleNumber

private int granuleNumber

dataSpaceOfRaw

private int dataSpaceOfRaw

rdrReferenceName

private RDRName rdrReferenceName

percentMissingData

private float percentMissingData

granuleVersionStr

private java.lang.String granuleVersionStr

granuleStatusStr

private java.lang.String granuleStatusStr

softwareVersionStr

private java.lang.String softwareVersionStr

granuleName

private java.lang.String granuleName

beginningDateStr

private java.lang.String beginningDateStr

beginningTimeStr

private java.lang.String beginningTimeStr

endingDateStr

private java.lang.String endingDateStr

endingTimeStr

private java.lang.String endingTimeStr

creationDateStr

private java.lang.String creationDateStr

creationTimeStr

private java.lang.String creationTimeStr

nl

private java.lang.String nl
Constructor Detail

Granule

Granule(PDSDate beginningObservationDateTime,
        PDSDate endingObservationDateTime,
        long orbit,
        GranuleId granuleId,
        LEOAFlag leoaState,
        java.lang.String docName,
        java.lang.String[] packetTypes,
        long[] packetTypeCounts,
        ReferenceId referenceId,
        int granuleNumber,
        int dataSpaceOfRaw,
        RDRName rdrReferenceName)
Package private constructor for a Granule instance, the arguments are associated with the granule's attributes. An instance of this class in this packet is created by some other factory method.

Parameters:
beginningObservationDateTime - the beginning date and time of the corresponding RawApplicationPackets area
endingObservationDateTime - the ending date and time of the corresponding RawApplicationPackets area
orbit - the orbit number of the pass
granuleId - the granuleId GranuleId
leoaState - the LEO state flag
docName - the document name of the specification controlling this granules construction
packetTypes - an array of packet types received in this granule
packetTypeCounts - the counts per type of the packets received
referenceId - the reference identifier which is a UUID UUID
granuleNumber - the granule number which corresponds to the RawApplicationPackets number in the RDR/HDF file
dataSpaceOfRaw - the HDF DataSpace handle of the RawApplicationPackets area associated with this granule
rdrReferenceName - the corresponds RDR name such VIIRS-SCIENCE-RDR

Granule

public Granule(int groupId,
               java.lang.String granuleName)
        throws RtStpsException
Read the Granule out of the HDF file and fill in the various attributes and items in it for these access methods

Parameters:
groupId - the HDF group handle
granuleName - the name of the granule
Throws:
java.text.ParseException
RtStpsException
Method Detail

makeName

public static java.lang.String makeName(RDRName rdrName,
                                        int granuleNumber)
Static builder to build Granule names that could be in the HDF

Parameters:
rdrName - the RDR of interest (CrIS-SCIENCE-RDR)
granuleNumber - the granule number
Returns:
a String that would look something like CrIS-SCIENCE-RDR_Gran_#

getName

public java.lang.String getName()

getBeginningObservationDateTime

public PDSDate getBeginningObservationDateTime()

getEndingObservationDateTime

public PDSDate getEndingObservationDateTime()

getOrbit

public long getOrbit()

getBeginningIET

public long getBeginningIET()

getCreationDateTime

public java.util.Date getCreationDateTime()

getEndingIET

public long getEndingIET()

getGranuleId

public GranuleId getGranuleId()

getLeoaState

public LEOAFlag getLeoaState()

getDocName

public java.lang.String getDocName()

getPacketTypes

public java.lang.String[] getPacketTypes()

getPacketTypeCounts

public long[] getPacketTypeCounts()

getReferenceId

public ReferenceId getReferenceId()

getGranuleNumber

public int getGranuleNumber()

getDataSpaceOfRaw

public int getDataSpaceOfRaw()

getPercentMissingData

public float getPercentMissingData()

getGranuleVersionStr

public java.lang.String getGranuleVersionStr()

getgranuleStatusStr

public java.lang.String getgranuleStatusStr()

getSoftwareVersion

public java.lang.String getSoftwareVersion()

getBeginning_Date

public java.lang.String getBeginning_Date()

getBeginning_Time

public java.lang.String getBeginning_Time()

getEnding_Date

public java.lang.String getEnding_Date()

getEnding_Time

public java.lang.String getEnding_Time()

getN_Beginning_Orbit_Number

public long getN_Beginning_Orbit_Number()

getN_Beginning_Time_IET

public long getN_Beginning_Time_IET()

getN_Creation_Date

public java.lang.String getN_Creation_Date()

getN_Creation_Time

public java.lang.String getN_Creation_Time()

getN_Ending_Time_IET

public long getN_Ending_Time_IET()

getN_Granule_ID

public GranuleId getN_Granule_ID()

getN_Granule_Status

public java.lang.String getN_Granule_Status()

getN_Granule_Version

public java.lang.String getN_Granule_Version()

getN_LEOA_Flag

public LEOAFlag getN_LEOA_Flag()

getN_NPOESS_Document_Ref

public java.lang.String getN_NPOESS_Document_Ref()

getN_Packet_Type

public java.lang.String getN_Packet_Type()

getN_Packet_Type_Count

public java.lang.String getN_Packet_Type_Count()

getN_Percent_Missing_Data

public float getN_Percent_Missing_Data()

getN_Reference_ID

public ReferenceId getN_Reference_ID()

getN_Software_Version

public java.lang.String getN_Software_Version()

write

public void write(int hdfFile,
                  int rootGroup,
                  int rdrGroup)
           throws RtStpsException
Throws:
RtStpsException

getReferencedRawApplicationPackets

public RawApplicationPackets getReferencedRawApplicationPackets()
                                                         throws RtStpsException
Return the RDR_All RDRAllReader that the reference points to in the Aggregate

Returns:
an RDRAlLReader for the RDR_All
Throws:
RtStpsException

readAttributes

private void readAttributes()
                     throws RtStpsException
Throws:
RtStpsException

writeAttributes

private void writeAttributes()
                      throws RtStpsException
Throws:
RtStpsException

close

public void close()
           throws RtStpsException
Specified by:
close in class CommonDataSetObject
Throws:
RtStpsException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object