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

Add json-ld context #57

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brechtvdv
Copy link
Contributor

No description provided.

context.jsonld Outdated Show resolved Hide resolved
@pietercolpaert
Copy link
Member

pietercolpaert commented Dec 11, 2024

Thanks @brechtvdv! If @EmidioStani’s comment can be addresses I think this is good to go!

Not blocking for the approval:

  • I wonder whether we can automate this process somehow, or at least document that when adding a term to the vocabulary, we need to add it in the .ttl file and in the context file.
  • We should also discuss whether we want to add a vocabulary section in the specification itself, and whether we want to add a SHACL shape to test conformance.

@brechtvdv
Copy link
Contributor Author

brechtvdv commented Dec 12, 2024

Shouldn't we also add "@type": "@id" and "container": "@list" to "relations" and "view"?

@pietercolpaert
Copy link
Member

  • Container @list: certainly not as it’s not an rdf:List
  • @type:@id: Would be a good idea for completeness sake, but not entirely necessary as you most probably won’t be using a JSON string value for the view thing but another object. I.e. you’ll do this:
{
 "@context": "https://w3id.org/ldes/context",
 "@id": "MyCollection",
 "view": {
    "@id":"", → indicating a relative IRI to the current page
    "relations": [ 
       {
          "@type": "tree:GreaterThanRelation",
          ...
       }
    ]
 },
 "members": [
    {
      ...
     }
 
 ]
}

Something we must do however is add a symbolic link from context to context.jsonld

By creating this JSON-LD example I also wonder whether it’s a good idea to changer the tree:member property in the plural members, but I guess in JSON that does make sense as we’re going to use an array then. The downside of it is that people might start confusing the IRI tree:member with an non-existing plural IRI.

context.jsonld Outdated Show resolved Hide resolved
@brechtvdv
Copy link
Contributor Author

Thanks for the comments. Why not "views" as there can be multiple?

@pietercolpaert
Copy link
Member

No: a page that is the one that has been fetched at this moment only has 1 tree:view property from the collection to the current page.

@brechtvdv
Copy link
Contributor Author

But when this context is used at a catalogue page, there can be multiple?

@pietercolpaert
Copy link
Member

This is currently not well worked out, how a catalog should look like. While I see implementations using it for that purpose I would actually refrain from doing that. See https://treecg.github.io/specification/discovery

@brechtvdv
Copy link
Contributor Author

A PR is opened for the symbolic link: perma-id/w3id.org#4600

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.

3 participants