Documentation of 'visad.data.hdf5.hdf5objects.HDF5Dataset' Java class
HDF5Dataset
visad.data.hdf5.hdf5objects

Class HDF5Dataset

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    HDF5Attribute, HDF5DatasetAdapted


    public class HDF5Dataset
    extends HDF5Object

    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/
    See Also:
    Serialized Form
    • Constructor Detail

      • HDF5Dataset

        public HDF5Dataset()
        Constructs a HDF5Dataset
      • HDF5Dataset

        public HDF5Dataset(java.lang.String name)
        Constructs a HDF5Dataset
      • HDF5Dataset

        public HDF5Dataset(int loc_id,
                           java.lang.String set_name,
                           int type_id,
                           int space_id,
                           int create_plist_id)
        Creates a dataset at the specified location
        Parameters:
        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.
      • HDF5Dataset

        public HDF5Dataset(int loc_id,
                           java.lang.String set_name)
        Opens a HDF5Dataset
        Parameters:
        loc_id - A file, group, or datatype identifier.
        set_name - A datatset name.
    • Method Detail

      • init

        public void init()
                  throws ncsa.hdf.hdf5lib.exceptions.HDF5Exception
        initialize the HDF5Dataset:
        1. open HDF5 library.
        2. Set up datatype and dataspace.
        3. Set up data ranks and dimensions.
        Overrides:
        init in class HDF5Object
        Throws:
        ncsa.hdf.hdf5lib.exceptions.HDF5Exception
      • readData

        public java.lang.Object readData()
                                  throws ncsa.hdf.hdf5lib.exceptions.HDF5Exception,
                                         java.lang.NullPointerException
        Read the entire dataset from file
        Returns:
        the data array
        Throws:
        ncsa.hdf.hdf5lib.exceptions.HDF5Exception
        java.lang.NullPointerException
      • readData

        public java.lang.Object readData(int mspace,
                                         int fspace)
                                  throws ncsa.hdf.hdf5lib.exceptions.HDF5Exception,
                                         java.lang.NullPointerException
        Read the data with specified memory and file space

        Parameters:
        mspace - the memory space id
        fspace - the file space id
        Returns:
        the data array
        Throws:
        ncsa.hdf.hdf5lib.exceptions.HDF5Exception
        java.lang.NullPointerException
      • convertUnsignedData

        public static java.lang.Object convertUnsignedData(java.lang.Object data_in)
                                                    throws ncsa.hdf.hdf5lib.exceptions.HDF5Exception
        convert unsigned data because Java does not support unsigned integers.
        Throws:
        ncsa.hdf.hdf5lib.exceptions.HDF5Exception
      • writeData

        public void writeData(java.lang.Object buf)
                       throws ncsa.hdf.hdf5lib.exceptions.HDF5Exception,
                              java.lang.NullPointerException
        write the entire dataset from file
        Throws:
        ncsa.hdf.hdf5lib.exceptions.HDF5Exception
        java.lang.NullPointerException
      • writeData

        public void writeData(int mspace,
                              int fspace,
                              java.lang.Object buf)
                       throws ncsa.hdf.hdf5lib.exceptions.HDF5Exception,
                              java.lang.NullPointerException
        write the data with specified memory and file space
        Throws:
        ncsa.hdf.hdf5lib.exceptions.HDF5Exception
        java.lang.NullPointerException
      • getData

        public java.lang.Object getData()
        Returns the data array
      • getDatatype

        public HDF5Datatype getDatatype()
        Returns the datatype
      • getDataspace

        public HDF5Dataspace getDataspace()
        Returns the dataspace
      • getRank

        public int getRank()
        Returns the rank of the dataset
      • getDims

        public long[] getDims()
        Returns the dimensions of the dataset
      • getMaxdims

        public long[] getMaxdims()
        Returns the maximum dimensions of the dataspace
      • getCount

        public long[] getCount()
        Returns the selected counts of the data
      • toString

        public java.lang.String toString()
        Converts this object to a String representation.
        Overrides:
        toString in class HDF5Object
        Returns:
        a string representation of this object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.