Skip to content

Add support for detached crates - #29

Open
OliverWoolland wants to merge 1 commit into
gettersfrom
detached-crates
Open

OliverWoolland wants to merge 1 commit into
gettersfrom
detached-crates

Conversation

@OliverWoolland

Copy link
Copy Markdown
Contributor

Hopefully I've not interpreted the spec wrong... I think most detached crate requirements are in the hands of users and this PR adds enough for people to produce valid detached crates - admittedly without many safety rails.

Adds the ability to give the root data entity an absolute URI @id, defaults to ./ i.e. standard crate

Output filename is in the hands of users


This pull request introduces support for creating both standard and "detached" RO-Crates by allowing a custom root data entity identifier to be specified when constructing an ROCrate. The changes update the class API and implementation, and add new unit tests to verify the new behavior.

API and Implementation Changes:

  • The ROCrate constructor now accepts an optional rootDataEntityId parameter (defaulting to "./"), enabling creation of detached RO-Crates when a custom URI is provided.
  • The constructor implementation is updated to use the provided rootDataEntityId when creating the root dataset entity, instead of always using "./".

Testing Enhancements:

  • Added unit tests to verify:
    • Creation of a detached RO-Crate with a custom root data entity ID.
    • That the metadata descriptor in a detached RO-Crate links to the custom root data entity.
    • That a standard RO-Crate is produced if no root data entity ID is provided.

@OliverWoolland
OliverWoolland added this pull request to stack #28 November 24, 2026 07:02
@OliverWoolland OliverWoolland linked an issue Nov 24, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support creating detached crates

1 participant