SlideShare a Scribd company logo
HDF-Java Products
Peter Cao
The HDF Group
HDF and HDF-EOS Workshop XII
October 15, 2008

October 15-17, 2008

HDF and HDF-EOS Workshop XII

1
What are the HDF-Java products?

HDF-Java

HDF
Java
Wrapper
October 15-17, 2008

Object
Package
HDF and HDF-EOS Workshop XII

Viewer
Editor
2
Java Wrapper

HDF

October 15-17, 2008

HDF and HDF-EOS Workshop XII

3
Java Wrapper

Pure Java
Library

HDF

Java Native
Interface
a programming framework
that allows Java code to call
and be called by
applications and libraries
written in other languages

HDF
October 15-17, 2008

HDF and HDF-EOS Workshop XII

4
Pure Java Library
• Pros:
− True platform independence
− Direct access to file (no data
conversion between C and Java)
Pure Java
Library

• Cons:
HDF

October 15-17, 2008

− Substantial amount of work to
implement
− Hard to maintain (new features or
format changes)
HDF and HDF-EOS Workshop XII

5
HDF JNI

• Pros:
HDF

Java Native
Interface

HDF
October 15-17, 2008

− Easy to implement
− Easy to maintain

• Cons:
− Requires data conversion between C
and Java
− HDF JNI is platform dependent

HDF and HDF-EOS Workshop XII

6
Java Wrapper

Java Native
Interface

HDF

October 15-17, 2008

libjhdf.so
(or dll)

libjhdf5.so
(or dll)

HDF4
library

HDFLibrary.java
H5.java

HDF5
library

HDF and HDF-EOS Workshop XII

7
Java Wrapper: C versus Java
hid_t H5Fcreate (
const char *name,
unsigned flags,
hid_t create_id,
hid_t access_id );

public static native int H5Fcreate (
String name,
int flags,
int create_id,
int access_id);

hid_t H5Fopen (
const char *name,
unsigned flags,
hid_t access_id );

public static native int H5Fopen (
String name,
int flags,
int access_id);

herr_t H5Fclose (
hid_t file_id );

public static native int H5Fclose (
int file_id);

C
October 15-17, 2008

Java
HDF and HDF-EOS Workshop XII

8
Object Package

HDF-Java

HDF
Java
Wrapper
October 15-17, 2008

Object
Package
HDF and HDF-EOS Workshop XII

Viewer
Editor
9
Java Wrapper: simple dataset read
int fid, did, sid, tid, rank;
long dims[], maxDims[];
Object theData;
fid = H5.H5Fopen( fname, HDF5Constants.H5F_ACC_RDWR,
did = H5.H5Dopen(fid, dname);
sid = H5.H5Dget_space(did);
tid = H5.H5Dget_type(did);
rank = H5.H5Sget_simple_extent_ndims(sid);

HDF5Constants.H5P_DEFAULT );

dims = new long[rank];
maxDims = new long[rank];
H5.H5Sget_simple_extent_dims(sid, dims, maxDims);
theData = allocateArray(tid, dims);
H5.H5Dread( did, tid, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, theData);
H5.H5Sclose(sid);
H5.H5Tclose(tid);
H5.H5Dclose(did);
H5.H5Fclose(fid);

October 15-17, 2008

HDF and HDF-EOS Workshop XII

10
Object Package: the easy way

theData = Dataset.read();

October 15-17, 2008

HDF and HDF-EOS Workshop XII

11
Object Package: main purposes
• Simplifies access to HDF files
• Separates applications from libraries
− Modular design
− Client server model

• Makes testing and maintenance easy

October 15-17, 2008

HDF and HDF-EOS Workshop XII

12
Object Package: levels of objects

Abstract classes

Implementation

October 15-17, 2008

Common Objects
ncsa.hdf.object
jhdfobj.jar

HDF4
ncsa.hdf.object.h4
jhdf4obj.jar

HDF and HDF-EOS Workshop XII

HDF5
ncsa.hdf.object.h5
jhdf5obj.jar

13
Object Package: abstract classes
FileFormat

HObject

Dataset

Group

ScalarDS

October 15-17, 2008

HDF and HDF-EOS Workshop XII

CompoundDS

14
Object Package: HDF4 implementation
Group

H4Group

ScalarDS

H4SDS

H4GRImage

CompounDS

H4Vdata

H4File

FileFormat
October 15-17, 2008

HDF and HDF-EOS Workshop XII

15
Object Package: HDF5 implementation
Group

ScalarDS

H5Group

H5ScalarDS

CompounDS

H5CompoundDS

H5File

FileFormat
October 15-17, 2008

HDF and HDF-EOS Workshop XII

16
Object Package: file create
import ncsa.hdf.object.*;
public class H5FileCreate
{
private static String fname = "H5FileCreate.h5";
public static void main( String args[] ) throws Exception
{
FileFormat fileFormat = FileFormat.getFileFormat(FileFormat.FILE_TYPE_HDF5);

fileFormat.createFile(fname, FileFormat.FILE_CREATE);
}
}

October 15-17, 2008

HDF and HDF-EOS Workshop XII

17
HDFView

HDF-Java

HDF
Java
Wrapper
October 15-17, 2008

Object
Package
HDF and HDF-EOS Workshop XII

Viewer
Editor
18
HDFView: basic components

October 15-17, 2008

HDF and HDF-EOS Workshop XII

19
HDFView: GUI components

TreeView

HDFView
(GUI)

MetaDataView
UserImp

UserImp

TableView

ImageView

TextView

UserImp

UserImp

UserImp

October 15-17, 2008

HDF and HDF-EOS Workshop XII

20
HDFView: all together

October 15-17, 2008

HDF and HDF-EOS Workshop XII

21
What are the HDF-Java products?

HDF-Java

HDF
Java
Wrapper
October 15-17, 2008

Object
Package
HDF and HDF-EOS Workshop XII

Viewer
Editor
22
Thank You!
This report is based upon work supported in part by a Cooperative
Agreement with the National Aeronautics and Space Administration (NASA)
under NASA Awards NNX06AC83A and NNX08AO77A. Any opinions,
findings, and conclusions or recommendations expressed in this material are
those of the author(s) and do not necessarily reflect the views of the National
Aeronautics and Space Administration.

October 15-17, 2008

HDF and HDF-EOS Workshop XII

23
Questions/comments?

October 15-17, 2008

HDF and HDF-EOS Workshop XII

24

More Related Content

PPTX
HDF5 OPeNDAP project update and demo
PPT
What will be new in HDF5?
PPTX
Easy Remote Access Via OPeNDAP
PPTX
Tools to improve the usability of NASA HDF Data
PDF
How To Use Scala At Work - Airframe In Action at Arm Treasure Data
PPT
Integrating HDF5 with SRB
PDF
The Time is Now: Migrating from Oracle Warehouse Builder to Oracle Data Integ...
HDF5 OPeNDAP project update and demo
What will be new in HDF5?
Easy Remote Access Via OPeNDAP
Tools to improve the usability of NASA HDF Data
How To Use Scala At Work - Airframe In Action at Arm Treasure Data
Integrating HDF5 with SRB
The Time is Now: Migrating from Oracle Warehouse Builder to Oracle Data Integ...

What's hot (7)

PDF
Airframe Meetup #3: 2019 Updates & AirSpec
PDF
Reading The Source Code of Presto
PDF
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020
PDF
The Time is Now! Migrating from OWB to ODI 12c
PDF
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020
ODP
Multiconf - Python Configuration API
Airframe Meetup #3: 2019 Updates & AirSpec
Reading The Source Code of Presto
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020
The Time is Now! Migrating from OWB to ODI 12c
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020
Multiconf - Python Configuration API
Ad

Viewers also liked (20)

PPT
PPTX
Support for NPP/NPOESS by The HDF Group
PPT
The CFD General Notation System transition to HDF5
PPT
Profile of NPOESS HDF5 Files
PPT
Status of HDF-EOS, Related Software, and Tools
PPT
Proposal for adding Named Dimensions to HDF5 Arrays
PPT
Profile of HDF-EOS5 Files
PDF
HDF and HDF-EOS Experiences and Applications
PPT
Shifting the Burden from the User to the Data Provider
PPT
Migrating from HDF5 1.6 to 1.8
PDF
Workshop Discussion: HDF & HDF-EOS Future Direction
PPT
The MATLAB Low-Level HDF5 Interface
PPT
Reading HDF family of formats via NetCDF-Java / CDM
PPT
Using HDF5 Archive Information Package to preserve HDF-EOS2 data
PPT
ORNL DAAC MODIS Land Product Subsets
PPTX
Hdf5 current future
Support for NPP/NPOESS by The HDF Group
The CFD General Notation System transition to HDF5
Profile of NPOESS HDF5 Files
Status of HDF-EOS, Related Software, and Tools
Proposal for adding Named Dimensions to HDF5 Arrays
Profile of HDF-EOS5 Files
HDF and HDF-EOS Experiences and Applications
Shifting the Burden from the User to the Data Provider
Migrating from HDF5 1.6 to 1.8
Workshop Discussion: HDF & HDF-EOS Future Direction
The MATLAB Low-Level HDF5 Interface
Reading HDF family of formats via NetCDF-Java / CDM
Using HDF5 Archive Information Package to preserve HDF-EOS2 data
ORNL DAAC MODIS Land Product Subsets
Hdf5 current future
Ad

Similar to HDFView and HDF Java Products (20)

PPTX
HDF Project Status and Plans
PPTX
Introduction to HDF5 Data and Programming Models
PPTX
Easy Access of NASA HDF data via OPeNDAP
PPT
HDF OPeNDAP project update and demo
PPT
Moving applications to HDF5 1.8
PPT
HDFView With an HDF-EOS Plug-in
PPTX
HDF Tools Updates and Discussions
PPT
HDF5-OPeNDAP Project Update and Demo
PPTX
HDF Group Support for NPP/NPOESS/JPSS
PDF
HDF5 and Storage Resource Broker
PPTX
HDF5 and Ecosystem: What Is New?
PPTX
HDF4 Mapping Project Update
PPTX
Interoperability with netCDF-4 - Experience with NPP and HDF-EOS5 products
HDF Project Status and Plans
Introduction to HDF5 Data and Programming Models
Easy Access of NASA HDF data via OPeNDAP
HDF OPeNDAP project update and demo
Moving applications to HDF5 1.8
HDFView With an HDF-EOS Plug-in
HDF Tools Updates and Discussions
HDF5-OPeNDAP Project Update and Demo
HDF Group Support for NPP/NPOESS/JPSS
HDF5 and Storage Resource Broker
HDF5 and Ecosystem: What Is New?
HDF4 Mapping Project Update
Interoperability with netCDF-4 - Experience with NPP and HDF-EOS5 products

More from The HDF-EOS Tools and Information Center (20)

PDF
HDF5 2.0: Cloud Optimized from the Start
PDF
Using a Hierarchical Data Format v5 file as Zarr v3 Shard
PDF
Cloud-Optimized HDF5 Files - Current Status
PDF
Cloud Optimized HDF5 for the ICESat-2 mission
PPTX
Access HDF Data in the Cloud via OPeNDAP Web Service
PPTX
Upcoming New HDF5 Features: Multi-threading, sparse data storage, and encrypt...
PPTX
The State of HDF5 / Dana Robinson / The HDF Group
PDF
Cloud-Optimized HDF5 Files
PDF
Accessing HDF5 data in the cloud with HSDS
PPTX
Highly Scalable Data Service (HSDS) Performance Features
PDF
Creating Cloud-Optimized HDF5 Files
PPTX
HDF5 OPeNDAP Handler Updates, and Performance Discussion
PPTX
Hyrax: Serving Data from S3
PPSX
Accessing Cloud Data and Services Using EDL, Pydap, MATLAB
PDF
HDF - Current status and Future Directions
PPSX
HDFEOS.org User Analsys, Updates, and Future
PPTX
HDF - Current status and Future Directions
PDF
H5Coro: The Cloud-Optimized Read-Only Library
PPTX
MATLAB Modernization on HDF5 1.10
HDF5 2.0: Cloud Optimized from the Start
Using a Hierarchical Data Format v5 file as Zarr v3 Shard
Cloud-Optimized HDF5 Files - Current Status
Cloud Optimized HDF5 for the ICESat-2 mission
Access HDF Data in the Cloud via OPeNDAP Web Service
Upcoming New HDF5 Features: Multi-threading, sparse data storage, and encrypt...
The State of HDF5 / Dana Robinson / The HDF Group
Cloud-Optimized HDF5 Files
Accessing HDF5 data in the cloud with HSDS
Highly Scalable Data Service (HSDS) Performance Features
Creating Cloud-Optimized HDF5 Files
HDF5 OPeNDAP Handler Updates, and Performance Discussion
Hyrax: Serving Data from S3
Accessing Cloud Data and Services Using EDL, Pydap, MATLAB
HDF - Current status and Future Directions
HDFEOS.org User Analsys, Updates, and Future
HDF - Current status and Future Directions
H5Coro: The Cloud-Optimized Read-Only Library
MATLAB Modernization on HDF5 1.10

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
cuic standard and advanced reporting.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Spectroscopy.pptx food analysis technology
DOCX
The AUB Centre for AI in Media Proposal.docx
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
sap open course for s4hana steps from ECC to s4
Digital-Transformation-Roadmap-for-Companies.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Weekly Chronicles - August'25 Week I
Building Integrated photovoltaic BIPV_UPV.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectroscopy.pptx food analysis technology
The AUB Centre for AI in Media Proposal.docx

HDFView and HDF Java Products

  • 1. HDF-Java Products Peter Cao The HDF Group HDF and HDF-EOS Workshop XII October 15, 2008 October 15-17, 2008 HDF and HDF-EOS Workshop XII 1
  • 2. What are the HDF-Java products? HDF-Java HDF Java Wrapper October 15-17, 2008 Object Package HDF and HDF-EOS Workshop XII Viewer Editor 2
  • 3. Java Wrapper HDF October 15-17, 2008 HDF and HDF-EOS Workshop XII 3
  • 4. Java Wrapper Pure Java Library HDF Java Native Interface a programming framework that allows Java code to call and be called by applications and libraries written in other languages HDF October 15-17, 2008 HDF and HDF-EOS Workshop XII 4
  • 5. Pure Java Library • Pros: − True platform independence − Direct access to file (no data conversion between C and Java) Pure Java Library • Cons: HDF October 15-17, 2008 − Substantial amount of work to implement − Hard to maintain (new features or format changes) HDF and HDF-EOS Workshop XII 5
  • 6. HDF JNI • Pros: HDF Java Native Interface HDF October 15-17, 2008 − Easy to implement − Easy to maintain • Cons: − Requires data conversion between C and Java − HDF JNI is platform dependent HDF and HDF-EOS Workshop XII 6
  • 7. Java Wrapper Java Native Interface HDF October 15-17, 2008 libjhdf.so (or dll) libjhdf5.so (or dll) HDF4 library HDFLibrary.java H5.java HDF5 library HDF and HDF-EOS Workshop XII 7
  • 8. Java Wrapper: C versus Java hid_t H5Fcreate ( const char *name, unsigned flags, hid_t create_id, hid_t access_id ); public static native int H5Fcreate ( String name, int flags, int create_id, int access_id); hid_t H5Fopen ( const char *name, unsigned flags, hid_t access_id ); public static native int H5Fopen ( String name, int flags, int access_id); herr_t H5Fclose ( hid_t file_id ); public static native int H5Fclose ( int file_id); C October 15-17, 2008 Java HDF and HDF-EOS Workshop XII 8
  • 9. Object Package HDF-Java HDF Java Wrapper October 15-17, 2008 Object Package HDF and HDF-EOS Workshop XII Viewer Editor 9
  • 10. Java Wrapper: simple dataset read int fid, did, sid, tid, rank; long dims[], maxDims[]; Object theData; fid = H5.H5Fopen( fname, HDF5Constants.H5F_ACC_RDWR, did = H5.H5Dopen(fid, dname); sid = H5.H5Dget_space(did); tid = H5.H5Dget_type(did); rank = H5.H5Sget_simple_extent_ndims(sid); HDF5Constants.H5P_DEFAULT ); dims = new long[rank]; maxDims = new long[rank]; H5.H5Sget_simple_extent_dims(sid, dims, maxDims); theData = allocateArray(tid, dims); H5.H5Dread( did, tid, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, HDF5Constants.H5P_DEFAULT, theData); H5.H5Sclose(sid); H5.H5Tclose(tid); H5.H5Dclose(did); H5.H5Fclose(fid); October 15-17, 2008 HDF and HDF-EOS Workshop XII 10
  • 11. Object Package: the easy way theData = Dataset.read(); October 15-17, 2008 HDF and HDF-EOS Workshop XII 11
  • 12. Object Package: main purposes • Simplifies access to HDF files • Separates applications from libraries − Modular design − Client server model • Makes testing and maintenance easy October 15-17, 2008 HDF and HDF-EOS Workshop XII 12
  • 13. Object Package: levels of objects Abstract classes Implementation October 15-17, 2008 Common Objects ncsa.hdf.object jhdfobj.jar HDF4 ncsa.hdf.object.h4 jhdf4obj.jar HDF and HDF-EOS Workshop XII HDF5 ncsa.hdf.object.h5 jhdf5obj.jar 13
  • 14. Object Package: abstract classes FileFormat HObject Dataset Group ScalarDS October 15-17, 2008 HDF and HDF-EOS Workshop XII CompoundDS 14
  • 15. Object Package: HDF4 implementation Group H4Group ScalarDS H4SDS H4GRImage CompounDS H4Vdata H4File FileFormat October 15-17, 2008 HDF and HDF-EOS Workshop XII 15
  • 16. Object Package: HDF5 implementation Group ScalarDS H5Group H5ScalarDS CompounDS H5CompoundDS H5File FileFormat October 15-17, 2008 HDF and HDF-EOS Workshop XII 16
  • 17. Object Package: file create import ncsa.hdf.object.*; public class H5FileCreate { private static String fname = "H5FileCreate.h5"; public static void main( String args[] ) throws Exception { FileFormat fileFormat = FileFormat.getFileFormat(FileFormat.FILE_TYPE_HDF5); fileFormat.createFile(fname, FileFormat.FILE_CREATE); } } October 15-17, 2008 HDF and HDF-EOS Workshop XII 17
  • 19. HDFView: basic components October 15-17, 2008 HDF and HDF-EOS Workshop XII 19
  • 21. HDFView: all together October 15-17, 2008 HDF and HDF-EOS Workshop XII 21
  • 22. What are the HDF-Java products? HDF-Java HDF Java Wrapper October 15-17, 2008 Object Package HDF and HDF-EOS Workshop XII Viewer Editor 22
  • 23. Thank You! This report is based upon work supported in part by a Cooperative Agreement with the National Aeronautics and Space Administration (NASA) under NASA Awards NNX06AC83A and NNX08AO77A. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Aeronautics and Space Administration. October 15-17, 2008 HDF and HDF-EOS Workshop XII 23
  • 24. Questions/comments? October 15-17, 2008 HDF and HDF-EOS Workshop XII 24