feat: extend JSON-LD context and update examples #139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:dct:title
dct:issued
,dct:modified
,dct:created
,dcat:byteSize
, anddcat:endpointURL
@id
references fordspace: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
, andodrl:profile
dspace:reason
,dspace:catalog
,dspace:filter
,dct:description
,dcat:keyword
,dcat:service
,dcat:dataset
,odrl:hasPolicy
,odrl:permission
,odrl:prohibition
,odrl:duty
, andodrl:constraint
Aspect that might need further discussion:
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.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 tohttps://w3id.org/dspace/v0.8/context.json
are replaced byhttps://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