Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove heuristic for nested ro-crate metadata files #365

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stain
Copy link
Contributor

@stain stain commented Oct 24, 2024

This algorithm appendum to look for ..../ro-crate-metadata.json URLs seems unnecessary as such JSON-LDs is not conforming to 1.2, 1.1, 1.0 nor 0.2

@stain
Copy link
Contributor Author

stain commented Oct 24, 2024

I think the fall-back algorithm was added by @simleo in #198 -- so Simone, was there some cases of RO-Crates with absolute URI for their ro-crate-metadata.json entity? That would violate MUST in RO-Crate 1.2, 1.1, 1.0, 0.2 but I can see it happening if you have absolutized the RO-Crate metadata file by parsing it as JSON-LD.

@simleo
Copy link
Contributor

simleo commented Oct 25, 2024

I think the fall-back algorithm was added by @simleo in #198 -- so Simone, was there some cases of RO-Crates with absolute URI for their ro-crate-metadata.json entity? That would violate MUST in RO-Crate 1.2, 1.1, 1.0, 0.2 but I can see it happening if you have absolutized the RO-Crate metadata file by parsing it as JSON-LD.

Since 1.2, detached RO-Crates can have an absolute URI for their ro-crate-metadata.json entity (and their root data entity), can't they? What I added to the spec was meant to support such detached crates, and is already supported by ro-crate-py, See find_root_entity_id.

@simleo
Copy link
Contributor

simleo commented Oct 25, 2024

https://www.researchobject.org/ro-crate/specification/1.2-DRAFT/root-data-entity.html says:

If the root data entity @id is an absolute URI, the RO-Crate is considered web-based: in this case, the metadata descriptor SHOULD also have an absolute URI as its @id, which MUST have ro-crate-metadata.json (or ro-crate-metadata.jsonld in legacy crates) as its last path segment.

@stain
Copy link
Contributor Author

stain commented Oct 31, 2024

https://www.researchobject.org/ro-crate/specification/1.2-DRAFT/root-data-entity.html says:

If the root data entity @id is an absolute URI, the RO-Crate is considered web-based: in this case, the metadata descriptor SHOULD also have an absolute URI as its @id, which MUST have ro-crate-metadata.json (or ro-crate-metadata.jsonld in legacy crates) as its last path segment.

Well spotted, and that would be why this algorithm was there. That would however be inconsistent with https://www.researchobject.org/ro-crate/specification/1.2-DRAFT/root-data-entity.html#ro-crate-metadata-descriptor which locks down the name:

The RO-Crate Metadata Document MUST contain a self-describing RO-Crate Metadata Descriptor with the @id value ro-crate-metadata.json (or ro-crate-metadata.jsonld in legacy crates for RO-Crate 1.0 or older) and @type CreativeWork. This descriptor MUST have an about property referencing the Root Data Entity’s @id.

Perhaps a second MUST should be included there on the @id? I think we have to decide one or the other.. also there is @base coming into the picture but I assume we're talking in JSON land rather than triple land here.

@ptsefton you have been making detached crates, what have you named the metadata descriptor? In Dataverse for instance it is just called "ro-crate-metadata.json" (but that has not made it a proper detached crate yet)

@simleo
Copy link
Contributor

simleo commented Nov 4, 2024

There is another hint at the fact that ro-crate-metadata.json can be an arbitrary URI in the section on detached crates:

Finding the Root Data Entity can be harder for consumers of detached crates, particularly if the platform serving the RO-Crate Metadata Document is unable to ensure the URI path ends with …/ro-crate-metadata.json.

@stain
Copy link
Contributor Author

stain commented Nov 14, 2024

Decided 2024-11-14

Delete "If the root data entity @id is an absolute URI, the RO-Crate is considered web-based: in this case, the metadata descriptor SHOULD also have an absolute URI as its @id, which MUST have ro-crate-metadata.json (or ro-crate-metadata.jsonld in legacy crates) as its last path segment"

Add Fallback for "ro-crate-metadata.jsonld" for RO-Crate 1.0

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.

2 participants