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
677 commitsLast commit ≈ 2 months ago4 stars3 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

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

Related projects

HMC

Helmholtz Metadata Collaboration

Updated 4 months ago