|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.output.hdf5.DataProductsReader
public class DataProductsReader
Supports the reading of RDR files /Data_Products group using an Iterator
.
The iterator returns a RDRProduct
for each specific RDR found in
the group. The HDF file is assumed to have been been opened outside
this class.
Field Summary | |
---|---|
private long |
counter
|
private int |
dataProductsGroup
|
private java.lang.String[] |
names
|
private long |
numObjects
|
private RDRName[] |
rdrNames
|
Constructor Summary | |
---|---|
DataProductsReader(int hdfFile)
Open the /Data_Products group of the HDF file specified in the input argument as a handle to an already open HDF file. |
|
DataProductsReader(int dataProductsHandle,
boolean useProductsHandle)
Alternate constructor uses a pre-existing "Data_Products" ID instead of the hdf file id, the fake 'useProductsHandle' is just here to differentiate the two constructors |
Method Summary | |
---|---|
void |
close()
Close the data products HDF group handle |
private void |
finish()
Common to both constructors |
int |
getCount()
Returns the number of items found the /Data_Products area. |
java.lang.String[] |
getNames()
Return the string array of the name of the items found in the /Data_Products area. |
RDRProduct |
getRDRDataProductByName(java.lang.String rdrProductName)
Given the string name of the RDR DataProduct, return its specific RDRProduct if it can be found. |
boolean |
hasNext()
Determine if there are more /Data_Product items to read |
RDRProduct |
next()
Get the next RDRProduct, item from the /Data_Product area. |
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int dataProductsGroup
private long numObjects
private long counter
private java.lang.String[] names
private RDRName[] rdrNames
Constructor Detail |
---|
public DataProductsReader(int hdfFile) throws RtStpsException
hdfFile
- a handle the already open HDF file
RtStpsException
- Wraps any HDF library exceptions in an RtStpsExceptionpublic DataProductsReader(int dataProductsHandle, boolean useProductsHandle) throws RtStpsException
dataProductsHandle
- already opened HDF handle to the "Data_Products" areauseProductsHandle
- value is ignored but differentiates constructors
RtStpsException
- Wraps any HDF library exceptions in an RtStpsExceptionMethod Detail |
---|
private void finish() throws RtStpsException
RtStpsException
- Wraps any HDF library exceptions in an RtStpsExceptionpublic RDRProduct getRDRDataProductByName(java.lang.String rdrProductName) throws RtStpsException
rdrProductName
- an RDR DataProduct name like SPACECRAFT-DIARY-RDR
RtStpsException
- wraps any HDF library exceptions in an RtStpsExceptionpublic void close() throws RtStpsException
RtStpsException
- wraps any HDF library exceptions in an RtStpsExceptionpublic int getCount()
int
count of itemspublic java.lang.String[] getNames()
String
array consisting of the names found in the /Data_Products area
throws
- an RtStpsRuntimeException
exception if it any HDF error occurspublic boolean hasNext()
hasNext
in interface java.util.Iterator<RDRProduct>
public RDRProduct next()
next
in interface java.util.Iterator<RDRProduct>
RDRProduct
throws
- an RtStpsRuntimeException
exception if it any HDF error occurspublic void remove()
remove
in interface java.util.Iterator<RDRProduct>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |