hdf images hdf images

This web site is no longer maintained (but will remain online).
Please see The HDF Group's new Support Portal for the latest information.

HDF Object Package

The design and class hierarchy of the HDF Object Package are described in this document.


Overview

The HDF Object Package is a Java package that provides an object-oriented interface to HDF data objects. The package offers a common API to access both HDF4 and HDF5 files.

The HDF Object Package does not provide a one-to-one mapping from Java methods to routines in the standard HDF4 and HDF5 libraries. The one-to-one mappings are provided via the HDF Java Native Interface products Java HDF Interface (JHI) and Java HDF5 Interface (JHI5). The HDF Object Package wraps these direct mappings with a higher level object model.

The HDF Object Package, hdf.object, provides classes that reflect the fundamental objects of the two HDF formats. Fundamental objects from HDF4 (group, multi-dimensional array, raster image, vdata, and annotation) and HDF5 (group and dataset) are presented as Java classes in the HDF Object Package.

There are three major advantages offered by the HDF Object Package:


The Object Package

The following diagram explains the structure of the HDF object package and how to use it. Package hdf.object contains the common object/interface. This package only defines interfaces or abstract classes for accessing HDF files. The implementation will rely on the HDF4/HDF5 object package. Application classes should only include hdf.object.

The hdf.object.h4 is an implementation of the HDF4 objects. It implements the interfaces and abstract classes defined in the hdf.object package. The HDF4 object package requires the HDF4 Java Native Interface (hdf.hdflib). Applications should not include this package so that it compiles and runs without the HDF4 library.

The hdf.object.h5 is an implementation of the HDF5 objects. It implements the interfaces and abstract classes defined in the hdf.object package. The HDF5 object package requires the HDF5 Java Native Interface (hdf.hdf5lib). Applications should not include this package so that it compiles and runs without the HDF5 library.


Figure 1. The Object Package.


The class hierarchy

The HDF Object Package implements an abstract data model, and the objects of the HDF4 and HDF5 data models are represented as instances of the abstract objects. The abstract class HObject has two fundamental abstract classes are Group and Dataset, and all HDF5 and HDF4 objects are a sub-type of one of these abstract classes.

Figure 1 shows the class hierarchy of the HDF Object Package.

The classes are explained in the Java class documents.


Figure 2. The Class Hierarchy of HDF Objects.


Limitations

The current version of the HDF Object Package has the following limitations:

To Obtain

The HDF Object Package is freely available, as a full source release. Compiled jar files are available, and compiled native libraries are available for selected platforms.

Prerequisites: The HDF Object Package requires the Java HDF Interface (JHI) and the Java HDF5 Interface (JHI5). These are included in the distribution.

The source and pre-built binaries for the HDF Object Package can be downloaded from the HDF Java Products page.

Building the HDF Java Products from the source distribution is an easy endeavor. There are CMake specialized compressed sources for all the required libraries. Refer to the following instructions for more details:


- - Last modified: 25 July 2016