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

"#" prepended automatically to ids of contextual entities #203

Open
salexan2001 opened this issue Nov 4, 2024 · 0 comments
Open

"#" prepended automatically to ids of contextual entities #203

salexan2001 opened this issue Nov 4, 2024 · 0 comments

Comments

@salexan2001
Copy link

While working with the same example data as in #202 I noticed that ro-crate-py automatically prepends "#" to the @ids of contextual entities.

E.g. the @id of:

    {
      "@id": "PASTA-ELN",
      "@type": "Organization",
      "name": "PASTA ELN",
      "logo": "https://raw.githubusercontent.com/PASTA-ELN/desktop/main/pasta.png",
      "slogan": "The favorite ELN for experimental scientists",
      "url": "https://github.com/PASTA-ELN/",
      "description": "Version 2.6.0"
    }

is automatically translated to #PASTA-ELN.

Unfortunately this translation is not applied to linking properties, e.g.:

{'@id': 'ro-crate-metadata.json',
 '@type': 'CreativeWork',
 'conformsTo': {'@id': 'https://w3id.org/ro/crate/1.1'},
 'about': {'@id': './'},
 'schemaVersion': 'v1.0',
 'version': '1.0',
 'datePublished': '2024-10-14T14:10:19.875806',
 'dateCreated': '2024-10-14T14:10:19.875848',
 'sdPublisher': {'@id': 'PASTA-ELN'}}

Here, the "sdPublisher" property that is supposed to link to the entity shown above has the value PASTA_ELN.

This behavior makes it impossible to reliably use dereference on values, because links to contextual entities might be broken.

From https://www.researchobject.org/ro-crate/specification/1.1/appendix/jsonld#describing-entities-in-json-ld I interpret that adding "#" in front of local identifiers is recommended, but not mandatory, so I don't see the necessity of automatically prepending it and possibly breaking internal references. (But I might be mistaken. In this case I would be thankful for pointing me to the respective requirement in the specification.)

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

No branches or pull requests

1 participant