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

Support type-scoped context for external references #49

Open
joachimvh opened this issue May 10, 2021 · 2 comments
Open

Support type-scoped context for external references #49

joachimvh opened this issue May 10, 2021 · 2 comments

Comments

@joachimvh
Copy link
Member

Issue type:

  • ➕ Feature request

Description:

Wasn't sure how to clearly phrase accurately, or if this is something that can be solved. The problem is that type-scoped context only work in blocks where the @type key is present. For example: I define an instance in a file such as:

{
  "@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^0.0.0/components/context.jsonld",
  "@graph": [
    {
      "comment": "Supports default Solid behaviour on any kind of data accessor.",
      "@id": "urn:solid-server:default:ResourceStore_DataAccessor",
      "@type": "DataAccessorBasedStore",
      "identifierStrategy": { "@id": "urn:solid-server:default:IdentifierStrategy" },
      "auxiliaryStrategy": { "@id": "urn:solid-server:default:AuxiliaryStrategy" }
    }
  ]
}

In another file I then want to import this class and link it to a data accessor like this:

    {
      "@id": "urn:solid-server:default:ResourceStore_DataAccessor",
      "accessor": {
        "@id": "urn:solid-server:default:MemoryDataAccessor"
      }
    }

This doesn't work though: Components.js will error here that the accessor predicate is not defined since I guess the type-scoped context doesn't work there since the type field is set somewhere else. Would be nice if there was some way to also make it work there.

@github-actions
Copy link

Thanks for the suggestion!

@rubensworks
Copy link
Member

Since type-scoped contexts work on syntax-level within a single document, they are not aware of data coming from other documents.

I get what you want, but I'm not sure myself how to achieve it in a JSON-LD-compliant manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants