|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.data.hdf5.hdf5objects.HDF5Object visad.data.hdf5.hdf5objects.HDF5Dataset
public class HDF5Dataset
This class provides a mechanism to describe properties of datasets and to transfer data between memory and disk. A dataset is composed of a collection of raw data points and four classes of meta data to describe the data points.
The four classes of meta data are:
Constant Meta Data Meta data that is created when the dataset is created and exists unchanged for the life of the dataset. For instance, the data type of stored array elements is defined when the dataset is created and cannot be subsequently changed. Persistent Meta Data Meta data that is an integral and permanent part of a dataset but can change over time. For instance, the size in any dimension can increase over time if such an increase is allowed when the dataset was created. Memory Meta Data Meta data that exists to describe how raw data is organized in the application's memory space. For instance, the data type of elements in an application array might not be the same as the data type of those elements as stored in the HDF5 file. Transport Meta Data Meta data that is used only during the transfer of raw data from one location to another. For instance, the number of processes participating in a collective I/O request or hints to the library to control caching of raw data.For details of the HDF5 libraries, see the HDF5 Documentation at: http://hdf.ncsa.uiuc.edu/HDF5/doc/
Field Summary | |
---|---|
protected long[] |
count
the selected subset of the dataset |
protected Object |
data
the data array |
protected HDF5Dataspace |
dataspace
the dataspace |
protected HDF5Datatype |
datatype
the datatype |
protected long[] |
dims
the dimensions of the dataset |
protected long[] |
maxdims
the maximum dimensions of the dataset |
protected Vector |
member_names
a list of member names of compound data |
protected int |
rank
the rank of the dataset |
Fields inherited from class visad.data.hdf5.hdf5objects.HDF5Object |
---|
ATTRIBUTE, DATASET, DATASPACE, DATATYPE, description, GROUP, HDF5FILE, id, LINK, name, shortName, type, UNKNOWN |
Constructor Summary | |
---|---|
HDF5Dataset()
Constructs a HDF5Dataset |
|
HDF5Dataset(int loc_id,
String set_name)
Opens a HDF5Dataset |
|
HDF5Dataset(int loc_id,
String set_name,
int type_id,
int space_id,
int create_plist_id)
Creates a dataset at the specified location |
|
HDF5Dataset(String name)
Constructs a HDF5Dataset |
Method Summary | |
---|---|
static Object |
convertUnsignedData(Object data_in)
convert unsigned data because Java does not support unsigned integers. |
protected void |
finalize()
finalize() is called by the garbage collector on the object when garbage collection determines that there are no more references to the object. |
long[] |
getCount()
Returns the selected counts of the data |
Object |
getData()
Returns the data array |
HDF5Dataspace |
getDataspace()
Returns the dataspace |
HDF5Datatype |
getDatatype()
Returns the datatype |
long[] |
getDims()
Returns the dimensions of the dataset |
long[] |
getMaxdims()
Returns the maximum dimensions of the dataspace |
int |
getRank()
Returns the rank of the dataset |
void |
init()
initialize the HDF5Dataset: open HDF5 library. |
Object |
readData()
Read the entire dataset from file |
Object |
readData(int mspace,
int fspace)
Read the data with specified memory and file space |
String |
toString()
Converts this object to a String representation. |
void |
writeData(int mspace,
int fspace,
Object buf)
write the data with specified memory and file space |
void |
writeData(Object buf)
write the entire dataset from file |
Methods inherited from class visad.data.hdf5.hdf5objects.HDF5Object |
---|
getDescription, getID, getName, getShortName, getType, setID, setShortName, setType |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Object data
protected HDF5Datatype datatype
protected HDF5Dataspace dataspace
protected int rank
protected long[] dims
protected long[] maxdims
protected long[] count
protected Vector member_names
Constructor Detail |
---|
public HDF5Dataset()
public HDF5Dataset(String name)
public HDF5Dataset(int loc_id, String set_name, int type_id, int space_id, int create_plist_id)
loc_id
- Identifier of the file or group to create the dataset within.set_name
- The name of the dataset to create.type_id
- Identifier of the datatype to use when creating the dataset.space_id
- Identifier of the dataspace to use when creating the dataset.create_plist_id
- Identifier of the set creation property list.public HDF5Dataset(int loc_id, String set_name)
loc_id
- A file, group, or datatype identifier.set_name
- A datatset name.Method Detail |
---|
public void init() throws HDF5Exception
init
in class HDF5Object
HDF5Exception
public Object readData() throws HDF5Exception, NullPointerException
HDF5Exception
NullPointerException
public Object readData(int mspace, int fspace) throws HDF5Exception, NullPointerException
mspace
- the memory space idfspace
- the file space id
HDF5Exception
NullPointerException
public static Object convertUnsignedData(Object data_in) throws HDF5Exception
HDF5Exception
public void writeData(Object buf) throws HDF5Exception, NullPointerException
HDF5Exception
NullPointerException
public void writeData(int mspace, int fspace, Object buf) throws HDF5Exception, NullPointerException
HDF5Exception
NullPointerException
public Object getData()
public HDF5Datatype getDatatype()
public HDF5Dataspace getDataspace()
public int getRank()
public long[] getDims()
public long[] getMaxdims()
public long[] getCount()
public String toString()
toString
in class HDF5Object
protected void finalize() throws Throwable
finalize
in class Object
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |