Skip to content

Commit

Permalink
1 12 JNI export references and java updates (#464)
Browse files Browse the repository at this point in the history
* OESS-98 fix tools test for plugins

* sync fork

* Merge of changes from dev

* Move problem option to bottom of the list until fixed

* HDFFV-11106 - fix parsing optional args

* HDFFV-11106 add note

* grammer fix

* Whitespace after clang formatting

* Undo format version 11 changes

* Update check to working version

* Merge workflow and minor changes from develop

* Update supported platforms

* PR#3 merge from develop

* Merge gcc 10 diagnostics option from develop

* Merge #318 OSX changes from develop

* Merge serval small changes from dev

* fix typo

* Minor non-space formatting changes

* GH #386 copyright corrections for java folder

* revert because logic requires false return

* Merges from develop

#358 patches from vtk
#361 fix header guard spelling

* Remove case statement for H5I_EVENTSET

* Correct call with versioning

* Remove tabs

* Double underscore change

* Merges from develop

#340 clang -Wformat-security warnings
#360 Fixed uninitialized warnings
Remove more underscores from header guards

* Merge #380 from develop

* Correct date entry

* Split format source and commit changes on repo push

* remove pre-split setting

* Change windows TS to use older VS.

* HDFFV-11212 JNI export util and Javadoc

* Suggested review changes

* Another change found

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
byrnHDF and github-actions[bot] authored Mar 12, 2021
1 parent c6a2cc2 commit 579b266
Show file tree
Hide file tree
Showing 15 changed files with 553 additions and 215 deletions.
27 changes: 24 additions & 3 deletions java/src/hdf/hdf5lib/H5.java
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ public synchronized static native int H5set_free_list_limits(int reg_global_lim,
*
* @param file_export_name
* The file name to export data into.
* @param file_name
* The name of the HDF5 file containing the dataset.
* @param file_id
* The identifier of the HDF5 file containing the dataset.
* @param object_path
* The full path of the dataset to be exported.
* @param binary_order
Expand All @@ -525,9 +525,30 @@ public synchronized static native int H5set_free_list_limits(int reg_global_lim,
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
public synchronized static native void H5export_dataset(String file_export_name, String file_name,
public synchronized static native void H5export_dataset(String file_export_name, long file_id,
String object_path, int binary_order) throws HDF5LibraryException;

/**
* H5export_attribute is a utility function to save data in a file.
*
* @param file_export_name
* The file name to export data into.
* @param dataset_id
* The identifier of the dataset containing the attribute.
* @param attribute_name
* The attribute to be exported.
* @param binary_order
* 99 - export data as text.
* 1 - export data as binary Native Order.
* 2 - export data as binary Little Endian.
* 3 - export data as binary Big Endian.
*
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
public synchronized static native void H5export_attribute(String file_export_name, long dataset_id,
String attribute_name, int binary_order) throws HDF5LibraryException;

/**
* H5is_library_threadsafe Checks to see if the library was built with thread-safety enabled.
*
Expand Down
6 changes: 5 additions & 1 deletion java/src/hdf/hdf5lib/HDF5Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ public class HDF5Constants {
public static final int H5_INDEX_CRT_ORDER = H5_INDEX_CRT_ORDER();
/** indices on links, number of indices defined */
public static final int H5_INDEX_N = H5_INDEX_N();
/** */
/** Common iteration orders, Unknown order */
public static final int H5_ITER_UNKNOWN = H5_ITER_UNKNOWN();
/** Common iteration orders, Increasing order */
public static final int H5_ITER_INC = H5_ITER_INC();
/** Common iteration orders, Decreasing order */
public static final int H5_ITER_DEC = H5_ITER_DEC();
/** Common iteration orders, No particular order, whatever is fastest */
public static final int H5_ITER_NATIVE = H5_ITER_NATIVE();
/** Common iteration orders, Number of iteration orders */
public static final int H5_ITER_N = H5_ITER_N();
public static final int H5AC_CURR_CACHE_CONFIG_VERSION = H5AC_CURR_CACHE_CONFIG_VERSION();
public static final int H5AC_MAX_TRACE_FILE_NAME_LEN = H5AC_MAX_TRACE_FILE_NAME_LEN();
Expand Down
24 changes: 18 additions & 6 deletions java/src/hdf/hdf5lib/HDF5GroupInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,32 +90,44 @@ public void reset() {
linklen = 0;
}

/** fileno accessors */
/** fileno accessors
* @return the file number if successful
*/
public long[] getFileno() {
return fileno;
}

/** accessors */
/** accessors
* @return the object number if successful
*/
public long[] getObjno() {
return objno;
}

/** accessors */
/** accessors
* @return type of group if successful
*/
public int getType() {
return type;
}

/** accessors */
/** accessors
* @return the number of links in the group if successful
*/
public int getNlink() {
return nlink;
}

/** accessors */
/** accessors
* @return the modified time value if successful
*/
public long getMtime() {
return mtime;
}

/** accessors */
/** accessors
* @return a length of link name if successful
*/
public int getLinklen() {
return linklen;
}
Expand Down
10 changes: 4 additions & 6 deletions java/src/hdf/hdf5lib/HDFArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -827,12 +827,10 @@ public ArrayDescriptor(Object anArray) throws HDF5Exception
else if (NT == 'S') {
NTsize = 2;
}
else if ((NT == 'I')
|| (NT == 'F')) {
else if ((NT == 'I') || (NT == 'F')) {
NTsize = 4;
}
else if ((NT == 'J')
|| (NT == 'D')) {
else if ((NT == 'J') || (NT == 'D')) {
NTsize = 8;
}
else if (css.startsWith("Ljava.lang.Byte")) {
Expand Down Expand Up @@ -925,8 +923,8 @@ public void dumpInfo()
System.out.println("Type: " + theType);
System.out.println("Class: " + theClass);
System.out.println("NT: " + NT + " NTsize: " + NTsize);
System.out
.println("Array has " + dims + " dimensions (" + totalSize + " bytes, " + totalElements + " elements)");
System.out.println("Array has " + dims + " dimensions (" + totalSize
+ " bytes, " + totalElements + " elements)");
int i;
for (i = 0; i <= dims; i++) {
Class tc = objs[i].getClass();
Expand Down
4 changes: 3 additions & 1 deletion java/src/hdf/hdf5lib/structs/H5_ih_info_t.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
*/
public class H5_ih_info_t implements Serializable {
private static final long serialVersionUID = -142238015615462707L;
public long index_size; /* btree and/or list */
/** btree and/or list size of index */
public long index_size;
/** btree and/or list size of hp */
public long heap_size;

H5_ih_info_t (long index_size, long heap_size)
Expand Down
Loading

0 comments on commit 579b266

Please sign in to comment.