-
Notifications
You must be signed in to change notification settings - Fork 33
Description
We need to support writing detached crates, which means being able to select between attached/detached at some point in the create creation process. Initial ideas below.
At this point I'm not sure about a selector for attached/detached. I think ROCrate should have a property for this (e.g. is_detached), but maybe its value should be a consequence of how the RO-Crate is initialized, rather than selectable. Or the other way around. This needs to be tried in practice.
...
Support for making detached crates should definitely be added, not sure how for now. Related to the attached/detached selector issue (maybe we should merge them).
On the selector for attached / detached, maybe this should be implemented as an argument of ROCrate.write() - since it primarily affects the file structure (or lack thereof).
- if attached - follow existing behaviour
- if detached - write just the JSON-LD file, and raise an error if there are any non-web data entities.
In that case, a RO-Crate that has been read in could be written out in a different format. I think that's actually a benefit, though we could also set a flag like ROCrate.is_detached when reading a crate to modify the default behaviour (i.e. if you read a detached crate and then write it back out, it should stay detached unless you specify otherwise).