Package hdf.object

Class HObject

Object
hdf.object.HObject
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Dataset, Datatype, Group, H5Link, H5MetaDataContainer

public abstract class HObject extends Object implements Serializable
The HObject class is the root class of all the HDF data objects. Every data class has HObject as a superclass. All objects implement the methods of this class. The following is the inherited structure of HDF Objects.
                                 HObject
          __________________________|________________________________
          |                         |                               |
        Group                    Dataset                        Datatype
          |                _________|___________                    |
          |                |                   |                    |
          |             ScalarDS          CompoundDS                |
          |                |                   |                    |
    ---------------------Implementing classes such as-------------------------
      ____|____       _____|______        _____|_____          _____|_____
      |       |       |          |        |         |          |         |
   H5Group H4Group H5ScalarDS H4ScalarDS H5CompDS H4CompDS H5Datatype H4Datatype

 
All HDF4 and HDF5 data objects are inherited from HObject. At the top level of the hierarchy, both HDF4 and HDF5 have the same super-classes, such as Group and Dataset. At the bottom level of the hierarchy, HDF4 and HDF5 objects have their own implementation, such as H5Group, H5ScalarDS, H5CompoundDS, and H5Datatype. Warning: HDF4 and HDF5 may have multiple links to the same object. Data objects in this model do not deal with multiple links. Users may create duplicate copies of the same data object with different paths. Applications should check the OID of the data object to avoid duplicate copies of the same object. HDF4 objects are uniquely identified by the OID (tag_id, ref_id) pair. The ref_id is the object reference count. The tag_id is a pre-defined number to identify the type of object. For example, DFTAG_RI is for raster image, DFTAG_SD is for scientific dataset, and DFTAG_VG is for Vgroup. HDF5 objects are uniquely identified by the OID containing just the object reference. The OID is usually obtained by H5Rcreate_object(). The following example shows how to retrieve an object ID from a file:
                // retrieve the object ID
                byte[] refBuf = null;
                try {
                    refBuf = H5.H5Rcreate_object(theFile.getFID(), this.getFullName(),
 HDF5Constants.H5P_DEFAULT); this.oid = HDFNativeData.byteToLong(refBuf); log.trace("constructor REF {} to
 OID {}", refBuf, this.oid);
                }
                catch (Exception ex) {
                    log.debug("constructor ID {} for {} failed H5Rcreate_object", theFile.getFID(),
 this.getFullName());
                }
                finally {
                    if (refBuf)
                        H5.H5Rdestroy(refBuf);
                }
 
Version:
2.0 4/2/2018
Author:
Peter X. Cao, Jordan T. Henderson
See Also: