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

feat: extend JSON-LD context and update examples #139

Merged
merged 3 commits into from Sep 14, 2023

Conversation

mkollenstart
Copy link
Member

This pull request adds an extended JSON-LD context to allow creation of more concise JSON-LD documents while preserving the meaning of the document.

Directives are added (in /common/schema/context.json) to:

  • Specify a default language for dct:title
  • Specify default XSD types for dct:issued, dct:modified, dct:created, dcat:byteSize, and dcat:endpointURL
  • Allow shorthand @id references for dspace:agreementId, dspace:dataset, dspace:transportType, dspace:state, dct:publisher, dct:format, dct:type, odrl:assigner, odrl:assignee, odrl:action, odrl:target, odrl:leftOperand, odrl:operator, odrl:rightOperandReference, and odrl:profile
  • Set container type to ensure properties are compacted to arrays for dspace:reason, dspace:catalog, dspace:filter, dct:description, dcat:keyword, dcat:service, dcat:dataset, odrl:hasPolicy, odrl:permission, odrl:prohibition, odrl:duty, and odrl:constraint

Aspect that might need further discussion:

  • Descriptions (dct:description) and keywords (dct:keyword) do not have a default language. Which might give errors in handling those. For example, descriptions in multiple languages can be provided, requiring those to be objects with @language and @value properties, while on most scenario's these will be given in english which would allow them to be compacted to plain strings. Having these two options will make (de)serialization more difficult. This could be solved in implementations by using a separate context for compaction that transforms all of these into an object form.
  • The dspace:reason properties are difficult to model in JSON-LD in the current form, as these are free-form types. Which results in the fact that those are not well suitable for JSON-LD processing.

The @context references to https://w3id.org/dspace/v0.8/context.json are replaced by https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/main/common/schema/context.json to allow JSON-LD algorithms to resolve the context (after this pull request has been merged). This is done for all references to this context, so also in the figures and schemas. This should be reverted to a stable link in the future.

Closes #132
Closes #125

@ssteinbuss
Copy link
Member

blocked by #142

contentwise good and currently no comments, but we have an open issue with the github raw links that need to be resolved first (see #142 )

@mkollenstart
Copy link
Member Author

I've added a commit reverting back to the w3id link for the context references.
This will require implementations in the time between having the w3id setup (as discussed in #142) to manually override the context loading of JSON-LD libraries.

@juliapampus juliapampus changed the title 132 timestamp format string or complex object feat: extend JSON-LD context and improve processing Sep 14, 2023
@juliapampus juliapampus changed the title feat: extend JSON-LD context and improve processing feat: extend JSON-LD context and update examples Sep 14, 2023
@juliapampus juliapampus merged commit 68a89d9 into main Sep 14, 2023
1 check passed
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.

timestamp format string or complex object? Discuss impact of 'compactArrays' in JsonLD
4 participants