summaryrefslogtreecommitdiffstats
path: root/java/src/hdf/hdf5lib
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/hdf/hdf5lib')
-rw-r--r--java/src/hdf/hdf5lib/CMakeLists.txt6
-rw-r--r--java/src/hdf/hdf5lib/H5.java606
-rw-r--r--java/src/hdf/hdf5lib/HDF5Constants.java43
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java (renamed from java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java)5
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java9
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java (renamed from java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java)5
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java9
-rw-r--r--java/src/hdf/hdf5lib/structs/H5L_info_t.java35
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java36
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_info_t.java38
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_native_info_t.java52
-rw-r--r--java/src/hdf/hdf5lib/structs/H5O_token_t.java45
-rw-r--r--java/src/hdf/hdf5lib/structs/H5_ih_info_t.java18
13 files changed, 806 insertions, 101 deletions
diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt
index be8f60a..b0293fb 100644
--- a/java/src/hdf/hdf5lib/CMakeLists.txt
+++ b/java/src/hdf/hdf5lib/CMakeLists.txt
@@ -18,10 +18,10 @@ set (HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES
callbacks/H5D_iterate_t.java
callbacks/H5E_walk_cb.java
callbacks/H5E_walk_t.java
- callbacks/H5L_iterate_cb.java
callbacks/H5L_iterate_t.java
- callbacks/H5O_iterate_cb.java
+ callbacks/H5L_iterate_opdata_t.java
callbacks/H5O_iterate_t.java
+ callbacks/H5O_iterate_opdata_t.java
callbacks/H5P_cls_close_func_cb.java
callbacks/H5P_cls_close_func_t.java
callbacks/H5P_cls_copy_func_cb.java
@@ -79,6 +79,8 @@ set (HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES
structs/H5L_info_t.java
structs/H5O_hdr_info_t.java
structs/H5O_info_t.java
+ structs/H5O_native_info_t.java
+ structs/H5O_token_t.java
)
set (HDF5_JAVA_HDF_HDF5_SOURCES
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index adb50f1..872fbc7 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -24,10 +24,10 @@ import hdf.hdf5lib.callbacks.H5D_iterate_cb;
import hdf.hdf5lib.callbacks.H5D_iterate_t;
import hdf.hdf5lib.callbacks.H5E_walk_cb;
import hdf.hdf5lib.callbacks.H5E_walk_t;
-import hdf.hdf5lib.callbacks.H5L_iterate_cb;
import hdf.hdf5lib.callbacks.H5L_iterate_t;
-import hdf.hdf5lib.callbacks.H5O_iterate_cb;
+import hdf.hdf5lib.callbacks.H5L_iterate_opdata_t;
import hdf.hdf5lib.callbacks.H5O_iterate_t;
+import hdf.hdf5lib.callbacks.H5O_iterate_opdata_t;
import hdf.hdf5lib.callbacks.H5P_cls_close_func_cb;
import hdf.hdf5lib.callbacks.H5P_cls_close_func_t;
import hdf.hdf5lib.callbacks.H5P_cls_copy_func_cb;
@@ -55,6 +55,8 @@ import hdf.hdf5lib.structs.H5FD_ros3_fapl_t;
import hdf.hdf5lib.structs.H5G_info_t;
import hdf.hdf5lib.structs.H5L_info_t;
import hdf.hdf5lib.structs.H5O_info_t;
+import hdf.hdf5lib.structs.H5O_native_info_t;
+import hdf.hdf5lib.structs.H5O_token_t;
/**
* This class is the Java interface for the HDF5 library.
@@ -1107,7 +1109,9 @@ public class H5 implements java.io.Serializable {
log.trace("H5Aread_dname_D");
status = H5Aread_double(attr_id, mem_type_id, (double[]) obj, isCriticalPinning);
}
- else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) && (is1D && (dataClass.getComponentType() == String.class))) || H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
+ else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) &&
+ (is1D && (dataClass.getComponentType() == String.class))) ||
+ H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Aread_reg_ref");
status = H5Aread_reg_ref(attr_id, mem_type_id, (String[]) obj);
}
@@ -2005,7 +2009,9 @@ public class H5 implements java.io.Serializable {
status = H5Dread_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
(double[]) obj, isCriticalPinning);
}
- else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) && (is1D && (dataClass.getComponentType() == String.class))) || H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
+ else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) &&
+ (is1D && (dataClass.getComponentType() == String.class))) ||
+ H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Dread_reg_ref");
status = H5Dread_reg_ref(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
(String[]) obj);
@@ -2155,7 +2161,10 @@ public class H5 implements java.io.Serializable {
* - Error from the HDF-5 Library.
* @exception NullPointerException
* - buf is null.
+ *
+ * @deprecated As of HDF5 1.12.0 in favor of H5Treclaim
**/
+ @Deprecated
public synchronized static native int H5Dvlen_reclaim(long type_id, long space_id, long xfer_plist_id, byte[] buf)
throws HDF5LibraryException, NullPointerException;
@@ -3093,6 +3102,7 @@ public class H5 implements java.io.Serializable {
*
* @deprecated As of HDF5 1.10.5 in favor of H5Fis_accessible.
**/
+ @Deprecated
public synchronized static native boolean H5Fis_hdf5(String name) throws HDF5LibraryException, NullPointerException;
/**
@@ -3569,8 +3579,8 @@ public class H5 implements java.io.Serializable {
* OUT: Names of all objects under the group, name.
* @param objTypes
* OUT: Types of all objects under the group, name.
- * @param objRef
- * OUT: Reference number of all objects under the group, name.
+ * @param tokens
+ * OUT: Object token of all objects under the group, name.
*
* @return the number of items found
*
@@ -3580,26 +3590,26 @@ public class H5 implements java.io.Serializable {
* - name is null.
*/
public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] objNames, int[] objTypes,
- long[] objRef) throws HDF5LibraryException, NullPointerException {
+ H5O_token_t[] tokens) throws HDF5LibraryException, NullPointerException {
if (objNames == null) {
throw new NullPointerException("H5Gget_obj_info_all(): name array is null");
}
- return H5Gget_obj_info_all(loc_id, name, objNames, objTypes, null, null, objRef, HDF5Constants.H5_INDEX_NAME);
+ return H5Gget_obj_info_all(loc_id, name, objNames, objTypes, null, null, tokens, HDF5Constants.H5_INDEX_NAME);
}
public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] oname, int[] otype,
- int[] ltype, long[] ref, int indx_type) throws HDF5LibraryException, NullPointerException {
- return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, null, ref, indx_type, -1);
+ int[] ltype, H5O_token_t[] tokens, int indx_type) throws HDF5LibraryException, NullPointerException {
+ return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, null, tokens, indx_type, -1);
}
public synchronized static int H5Gget_obj_info_all(long loc_id, String name, String[] oname, int[] otype,
- int[] ltype, long[] fno, long[] ref, int indx_type) throws HDF5LibraryException, NullPointerException {
- return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, ref, oname.length, indx_type, -1);
+ int[] ltype, long[] fno, H5O_token_t[] tokens, int indx_type) throws HDF5LibraryException, NullPointerException {
+ return H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, tokens, oname.length, indx_type, -1);
}
public synchronized static int H5Gget_obj_info_full(long loc_id, String name, String[] oname, int[] otype,
- int[] ltype, long[] fno, long[] ref, int indx_type, int indx_order) throws HDF5LibraryException,
+ int[] ltype, long[] fno, H5O_token_t[] tokens, int indx_type, int indx_order) throws HDF5LibraryException,
NullPointerException {
if (oname == null) {
throw new NullPointerException("H5Gget_obj_info_full(): name array is null");
@@ -3621,7 +3631,7 @@ public class H5 implements java.io.Serializable {
ltype = new int[otype.length];
if (fno == null)
- fno = new long[ref.length];
+ fno = new long[tokens.length];
if (indx_type < 0)
indx_type = HDF5Constants.H5_INDEX_NAME;
@@ -3630,7 +3640,7 @@ public class H5 implements java.io.Serializable {
indx_order = HDF5Constants.H5_ITER_INC;
log.trace("H5Gget_obj_info_full: oname_len={}", oname.length);
- int status = H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, ref, oname.length, indx_type,
+ int status = H5Gget_obj_info_full(loc_id, name, oname, otype, ltype, fno, tokens, oname.length, indx_type,
indx_order);
for (int indx = 0; indx < oname.length; indx++)
log.trace("H5Gget_obj_info_full: oname={}", oname[indx]);
@@ -3638,7 +3648,7 @@ public class H5 implements java.io.Serializable {
}
private synchronized static native int H5Gget_obj_info_full(long loc_id, String name, String[] oname, int[] otype,
- int[] ltype, long[] fno, long[] ref, int n, int indx_type, int indx_order) throws HDF5LibraryException,
+ int[] ltype, long[] fno, H5O_token_t[] tokens, int n, int indx_type, int indx_order) throws HDF5LibraryException,
NullPointerException;
/**
@@ -3693,8 +3703,8 @@ public class H5 implements java.io.Serializable {
* OUT: Types of all objects under the group, name.
* @param lnkTypes
* OUT: Types of all links under the group, name.
- * @param objRef
- * OUT: Reference number of all objects under the group, name.
+ * @param objToken
+ * OUT: Object token of all objects under the group, name.
* @param objMax
* IN: Maximum number of all objects under the group, name.
*
@@ -3706,7 +3716,7 @@ public class H5 implements java.io.Serializable {
* - name is null.
*/
public synchronized static int H5Gget_obj_info_max(long loc_id, String[] objNames, int[] objTypes, int[] lnkTypes,
- long[] objRef, long objMax) throws HDF5LibraryException, NullPointerException {
+ H5O_token_t[] objToken, long objMax) throws HDF5LibraryException, NullPointerException {
if (objNames == null) {
throw new NullPointerException("H5Gget_obj_info_max(): name array is null");
}
@@ -3731,11 +3741,11 @@ public class H5 implements java.io.Serializable {
throw new HDF5LibraryException("H5Gget_obj_info_max(): name and type array sizes are different");
}
- return H5Gget_obj_info_max(loc_id, objNames, objTypes, lnkTypes, objRef, objMax, objNames.length);
+ return H5Gget_obj_info_max(loc_id, objNames, objTypes, lnkTypes, objToken, objMax, objNames.length);
}
private synchronized static native int H5Gget_obj_info_max(long loc_id, String[] oname, int[] otype, int[] ltype,
- long[] ref, long amax, int n) throws HDF5LibraryException, NullPointerException;
+ H5O_token_t[] tokens, long amax, int n) throws HDF5LibraryException, NullPointerException;
/**
* H5Gn_members report the number of objects in a Group. The 'objects' include everything that will be visited by
@@ -4332,8 +4342,8 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native int H5Literate(long grp_id, int idx_type, int order, long idx, H5L_iterate_cb op,
- H5L_iterate_t op_data) throws HDF5LibraryException;
+ public synchronized static native int H5Literate(long grp_id, int idx_type, int order, long idx, H5L_iterate_t op,
+ H5L_iterate_opdata_t op_data) throws HDF5LibraryException;
/**
* H5Literate_by_name iterates through links in a group.
@@ -4364,7 +4374,7 @@ public class H5 implements java.io.Serializable {
* - group_name is null.
**/
public synchronized static native int H5Literate_by_name(long grp_id, String group_name, int idx_type, int order,
- long idx, H5L_iterate_cb op, H5L_iterate_t op_data, long lapl_id) throws HDF5LibraryException,
+ long idx, H5L_iterate_t op, H5L_iterate_opdata_t op_data, long lapl_id) throws HDF5LibraryException,
NullPointerException;
/**
@@ -4411,8 +4421,8 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
- public synchronized static native int H5Lvisit(long grp_id, int idx_type, int order, H5L_iterate_cb op,
- H5L_iterate_t op_data) throws HDF5LibraryException;
+ public synchronized static native int H5Lvisit(long grp_id, int idx_type, int order, H5L_iterate_t op,
+ H5L_iterate_opdata_t op_data) throws HDF5LibraryException;
/**
* H5Lvisit_by_name recursively visits all links starting from a specified group.
@@ -4441,7 +4451,7 @@ public class H5 implements java.io.Serializable {
* - group_name is null.
**/
public synchronized static native int H5Lvisit_by_name(long loc_id, String group_name, int idx_type, int order,
- H5L_iterate_cb op, H5L_iterate_t op_data, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ H5L_iterate_t op, H5L_iterate_opdata_t op_data, long lapl_id) throws HDF5LibraryException, NullPointerException;
/**
@@ -4658,6 +4668,52 @@ public class H5 implements java.io.Serializable {
NullPointerException;
/**
+ * H5Oget_info_by_name retrieves the metadata for an object, identifying the object by location and relative name.
+ *
+ * @param loc_id
+ * IN: File or group identifier specifying location of group in which object is located
+ * @param name
+ * IN: Relative name of group
+ * @param lapl_id
+ * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
+ * H5P_DEFAULT.)
+ *
+ * @return object information
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - name is null.
+ **/
+ public static H5O_info_t H5Oget_info_by_name(long loc_id, String name, long lapl_id)
+ throws HDF5LibraryException, NullPointerException {
+ return H5Oget_info_by_name(loc_id, name, HDF5Constants.H5O_INFO_ALL, lapl_id);
+ }
+
+ /**
+ * H5Oget_info_by_name retrieves the metadata for an object, identifying the object by location and relative name.
+ *
+ * @param loc_id
+ * IN: File or group identifier specifying location of group in which object is located
+ * @param name
+ * IN: Relative name of group
+ * @param fields
+ * IN: Object fields to select
+ * @param lapl_id
+ * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
+ * H5P_DEFAULT.)
+ *
+ * @return object information
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - name is null.
+ **/
+ public synchronized static native H5O_info_t H5Oget_info_by_name(long loc_id, String name, int fields, long lapl_id)
+ throws HDF5LibraryException, NullPointerException;
+
+ /**
* H5Oget_info_by_idx retrieves the metadata for an object, identifying the object by an index position.
*
* @param loc_id
@@ -4716,7 +4772,47 @@ public class H5 implements java.io.Serializable {
int order, long n, int fields, long lapl_id) throws HDF5LibraryException, NullPointerException;
/**
- * H5Oget_info_by_name retrieves the metadata for an object, identifying the object by location and relative name.
+ * H5Oget_native_info retrieves the native HDF5-specific metadata for an HDF5 object specified by an identifier.
+ * Native HDF5-specific metadata includes things like object header information and object storage layout information.
+ *
+ * @param loc_id
+ * IN: Identifier for target object
+ *
+ * @return object information
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - name is null.
+ **/
+ public static H5O_native_info_t H5Oget_native_info(long loc_id) throws HDF5LibraryException,
+ NullPointerException {
+ return H5Oget_native_info(loc_id, HDF5Constants.H5O_NATIVE_INFO_ALL);
+ }
+
+ /**
+ * H5Oget_native_info retrieves the native HDF5-specific metadata for an HDF5 object specified by an identifier.
+ * Native HDF5-specific metadata includes things like object header information and object storage layout information.
+ *
+ * @param loc_id
+ * IN: Identifier for target object
+ * @param fields
+ * IN: Object fields to select
+ *
+ * @return object information
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - name is null.
+ **/
+ public synchronized static native H5O_native_info_t H5Oget_native_info(long loc_id, int fields) throws HDF5LibraryException,
+ NullPointerException;
+
+ /**
+ * H5Oget_native_info_by_name retrieves the native HDF5-specific metadata for an HDF5 object, identifying the object
+ * by location and relative name. Native HDF5-specific metadata includes things like object header information and
+ * object storage layout information.
*
* @param loc_id
* IN: File or group identifier specifying location of group in which object is located
@@ -4733,13 +4829,15 @@ public class H5 implements java.io.Serializable {
* @exception NullPointerException
* - name is null.
**/
- public static H5O_info_t H5Oget_info_by_name(long loc_id, String name, long lapl_id)
+ public static H5O_native_info_t H5Oget_native_info_by_name(long loc_id, String name, long lapl_id)
throws HDF5LibraryException, NullPointerException {
- return H5Oget_info_by_name(loc_id, name, HDF5Constants.H5O_INFO_ALL, lapl_id);
+ return H5Oget_native_info_by_name(loc_id, name, HDF5Constants.H5O_NATIVE_INFO_ALL, lapl_id);
}
/**
- * H5Oget_info_by_name retrieves the metadata for an object, identifying the object by location and relative name.
+ * H5Oget_native_info_by_name retrieves the native HDF5-specific metadata for an HDF5 object, identifying the object
+ * by location and relative name. Native HDF5-specific metadata includes things like object header information and
+ * object storage layout information.
*
* @param loc_id
* IN: File or group identifier specifying location of group in which object is located
@@ -4758,10 +4856,72 @@ public class H5 implements java.io.Serializable {
* @exception NullPointerException
* - name is null.
**/
- public synchronized static native H5O_info_t H5Oget_info_by_name(long loc_id, String name, int fields, long lapl_id)
+ public synchronized static native H5O_native_info_t H5Oget_native_info_by_name(long loc_id, String name, int fields, long lapl_id)
throws HDF5LibraryException, NullPointerException;
/**
+ * H5Oget_native_info_by_idx retrieves the native HDF5-specific metadata for an HDF5 object, identifying the object
+ * by an index position. Native HDF5-specific metadata includes things like object header information and
+ * object storage layout information.
+ *
+ * @param loc_id
+ * IN: File or group identifier
+ * @param group_name
+ * IN: Name of group, relative to loc_id, in which object is located
+ * @param idx_type
+ * IN: Type of index by which objects are ordered
+ * @param order
+ * IN: Order of iteration within index
+ * @param n
+ * IN: Object to open
+ * @param lapl_id
+ * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
+ * H5P_DEFAULT.)
+ *
+ * @return object information
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - name is null.
+ **/
+ public static H5O_native_info_t H5Oget_native_info_by_idx(long loc_id, String group_name, int idx_type,
+ int order, long n, long lapl_id) throws HDF5LibraryException, NullPointerException {
+ return H5Oget_native_info_by_idx(loc_id, group_name, idx_type, order, n, HDF5Constants.H5O_NATIVE_INFO_ALL, lapl_id);
+ }
+
+ /**
+ * H5Oget_native_info_by_idx retrieves the native HDF5-specific metadata for an HDF5 object, identifying the object
+ * by an index position. Native HDF5-specific metadata includes things like object header information and
+ * object storage layout information.
+ *
+ * @param loc_id
+ * IN: File or group identifier
+ * @param group_name
+ * IN: Name of group, relative to loc_id, in which object is located
+ * @param idx_type
+ * IN: Type of index by which objects are ordered
+ * @param order
+ * IN: Order of iteration within index
+ * @param n
+ * IN: Object to open
+ * @param fields
+ * IN: Object fields to select
+ * @param lapl_id
+ * IN: Access property list identifier for the link pointing to the object (Not currently used; pass as
+ * H5P_DEFAULT.)
+ *
+ * @return object information
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - name is null.
+ **/
+ public synchronized static native H5O_native_info_t H5Oget_native_info_by_idx(long loc_id, String group_name, int idx_type,
+ int order, long n, int fields, long lapl_id) throws HDF5LibraryException, NullPointerException;
+
+ /**
* H5Olink creates a new hard link to an object in an HDF5 file.
*
* @param obj_id
@@ -4835,7 +4995,7 @@ public class H5 implements java.io.Serializable {
* @exception NullPointerException
* - name is null.
**/
- public static int H5Ovisit(long obj_id, int idx_type, int order, H5O_iterate_cb op, H5O_iterate_t op_data)
+ public static int H5Ovisit(long obj_id, int idx_type, int order, H5O_iterate_t op, H5O_iterate_opdata_t op_data)
throws HDF5LibraryException, NullPointerException {
return H5Ovisit(obj_id, idx_type, order, op, op_data, HDF5Constants.H5O_INFO_ALL);
}
@@ -4864,8 +5024,8 @@ public class H5 implements java.io.Serializable {
* @exception NullPointerException
* - name is null.
**/
- public synchronized static native int H5Ovisit(long obj_id, int idx_type, int order, H5O_iterate_cb op,
- H5O_iterate_t op_data, int fields) throws HDF5LibraryException, NullPointerException;
+ public synchronized static native int H5Ovisit(long obj_id, int idx_type, int order, H5O_iterate_t op,
+ H5O_iterate_opdata_t op_data, int fields) throws HDF5LibraryException, NullPointerException;
/**
* H5Ovisit_by_name recursively visits all objects starting from a specified object.
@@ -4894,7 +5054,7 @@ public class H5 implements java.io.Serializable {
* - name is null.
**/
public static int H5Ovisit_by_name(long loc_id, String obj_name, int idx_type, int order,
- H5O_iterate_cb op, H5O_iterate_t op_data, long lapl_id) throws HDF5LibraryException, NullPointerException {
+ H5O_iterate_t op, H5O_iterate_opdata_t op_data, long lapl_id) throws HDF5LibraryException, NullPointerException {
return H5Ovisit_by_name(loc_id, obj_name, idx_type, order, op, op_data, HDF5Constants.H5O_INFO_ALL, lapl_id);
}
@@ -4927,7 +5087,7 @@ public class H5 implements java.io.Serializable {
* - name is null.
**/
public synchronized static native int H5Ovisit_by_name(long loc_id, String obj_name, int idx_type, int order,
- H5O_iterate_cb op, H5O_iterate_t op_data, int fields, long lapl_id) throws HDF5LibraryException, NullPointerException;
+ H5O_iterate_t op, H5O_iterate_opdata_t op_data, int fields, long lapl_id) throws HDF5LibraryException, NullPointerException;
/**
@@ -4969,26 +5129,28 @@ public class H5 implements java.io.Serializable {
public synchronized static native void H5Oincr_refcount(long object_id) throws HDF5LibraryException;
/**
- * H5Oopen_by_addr opens a group, dataset, or named datatype using its address within an HDF5 file.
+ * H5Oopen_by_token opens a group, dataset, or named datatype using its object token within an HDF5 file.
*
* @param loc_id IN: File or group identifier
- * @param addr IN: Object's address in the file
+ * @param token IN: Object's token in the file
*
* @return an object identifier for the opened object
*
* @exception HDF5LibraryException - Error from the HDF-5 Library.
**/
- public static long H5Oopen_by_addr(long loc_id, long addr) throws HDF5LibraryException {
- long id = _H5Oopen_by_addr(loc_id, addr);
+ public static long H5Oopen_by_token(long loc_id, H5O_token_t token) throws HDF5LibraryException {
+ long id = _H5Oopen_by_token(loc_id, token);
+
if (id > 0) {
- log.trace("OPEN_IDS: H5Oopen_by_addr add {}", id);
+ log.trace("OPEN_IDS: H5Oopen_by_token add {}", id);
OPEN_IDS.add(id);
log.trace("OPEN_IDS: {}", OPEN_IDS.size());
}
+
return id;
}
- private synchronized static native long _H5Oopen_by_addr(long loc_id, long addr)
+ private synchronized static native long _H5Oopen_by_token(long loc_id, H5O_token_t token)
throws HDF5LibraryException, NullPointerException;
/**
@@ -5052,6 +5214,12 @@ public class H5 implements java.io.Serializable {
public synchronized static native void H5Oenable_mdc_flushes(long object_id);
public synchronized static native boolean H5Oare_mdc_flushes_disabled(long object_id);
+ // /////// unimplemented ////////
+ // herr_t H5Otoken_cmp(hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2,
+ // int *cmp_value);
+ // herr_t H5Otoken_to_str(hid_t loc_id, const H5O_token_t *token, char **token_str);
+ // herr_t H5Otoken_from_str(hid_t loc_id, const char *token_str, H5O_token_t *token);
+
// ////////////////////////////////////////////////////////////
// //
// H5P: Property List Interface Functions //
@@ -8091,6 +8259,331 @@ public class H5 implements java.io.Serializable {
// ////////////////////////////////////////////////////////////
// //
+ // H5R: HDF5 1.12 Reference API Functions //
+ // //
+ // ////////////////////////////////////////////////////////////
+
+ // Constructors //
+
+ /**
+ * H5Rcreate_object creates a reference pointing to the object named name located at loc id.
+ *
+ * @param loc_id
+ * IN: Location identifier used to locate the object being pointed to.
+ * @param name
+ * IN: Name of object at location loc_id.
+ * @param access_id
+ * IN: Object access identifier to the object being pointed to.
+ *
+ * @return the reference (byte[]) if successful
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native byte[] H5Rcreate_object(long loc_id, String name, long access_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Rcreate_region creates the reference, pointing to the region represented by
+ * space id within the object named name located at loc id.
+ *
+ * @param loc_id
+ * IN: Location identifier used to locate the object being pointed to.
+ * @param name
+ * IN: Name of object at location loc_id.
+ * @param space_id
+ * IN: Identifies the dataset region that a dataset region reference points to.
+ * @param access_id
+ * IN: Object access identifier to the object being pointed to.
+ *
+ * @return the reference (byte[]) if successful
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native byte[] H5Rcreate_region(long loc_id, String name, long space_id, long access_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Rcreate_attr creates the reference, pointing to the attribute named attr name
+ * and attached to the object named name located at loc id.
+ *
+ * @param loc_id
+ * IN: Location identifier used to locate the object being pointed to.
+ * @param name
+ * IN: Name of object at location loc_id.
+ * @param attr_name
+ * IN: Name of the attribute within the object.
+ * @param access_id
+ * IN: Object access identifier to the object being pointed to.
+ *
+ * @return the reference (byte[]) if successful
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native byte[] H5Rcreate_attr(long loc_id, String name, String attr_name, long access_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Rdestroy destroys a reference and releases resources.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native void H5Rdestroy(byte[] ref_ptr)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ // Info //
+
+ /**
+ * H5Rget_type retrieves the type of a reference.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ *
+ * @return a valid reference type if successful; otherwise returns H5R UNKNOWN.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native int H5Rget_type(byte[] ref_ptr)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Requal determines whether two references point to the same object, region or attribute.
+ *
+ * @param ref1_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ * @param ref2_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ *
+ * @return true if equal, else false
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native boolean H5Requal(byte[] ref1_ptr, byte[] ref2_ptr)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Rcopy creates a copy of an existing reference.
+ *
+ * @param src_ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ *
+ * @return a valid copy of the reference (byte[]) if successful.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native byte[] H5Rcopy(byte[] src_ref_ptr)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ // Dereference //
+
+ /**
+ * H5Ropen_object opens that object and returns an identifier.
+ * The object opened with this function should be closed when it is no longer needed
+ * so that resource leaks will not develop. Use the appropriate close function such
+ * as H5Oclose or H5Dclose for datasets.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ * @param rapl_id
+ * IN: A reference access property list identifier for the reference. The access property
+ * list can be used to access external files that the reference points
+ * to (through a file access property list).
+ * @param oapl_id
+ * IN: An object access property list identifier for the reference. The access property
+ * property list must be of the same type as the object being referenced,
+ * that is a group or dataset property list.
+ *
+ * @return a valid identifier if successful
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native long H5Ropen_object(byte[] ref_ptr, long rapl_id, long oapl_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Ropen region creates a copy of the dataspace of the dataset pointed to by a region reference,
+ * ref ptr, and defines a selection matching the selection pointed to by ref ptr within the dataspace copy.
+ * Use H5Sclose to release the dataspace identifier returned by this function when the identifier is no longer needed.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ * @param rapl_id
+ * IN: A reference access property list identifier for the reference. The access property
+ * list can be used to access external files that the reference points
+ * to (through a file access property list).
+ * @param oapl_id
+ * IN: An object access property list identifier for the reference. The access property
+ * property list must be of the same type as the object being referenced,
+ * that is a group or dataset property list.
+ *
+ * @return a valid dataspace identifier if successful
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native long H5Ropen_region(byte[] ref_ptr, long rapl_id, long oapl_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Ropen_attr opens the attribute attached to the object and returns an identifier.
+ * The attribute opened with this function should be closed with H5Aclose when it is no longer needed
+ * so that resource leaks will not develop.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ * @param rapl_id
+ * IN: A reference access property list identifier for the reference. The access property
+ * list can be used to access external files that the reference points
+ * to (through a file access property list).
+ * @param aapl_id
+ * IN: An attribute access property list identifier for the reference. The access property
+ * property list must be of the same type as the object being referenced,
+ * that is a group or dataset property list.
+ *
+ * @return a valid attribute identifier if successful
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - an input array is null.
+ * @exception IllegalArgumentException
+ * - an input array is invalid.
+ **/
+ public synchronized static native long H5Ropen_attr(byte[] ref_ptr, long rapl_id, long aapl_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ // Get type //
+
+ /**
+ * H5Rget obj type3 retrieves the type of the referenced object pointed to.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ * @param rapl_id
+ * IN: A reference access property list identifier for the reference. The access property
+ * list can be used to access external files that the reference points
+ * to (through a file access property list).
+ *
+ * @return Returns the object type
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - array is null.
+ * @exception IllegalArgumentException
+ * - array is invalid.
+ **/
+ public synchronized static native int H5Rget_obj_type3(byte[] ref_ptr, long rapl_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ // Get name //
+
+ /**
+ * H5Rget_file_name retrieves the file name for the object, region or attribute reference pointed to.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ *
+ * @return Returns the file name of the reference
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - array is null.
+ * @exception IllegalArgumentException
+ * - array is invalid.
+ **/
+ public synchronized static native String H5Rget_file_name(byte[] ref_ptr)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Rget_obj_name retrieves the object name for the object, region or attribute reference pointed to.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ * @param rapl_id
+ * IN: A reference access property list identifier for the reference. The access property
+ * list can be used to access external files that the reference points
+ * to (through a file access property list).
+ *
+ * @return Returns the object name of the reference
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - array is null.
+ * @exception IllegalArgumentException
+ * - array is invalid.
+ **/
+ public synchronized static native String H5Rget_obj_name(byte[] ref_ptr, long rapl_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ /**
+ * H5Rget_attr_name retrieves the attribute name for the object, region or attribute reference pointed to.
+ *
+ * @param ref_ptr
+ * IN: Reference to an object, region or attribute attached to an object.
+ *
+ * @return Returns the attribute name of the reference
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - array is null.
+ * @exception IllegalArgumentException
+ * - array is invalid.
+ **/
+ public synchronized static native String H5Rget_attr_name(byte[] ref_ptr)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
+ // ////////////////////////////////////////////////////////////
+ // //
// H5R: HDF5 1.8 Reference API Functions //
// //
// ////////////////////////////////////////////////////////////
@@ -10313,6 +10806,26 @@ public class H5 implements java.io.Serializable {
public synchronized static native int H5Tpack(long type_id) throws HDF5LibraryException;
/**
+ * H5Treclaim reclaims buffer used for VL data.
+ *
+ * @param type_id
+ * Identifier of the datatype.
+ * @param space_id
+ * Identifier of the dataspace.
+ * @param xfer_plist_id
+ * Identifier of a transfer property list for this I/O operation.
+ * @param buf
+ * Buffer with data to be reclaimed.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - buf is null.
+ **/
+ public synchronized static native void H5Treclaim(long type_id, long space_id, long xfer_plist_id, byte[] buf)
+ throws HDF5LibraryException, NullPointerException;
+
+ /**
* H5Tvlen_create creates a new variable-length (VL) dataype.
*
* @param base_id
@@ -10382,8 +10895,11 @@ public class H5 implements java.io.Serializable {
/// VOL Connector Functionality
public synchronized static native long H5VLregister_connector_by_name(String connector_name, long vipl_id);
public synchronized static native long H5VLregister_connector_by_value(int connector_value, long vipl_id);
- public synchronized static native boolean H5VLis_connector_registered(String name);
- public synchronized static native long H5VLget_connector_id(String name);
+ public synchronized static native boolean H5VLis_connector_registered_by_name(String name);
+ public synchronized static native boolean H5VLis_connector_registered_by_value(int connector_value);
+ public synchronized static native long H5VLget_connector_id(long object_id);
+ public synchronized static native long H5VLget_connector_id_by_name(String name);
+ public synchronized static native long H5VLget_connector_id_by_value(int connector_value);
public synchronized static native String H5VLget_connector_name(long object_id);
public synchronized static native void H5VLclose(long connector_id);
public synchronized static native void H5VLunregister_connector(long connector_id);
diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java
index f5be38d..beba1d1 100644
--- a/java/src/hdf/hdf5lib/HDF5Constants.java
+++ b/java/src/hdf/hdf5lib/HDF5Constants.java
@@ -14,6 +14,8 @@
package hdf.hdf5lib;
+import hdf.hdf5lib.structs.H5O_token_t;
+
/**
* /** This class contains C constants and enumerated types of HDF5 library. The
* values of these constants are obtained from the library by calling J2C(int
@@ -344,9 +346,10 @@ public class HDF5Constants {
public static final int H5O_INFO_BASIC = H5O_INFO_BASIC();
public static final int H5O_INFO_TIME = H5O_INFO_TIME();
public static final int H5O_INFO_NUM_ATTRS = H5O_INFO_NUM_ATTRS();
- public static final int H5O_INFO_HDR = H5O_INFO_HDR();
- public static final int H5O_INFO_META_SIZE = H5O_INFO_META_SIZE();
public static final int H5O_INFO_ALL = H5O_INFO_ALL();
+ public static final int H5O_NATIVE_INFO_HDR = H5O_NATIVE_INFO_HDR();
+ public static final int H5O_NATIVE_INFO_META_SIZE = H5O_NATIVE_INFO_META_SIZE();
+ public static final int H5O_NATIVE_INFO_ALL = H5O_NATIVE_INFO_ALL();
public static final int H5O_SHMESG_NONE_FLAG = H5O_SHMESG_NONE_FLAG();
public static final int H5O_SHMESG_SDSPACE_FLAG = H5O_SHMESG_SDSPACE_FLAG();
public static final int H5O_SHMESG_DTYPE_FLAG = H5O_SHMESG_DTYPE_FLAG();
@@ -359,6 +362,8 @@ public class HDF5Constants {
public static final int H5O_TYPE_DATASET = H5O_TYPE_DATASET();
public static final int H5O_TYPE_NAMED_DATATYPE = H5O_TYPE_NAMED_DATATYPE();
public static final int H5O_TYPE_NTYPES = H5O_TYPE_NTYPES();
+ public static final int H5O_MAX_TOKEN_SIZE = H5O_MAX_TOKEN_SIZE();
+ public static final H5O_token_t H5O_TOKEN_UNDEF = H5O_TOKEN_UNDEF();
public static final long H5P_ROOT = H5P_ROOT();
public static final long H5P_OBJECT_CREATE = H5P_OBJECT_CREATE();
@@ -407,11 +412,18 @@ public class HDF5Constants {
public static final int H5PL_VOL_PLUGIN = H5PL_VOL_PLUGIN();
public static final int H5PL_ALL_PLUGIN = H5PL_ALL_PLUGIN();
+ public static final int H5R_ATTR = H5R_ATTR();
public static final int H5R_BADTYPE = H5R_BADTYPE();
public static final int H5R_DATASET_REGION = H5R_DATASET_REGION();
+ public static final int H5R_DATASET_REGION1 = H5R_DATASET_REGION1();
+ public static final int H5R_DATASET_REGION2 = H5R_DATASET_REGION2();
public static final int H5R_MAXTYPE = H5R_MAXTYPE();
+ public static final int H5R_REF_BUF_SIZE = H5R_REF_BUF_SIZE();
public static final int H5R_OBJ_REF_BUF_SIZE = H5R_OBJ_REF_BUF_SIZE();
public static final int H5R_OBJECT = H5R_OBJECT();
+ public static final int H5R_OBJECT1 = H5R_OBJECT1();
+ public static final int H5R_OBJECT2 = H5R_OBJECT2();
+
public static final int H5S_ALL = H5S_ALL();
public static final int H5S_MAX_RANK = H5S_MAX_RANK();
public static final int H5S_NO_CLASS = H5S_NO_CLASS();
@@ -606,6 +618,7 @@ public class HDF5Constants {
public static final long H5T_STD_I8LE = H5T_STD_I8LE();
public static final long H5T_STD_REF_DSETREG = H5T_STD_REF_DSETREG();
public static final long H5T_STD_REF_OBJ = H5T_STD_REF_OBJ();
+ public static final long H5T_STD_REF = H5T_STD_REF();
public static final long H5T_STD_U16BE = H5T_STD_U16BE();
public static final long H5T_STD_U16LE = H5T_STD_U16LE();
public static final long H5T_STD_U32BE = H5T_STD_U32BE();
@@ -1300,11 +1313,13 @@ public class HDF5Constants {
private static native final int H5O_INFO_NUM_ATTRS();
- private static native final int H5O_INFO_HDR();
+ private static native final int H5O_INFO_ALL();
- private static native final int H5O_INFO_META_SIZE();
+ private static native final int H5O_NATIVE_INFO_HDR();
- private static native final int H5O_INFO_ALL();
+ private static native final int H5O_NATIVE_INFO_META_SIZE();
+
+ private static native final int H5O_NATIVE_INFO_ALL();
private static native final int H5O_SHMESG_NONE_FLAG();
@@ -1330,6 +1345,10 @@ public class HDF5Constants {
private static native final int H5O_TYPE_NTYPES();
+ private static native final int H5O_MAX_TOKEN_SIZE();
+
+ private static native final H5O_token_t H5O_TOKEN_UNDEF();
+
private static native final long H5P_ROOT();
private static native final long H5P_OBJECT_CREATE();
@@ -1420,16 +1439,28 @@ public class HDF5Constants {
private static native final int H5PL_VOL_PLUGIN();
+ private static native final int H5R_ATTR();
+
private static native final int H5R_BADTYPE();
private static native final int H5R_DATASET_REGION();
+ private static native final int H5R_DATASET_REGION1();
+
+ private static native final int H5R_DATASET_REGION2();
+
private static native final int H5R_MAXTYPE();
+ private static native final int H5R_REF_BUF_SIZE();
+
private static native final int H5R_OBJ_REF_BUF_SIZE();
private static native final int H5R_OBJECT();
+ private static native final int H5R_OBJECT1();
+
+ private static native final int H5R_OBJECT2();
+
private static native final int H5S_ALL();
private static native final int H5S_MAX_RANK();
@@ -1818,6 +1849,8 @@ public class HDF5Constants {
private static native final long H5T_STD_REF_OBJ();
+ private static native final long H5T_STD_REF();
+
private static native final long H5T_STD_U16BE();
private static native final long H5T_STD_U16LE();
diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java
index ec71911..ad9ad8c 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_opdata_t.java
@@ -13,9 +13,6 @@
package hdf.hdf5lib.callbacks;
-import hdf.hdf5lib.structs.H5L_info_t;
+public interface H5L_iterate_opdata_t {
-//Information class for link callback(for H5Lvisit/H5Lvisit_by_name)
-public interface H5L_iterate_cb extends Callbacks {
- int callback(long group, String name, H5L_info_t info, H5L_iterate_t op_data);
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java
index 28ffb8a..f92fbc4 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java
@@ -13,8 +13,9 @@
package hdf.hdf5lib.callbacks;
-public interface H5L_iterate_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+import hdf.hdf5lib.structs.H5L_info_t;
+
+// Information class for link callback (for H5Lvisit/H5Lvisit_by_name).
+public interface H5L_iterate_t extends Callbacks {
+ int callback(long group, String name, H5L_info_t info, H5L_iterate_opdata_t op_data);
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java
index 89cf206..e1c47b5 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_opdata_t.java
@@ -13,9 +13,6 @@
package hdf.hdf5lib.callbacks;
-import hdf.hdf5lib.structs.H5O_info_t;
+public interface H5O_iterate_opdata_t {
-//Information class for link callback(for H5Ovisit/H5Ovisit_by_name)
-public interface H5O_iterate_cb extends Callbacks {
- int callback(long group, String name, H5O_info_t info, H5O_iterate_t op_data);
}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java
index 1491b09..9a55106 100644
--- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java
+++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java
@@ -13,8 +13,9 @@
package hdf.hdf5lib.callbacks;
-public interface H5O_iterate_t {
-/** public ArrayList iterdata = new ArrayList();
- * Any derived interfaces must define the single public variable as above.
- */
+import hdf.hdf5lib.structs.H5O_info_t;
+
+// Information class for link callback(for H5Ovisit/H5Ovisit_by_name)
+public interface H5O_iterate_t extends Callbacks {
+ int callback(long group, String name, H5O_info_t info, H5O_iterate_opdata_t op_data);
}
diff --git a/java/src/hdf/hdf5lib/structs/H5L_info_t.java b/java/src/hdf/hdf5lib/structs/H5L_info_t.java
index 3bbb189..377e617 100644
--- a/java/src/hdf/hdf5lib/structs/H5L_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5L_info_t.java
@@ -15,22 +15,39 @@ package hdf.hdf5lib.structs;
import java.io.Serializable;
-//Information struct for link (for H5Lget_info/H5Lget_info_by_idx)
-public class H5L_info_t implements Serializable{
+import hdf.hdf5lib.HDF5Constants;
+
+// Information struct for link (for H5Lget_info/H5Lget_info_by_idx)
+public class H5L_info_t implements Serializable {
private static final long serialVersionUID = -4754320605310155033L;
- public int type;
- public boolean corder_valid;
- public long corder;
- public int cset;
- public long address_val_size;
+ public int type;
+ public boolean corder_valid;
+ public long corder;
+ public int cset;
+ public H5O_token_t token;
+ public long val_size;
+
+ // Constructor for using object token portion of C union
+ H5L_info_t (int type, boolean corder_valid, long corder,
+ int cset, H5O_token_t token)
+ {
+ this.type = type;
+ this.corder_valid = corder_valid;
+ this.corder = corder;
+ this.cset = cset;
+ this.token = token;
+ this.val_size = -1;
+ }
+ // Constructor for using val_size portion of C union
H5L_info_t (int type, boolean corder_valid, long corder,
- int cset, long address_val_size)
+ int cset, long val_size)
{
this.type = type;
this.corder_valid = corder_valid;
this.corder = corder;
this.cset = cset;
- this.address_val_size = address_val_size;
+ this.token = HDF5Constants.H5O_TOKEN_UNDEF;
+ this.val_size = val_size;
}
}
diff --git a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
index a39c1ed..8d0cc24 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java
@@ -16,7 +16,7 @@ package hdf.hdf5lib.structs;
import java.io.Serializable;
// Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
-public class H5O_hdr_info_t implements Serializable{
+public class H5O_hdr_info_t implements Serializable {
private static final long serialVersionUID = 7883826382952577189L;
public int version; /* Version number of header format in file */
public int nmesgs; /* Number of object header messages */
@@ -44,4 +44,38 @@ public class H5O_hdr_info_t implements Serializable{
this.mesg_present = mesg_present;
this.mesg_shared = mesg_shared;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof H5O_hdr_info_t))
+ return false;
+
+ H5O_hdr_info_t info = (H5O_hdr_info_t) o;
+
+ if (this.version != info.version)
+ return false;
+ if (this.nmesgs != info.nmesgs)
+ return false;
+ if (this.nchunks != info.nchunks)
+ return false;
+ if (this.flags != info.flags)
+ return false;
+ if (this.space_total != info.space_total)
+ return false;
+ if (this.space_meta != info.space_meta)
+ return false;
+ if (this.space_mesg != info.space_mesg)
+ return false;
+ if (this.space_free != info.space_free)
+ return false;
+ if (this.mesg_present != info.mesg_present)
+ return false;
+ if (this.mesg_shared != info.mesg_shared)
+ return false;
+
+ return true;
+ }
}
diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java
index ac32f6a..6a26a10 100644
--- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java
@@ -15,38 +15,30 @@ package hdf.hdf5lib.structs;
import java.io.Serializable;
-//Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
-public class H5O_info_t implements Serializable{
+// Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
+public class H5O_info_t implements Serializable {
private static final long serialVersionUID = 4691681163544054518L;
- public long fileno; /* File number that object is located in */
- public long addr; /* Object address in file */
- public int type; /* Basic object type (group, dataset, etc.) */
- public int rc; /* Reference count of object */
- public long atime; /* Access time */
- public long mtime; /* Modification time */
- public long ctime; /* Change time */
- public long btime; /* Birth time */
- public long num_attrs; /* # of attributes attached to object */
- public H5O_hdr_info_t hdr; /* Object header information */
- /* Extra metadata storage for obj & attributes */
- public H5_ih_info_t meta_size_obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
- public H5_ih_info_t meta_size_attr; /* v2 B-tree & heap for attributes */
+ public long fileno; /* File number that object is located in */
+ public H5O_token_t token; /* Object token in file */
+ public int type; /* Basic object type (group, dataset, etc.) */
+ public int rc; /* Reference count of object */
+ public long atime; /* Access time */
+ public long mtime; /* Modification time */
+ public long ctime; /* Change time */
+ public long btime; /* Birth time */
+ public long num_attrs; /* # of attributes attached to object */
- public H5O_info_t (long fileno, long addr, int type,
- int rc, long num_attrs, long atime, long mtime, long ctime, long btime,
- H5O_hdr_info_t hdr, H5_ih_info_t meta_size_obj, H5_ih_info_t meta_size_attr)
+ public H5O_info_t (long fileno, H5O_token_t token, int type,
+ int rc, long atime, long mtime, long ctime, long btime, long num_attrs)
{
this.fileno = fileno;
- this.addr = addr;
+ this.token = token;
this.type = type;
this.rc = rc;
- this.num_attrs = num_attrs;
this.atime = atime;
this.mtime = mtime;
this.ctime = ctime;
this.btime = btime;
- this.hdr = hdr;
- this.meta_size_obj = meta_size_obj;
- this.meta_size_attr = meta_size_attr;
+ this.num_attrs = num_attrs;
}
}
diff --git a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java
new file mode 100644
index 0000000..4e80849
--- /dev/null
+++ b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java
@@ -0,0 +1,52 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+package hdf.hdf5lib.structs;
+
+import java.io.Serializable;
+
+// Information struct for native HDF5 object info, such as object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx).
+public class H5O_native_info_t implements Serializable {
+ private static final long serialVersionUID = 7883826382952577189L;
+
+ public H5O_hdr_info_t hdr_info; /* Object header information */
+
+ /* Extra metadata storage for obj & attributes */
+ public H5_ih_info_t obj_info; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
+ public H5_ih_info_t attr_info; /* v2 B-tree & heap for attributes */
+
+ H5O_native_info_t (H5O_hdr_info_t oheader_info, H5_ih_info_t obj_info, H5_ih_info_t attr_info)
+ {
+ this.hdr_info = oheader_info;
+ this.obj_info = obj_info;
+ this.attr_info = attr_info;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof H5O_native_info_t))
+ return false;
+
+ H5O_native_info_t info = (H5O_native_info_t) o;
+
+ if (!this.hdr_info.equals(info.hdr_info)
+ || !this.obj_info.equals(info.obj_info)
+ || !this.attr_info.equals(info.attr_info))
+ return false;
+
+ return true;
+ }
+} \ No newline at end of file
diff --git a/java/src/hdf/hdf5lib/structs/H5O_token_t.java b/java/src/hdf/hdf5lib/structs/H5O_token_t.java
new file mode 100644
index 0000000..8ec0b7f
--- /dev/null
+++ b/java/src/hdf/hdf5lib/structs/H5O_token_t.java
@@ -0,0 +1,45 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+package hdf.hdf5lib.structs;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+import hdf.hdf5lib.HDF5Constants;
+
+// Object token, which is a unique and permanent identifier, for an HDF5 object within a container.
+public class H5O_token_t implements Serializable {
+ private static final long serialVersionUID = -4754320605310155032L;
+ public byte[] data;
+
+ H5O_token_t (byte[] data) {
+ this.data = data;
+ }
+
+ public boolean isUndefined() {
+ return this.equals(HDF5Constants.H5O_TOKEN_UNDEF);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof H5O_token_t))
+ return false;
+
+ H5O_token_t token = (H5O_token_t) o;
+
+ return Arrays.equals(this.data, token.data);
+ }
+} \ No newline at end of file
diff --git a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
index ea36d85..7159f02 100644
--- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
+++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
@@ -26,4 +26,22 @@ public class H5_ih_info_t implements Serializable {
this.index_size = index_size;
this.heap_size = heap_size;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (!(o instanceof H5_ih_info_t))
+ return false;
+
+ H5_ih_info_t info = (H5_ih_info_t) o;
+
+ if (this.index_size != info.index_size)
+ return false;
+ if (this.heap_size != info.heap_size)
+ return false;
+
+ return true;
+ }
}