Skip to content

Commit

Permalink
Merge pull request #537 from jamesmudd/prepare-v0.7.0
Browse files Browse the repository at this point in the history
Prepare v0.7.0-alpha
  • Loading branch information
jamesmudd authored Jan 31, 2024
2 parents 1392d9f + 72b1932 commit c428099
Show file tree
Hide file tree
Showing 262 changed files with 319 additions and 283 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# jHDF Change Log

## v0.7.0-alpha
- Add initial HDF5 writing support! https://github.com/jamesmudd/jhdf/issues/354. Special thanks to [@thadguidry](https://github.com/thadguidry) for sponsoring this work. See [WriteHdf5.java](jhdf/src/main/java/io/jhdf/examples/WriteHdf5.java) for example usage.
- Build and dependency updates

## v0.6.10
- Add support for files containing superblock extensions https://github.com/jamesmudd/jhdf/issues/462
- Build and dependency updates
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# jHDF - Pure Java HDF5 library
[![jHDF CI](https://github.com/jamesmudd/jhdf/actions/workflows/ci.yml/badge.svg)](https://github.com/jamesmudd/jhdf/actions/workflows/ci.yml) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=jamesmudd_jhdf&metric=coverage)](https://sonarcloud.io/dashboard?id=jamesmudd_jhdf) [![Maven Central](https://img.shields.io/maven-central/v/io.jhdf/jhdf.svg?label=Maven%20Central)](https://search.maven.org/artifact/io.jhdf/jhdf) [![Javadocs](http://javadoc.io/badge/io.jhdf/jhdf.svg)](http://javadoc.io/doc/io.jhdf/jhdf) [![JetBrains Supported](https://img.shields.io/badge/supported-project.svg?label=&colorA=grey&colorB=orange&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxp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](https://doi.org/10.5281/zenodo.3996097)

This project is a pure Java implementation for accessing HDF5 files. It is written from the file format specification and is not using any HDF Group code, it is *not* a wrapper around the C libraries. The file format specification is available from the HDF Group [here](https://portal.hdfgroup.org/display/HDF5/File+Format+Specification). More information on the format is available on [Wikipedia](https://en.wikipedia.org/wiki/Hierarchical_Data_Format).
This project is a pure Java implementation for accessing HDF5 files. It is written from the file format specification and is not using any HDF Group code, it is *not* a wrapper around the C libraries. The file format specification is available from the HDF Group [here](https://docs.hdfgroup.org/hdf5/v1_10/_f_m_t3.html). More information on the format is available on [Wikipedia](https://en.wikipedia.org/wiki/Hierarchical_Data_Format).

The intention is to make a clean Java API to access HDF5 data. Currently, the project is targeting HDF5 read-only compatibility. For progress see the [change log](CHANGES.md). Java 8, 11 and 17 are officially supported.

Expand Down
8 changes: 6 additions & 2 deletions jhdf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand All @@ -27,7 +27,7 @@ plugins {

// Variables
group = 'io.jhdf'
version = '0.6.10'
version = '0.7.0-alpha'

compileJava {
sourceCompatibility = "1.8"
Expand Down Expand Up @@ -158,6 +158,10 @@ publishing {
developerConnection = 'scm:git:git://github.com/jamesmudd/jhdf.git'
url = 'https://github.com/jamesmudd/jhdf.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/jamesmudd/jhdf/issues'
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion jhdf/config/checkstyle/header.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
2 changes: 1 addition & 1 deletion jhdf/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# http://jhdf.io
#
# Copyright (c) 2023 James Mudd
# Copyright (c) 2024 James Mudd
#
# MIT License see 'LICENSE' file
#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion jhdf/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/AbstractNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/AbstractWritableNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/AttributeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/BufferBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/CommittedDatatype.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/FractalHeap.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/GlobalHeap.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/GroupImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/GroupSymbolTableNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/HdfFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/LocalHeap.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/ObjectHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/Superblock.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/SymbolTableEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/WritableDatasetImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/WritableGroupImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
26 changes: 4 additions & 22 deletions jhdf/src/main/java/io/jhdf/WritableHdfFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down Expand Up @@ -42,11 +42,10 @@ public class WritableHdfFile implements WritableGroup, AutoCloseable {
private final FileChannel fileChannel;
private final Superblock.SuperblockV2V3 superblock;
private final HdfFileChannel hdfFileChannel;
private ObjectHeader.ObjectHeaderV2 rootGroupObjectHeader;

private final WritableGroup rootGroup;

public WritableHdfFile(Path path) {
WritableHdfFile(Path path) {
logger.warn("Writing files is in alpha. Check files carefully!");
logger.info("Writing HDF5 file to [{}]", path.toAbsolutePath());
this.path = path;
try {
Expand All @@ -58,24 +57,7 @@ public WritableHdfFile(Path path) {
this.hdfFileChannel = new HdfFileChannel(this.fileChannel, this.superblock);

this.rootGroup = new WritableGroupImpl(null, "/");
// createRootGroup();
// try {
// hdfFileChannel.write(superblock.toBuffer(), 0L);
// long endOfFile = rootGroup.write(hdfFileChannel, ROOT_GROUP_ADDRESS);
//// hdfFileChannel.write(rootGroup.(), ROOT_GROUP_ADDRESS);
// hdfFileChannel.write(ByteBuffer.wrap(new byte[]{1}), 250);
// } catch (IOException e) {
// throw new HdfWritingExcpetion("Failed to write superblock", e);
// }
}

// private void createRootGroup() {
// List<Message> messages = new ArrayList<>();
// messages.add(LinkInfoMessage.createBasic());
// messages.add(GroupInfoMessage.createBasic());
// messages.add(NilMessage.create());
// this.rootGroupObjectHeader = new ObjectHeader.ObjectHeaderV2(ROOT_GROUP_ADDRESS, messages);
// }
}

@Override
public void close() {
Expand Down
4 changes: 2 additions & 2 deletions jhdf/src/main/java/io/jhdf/api/Attribute.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand All @@ -12,7 +12,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see LICENSE file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/Dataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/Group.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/Link.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/NodeType.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/WritableGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/WritableNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/WritiableDataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/api/dataset/ChunkedDataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* http://jhdf.io
*
* Copyright (c) 2023 James Mudd
* Copyright (c) 2024 James Mudd
*
* MIT License see 'LICENSE' file
*/
Expand Down
Loading

0 comments on commit c428099

Please sign in to comment.