summaryrefslogtreecommitdiffstats
path: root/java/src/hdf
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-01-16 21:29:34 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:31:50 (GMT)
commit3e6a192e9cef92ee1e0cf1842d05995da83efd27 (patch)
tree3cd0e18b9a50af6fc00a30a7da24d016b07efbb7 /java/src/hdf
parent335fc0096c4287c1121c45c85085e67e5735c47d (diff)
downloadhdf5-3e6a192e9cef92ee1e0cf1842d05995da83efd27.zip
hdf5-3e6a192e9cef92ee1e0cf1842d05995da83efd27.tar.gz
hdf5-3e6a192e9cef92ee1e0cf1842d05995da83efd27.tar.bz2
Squashed commit of the token_refactoring branch:
Diffstat (limited to 'java/src/hdf')
-rw-r--r--java/src/hdf/hdf5lib/CMakeLists.txt6
-rw-r--r--java/src/hdf/hdf5lib/H5.java245
-rw-r--r--java/src/hdf/hdf5lib/HDF5Constants.java21
-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, 426 insertions, 98 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 ba10f5e..5b704dd 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.
@@ -3577,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
*
@@ -3588,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");
@@ -3629,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;
@@ -3638,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]);
@@ -3646,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;
/**
@@ -3701,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.
*
@@ -3714,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");
}
@@ -3739,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
@@ -4340,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.
@@ -4372,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;
/**
@@ -4419,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.
@@ -4449,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;
/**
@@ -4666,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
@@ -4724,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
@@ -4741,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
@@ -4766,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
@@ -4843,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);
}
@@ -4872,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.
@@ -4902,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);
}
@@ -4935,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;
/**
@@ -4977,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;
/**
@@ -5060,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 //
@@ -10736,7 +10896,8 @@ public class H5 implements java.io.Serializable {
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 long H5VLget_connector_id(long object_id);
+ public synchronized static native long H5VLget_connector_id_by_name(String name);
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 4aeeb98..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();
@@ -1308,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();
@@ -1338,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();
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;
+ }
}