π Highlights
While we avoid breaking the API except for major versions, you may notice that you may need to do some little changes this time. This is because of fixes which inherently required this. But the fix on your side should be easy. In most cases you'll need to catch a possible exception when reading or writing crates and it should work again. Please tell us soon if something does not work for you!
- Support .ELN-style crates in all zip readers and writers by @Pfeil in #258
- πWe now support zip files which contain the crate not directly, but have a subfolder instead. This is one of the properties of the .ELN specification.
- π€ Our Zip (and ZipStream) reader will search for this implicitly, so nothing has to be changed from your side to make it work. For readers, we think this makes reading simply more reliable. Note that we do not search the whole zip file for a crate but just in the first hierarchy of subfolders. We expect only one subfolder, but to work with edge cases, ro-crate-java will consider a few more. This works around hidden thumbnail folders and other unexpected properties.
- βπΌ Our Zip (and ZipStream) writer strategies have according configuration methods to make them create such files:
usingElnStyle()andwithRootSubdirectory()do the exact same thing, just with different naming. Some may search for ELN functionality, others just want a subfolder. Forro-crate-javathis is currently the same thing.
- Make specification examples (from readme) executable by @Pfeil in #256
- πβ Some of the examples in our guide did not work properly any more. To avoid this in future, we moved them to unit tests, where they are executable and tested. The readme now points to these examples.
- You can now add a DataEntity without adding it to the roots "hasPart", by providing the ID of another entity (
addDataEntity(entity, parentId)). This other entity needs to be in the crate already in order to validate this action. You may use this to build your hierarchies as you need. - The hierarchy of files and directories is (for local files) already encoded in the file paths. You can now map this automatically to hasPart/isPartOf connections using
Crate::createDataEntityFileStructure. - Until now, we supported adding terms or full contexts (as URI) to the context. Now we also allow prefixes. They work exactly as the terms do.
- We now add, by default, new contextual entities to the crate when writing them to disk, documenting which version of ro-crate-java generated or modified the crate. It uses one entity per CreateAction or UpdateAction and one entity per ro-crate-java version. This behaviour can be disabled and customized. For more information, look into the documentation of the CrateWriter.
- Generalize reading and writing crates by @Pfeil (based on the work of @ThomasJejkal) in #247
- We deprecated the old interfaces in favour of newer, generic ones. You are now able to implement readers which read/write from/to any type of location/destination. As an example, we also provide a ZipStreamReader (and Writer) which targets streams, so you do not need to store your crate on disk before sending it around!
- Fix renaming of data set entities by @Pfeil in #253
- We noticed there was a bug in the Zip export of DataSetEntity if you set an ID different to the file's filename. If this makes you feel you might have been affected, have a look at #254. It is now fixed, and all Writers are tested for correctness (not only the folder writer) in the same way.
What's Changed
- Point to latest release in README by @fpotier in #234
- chore(deps): update dependency com.github.fslev:json-compare to v7 by @renovate[bot] in #236
- chore(deps): update plugin io.freefair.maven-publish-java to v8.13.1 by @renovate[bot] in #235
- chore(deps): update dependency font-awesome to v6 by @renovate[bot] in #239
- chore(deps): update dependency font-awesome to v6 by @renovate[bot] in #240
- chore(deps): update dependency org.junit:junit-bom to v5.12.2 by @renovate[bot] in #243
- chore(deps): update dependency commons-io:commons-io to v2.19.0 by @renovate[bot] in #244
- Fix #241: Getting key value pairs from the context by @Pfeil in #245
- Generalize reading and writing crates by @Pfeil in #247
- Fix renaming of data set entities by @Pfeil in #253
- Version 2.1.0 by @Pfeil in #233
- chore(deps): update jacksonversion to v2.19.0 by @renovate[bot] in #248
- chore(deps): update dependency gradle to v8.14 by @renovate[bot] in #250
- chore(deps): update dependency gg.jte:jte to v3.2.1 by @renovate[bot] in #249
- Fix adding id property duplicates by @Pfeil in #257
- Make specification examples (from readme) executable by @Pfeil in #256
- fix: enforce correct subfolder name for additional files in StaticPreview.saveAllToStream by @Pfeil in #261
- Support .ELN-style crates in all zip readers and writers by @Pfeil in #258
- Next Version (v2.1.0-rc2) by @Pfeil in #255
- chore(deps): update dependency gradle to v8.14.1 by @renovate[bot] in #262
- chore(deps): update dependency com.networknt:json-schema-validator to v1.5.7 by @renovate[bot] in #263
- chore(deps): update dependency org.junit:junit-bom to v5.13.0 by @renovate[bot] in #266
- Add context prefix support by @Pfeil in #267
- 265 store provenance in crates about the tool which created it by @Pfeil in #268
- chore(deps): update dependency gradle to v8.14.2 by @renovate[bot] in #270
- feat: add updateCff task to update CITATION.cff during release process by @Pfeil in #271
- Next Version (2.1.0 | 2.1.0-rc3) by @Pfeil in #264
- chore(deps): update dependency commons-io:commons-io to v2.20.0 by @renovate[bot] in #278
- chore(deps): update dependency commons-validator:commons-validator to v1.10.0 by @renovate[bot] in #277
- chore(deps): update dependency gradle to v8.14.3 by @renovate[bot] in #276
- chore(deps): update dependency com.networknt:json-schema-validator to v1.5.8 by @renovate[bot] in #275
- chore(deps): update plugin io.freefair.maven-publish-java to v8.14 by @renovate[bot] in #274
- chore(deps): update jacksonversion to v2.19.2 by @renovate[bot] in #273
- chore(deps): update dependency org.junit:junit-bom to v5.13.4 by @renovate[bot] in #272
- chore(deps): update jacksonversion to v2.20.0 by @renovate[bot] in #286
- chore(deps): update actions/setup-java action to v5 by @renovate[bot] in #285
- chore(deps): update plugin io.freefair.maven-publish-java to v8.14.2 by @renovate[bot] in #284
- chore(deps): update actions/checkout action to v5 by @renovate[bot] in #283
- chore(deps): update dependency com.github.fslev:json-compare to v7.1 by @renovate[bot] in #281
- chore(deps): update actions/upload-artifact action to v5 by @renovate[bot] in #297
- chore(deps): update dependency jacoco to v0.8.14 by @renovate[bot] in #296
- chore(deps): update github/codeql-action action to v4 by @renovate[bot] in #295
- chore(deps): update dependency com.apicatalog:titanium-json-ld to v1.7.0 by @renovate[bot] in #294
- chore(deps): update gradle/actions action to v5 by @renovate[bot] in #293
- chore(deps): update plugin io.freefair.maven-publish-java to v9 by @renovate[bot] in #290
- chore(deps): update dependency org.junit:junit-bom to v5.14.1 by @renovate[bot] in #291
- chore(deps): update dependency com.networknt:json-schema-validator to v1.5.9 by @renovate[bot] in #287
- chore(deps): update jacksonversion to v2.20.1 by @renovate[bot] in #299
- chore(deps): update dependency org.junit:junit-bom to v6 by @renovate[bot] in #292
- chore(deps): update dependency commons-io:commons-io to v2.21.0 by @renovate[bot] in #301
- fix 289 addDataEntity no longer supports toHasPart parameter by @Pfeil in #298
- Next Version (2.1.0-rc4) by @Pfeil in #279
- chore(deps): update plugin io.freefair.maven-publish-java to v9.1.0 by @renovate[bot] in #303
- chore(deps): update dependency com.github.fslev:json-compare to v7.2 by @renovate[bot] in #304
- New release candidate: fix publishing to sonatype by @Pfeil in #305
- chore(config): migrate Renovate config by @renovate[bot] in #309
- chore(deps): update actions/checkout action to v6 by @renovate[bot] in #307
- fix(deps): update dependency commons-validator:commons-validator to v1.10.1 by @renovate[bot] in #306
- Release v2.1.0 by @Pfeil in #311
Full Changelog: v2.0.2...v2.1.0