Ctrl K

RO Crate Java

A Java library to create and modify RO-Crates. The aim of this implementation is to not require too deep knowledge of the specification, and avoiding crates which do not fully comply to the specification, at the same time.

5
contributors
Get started
820 commitsLast commitย โ‰ˆย 1 month ago5 stars4 forks

Cite this software

Description

ro-crate-java

Java CI with Gradle
Coverage Status
CodeQL
Publish to Maven Central / OSSRH

A Java library to create and modify RO-Crates.
The aim of this implementation is to not require too deep knowledge of the specification,
and avoiding crates which do not fully comply to the specification, at the same time.

Use it in your application

Build the library / documentation

  • Building (with tests): ./gradlew clean build
  • Building (without tests): ./gradlew clean build -x test
  • Building with release profile: ./gradlew -Dprofile=release clean build
  • Doing a release: ./gradlew -Dprofile=release clean build release
    • Will prompt you about version number to use and next version number
    • Will make a git tag which can later be used in a GitHub release
      • A GitHub release will trigger the CI for publication. See also .github/workflows/publishRelease.yml.
  • Build documentation: ./gradlew javadoc

On Windows, replace ./gradlew with gradlew.bat.

RO-Crate Specification Compatibility

Quick-start

ro-crate-java makes use of the builder pattern to guide the user to create a valid RO-Crate, similar to:

RoCrate myFirstCrate = STARTER_CRATE
    .addDataEntity(
        new FileEntity.FileEntityBuilder()
            .setId("path/within/crate/survey-responses-2019.csv")
            .setLocation(Paths.get("path/to/current/location/experiment.csv"))
            .addProperty("name", "Survey responses")
            .addProperty("contentSize", "26452")
            .addProperty("encodingFormat", "text/csv")
            .build()
    )
    .addDataEntity(/*...*/)
    .addContextualEntity(/*...*/)
    .build();

A built or imported crate can of course also be modified afterwards. Take a look at our further documentation:

Logo of RO Crate Java
Keywords
Programming languages
  • Java 98%
  • FreeMarker 1%
  • HTML 1%
License
</>Source code
Packages
central.sonatype.com
Software Heritage
Archived | swh:1:dir:71c4170b98dedd75f9269f702562ce1e5e0b5295

Participating organisations

Karlsruhe Institute of Technology (KIT)

Contributors

AP
Andreas Pfeil
NT
Nikola Tzochev
SC
Sabrine Chelbi
Karlsruher Institut fรผr Technologie
JS
Jonas Scholz
TJ
Thomas Jejkal
Karlsruher Institut fรผr Technologie

Helmholtz Program-oriented Funding IV

Related projects

HMC

Helmholtz Metadata Collaboration

Updated 19 months ago

Related software

NovaCrate

NO

Web-based interactive editor for creating, editing and visualizing research object crates.

Updated 10 months ago
1
The Helmholtz RSD will undergo scheduled maintenance on Thursday, 19. November 2026, from 13:00 to 14:00 CET. During this time, the service may be unavailable. We apologise for any inconvenience and appreciate your understanding.