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

Type coercion only for data types or @id #24

Open
brechtvdv opened this issue Feb 11, 2021 · 3 comments
Open

Type coercion only for data types or @id #24

brechtvdv opened this issue Feb 11, 2021 · 3 comments
Assignees
Labels

Comments

@brechtvdv
Copy link
Collaborator

brechtvdv commented Feb 11, 2021

In the OSLO JSON-LD contexts, we specify in the @type not only data types, but also the class of which the object will be an instance of. For example:

"Gebouw.geometrie": {
    "@id": "https://data.vlaanderen.be/ns/gebouw#Gebouw.geometrie",
    "@type": "https://data.vlaanderen.be/ns/gebouw#2DGebouwgeometrie"
  }

However, the value of @type can only be used for data types (https://www.w3.org/TR/json-ld11/#type-coercion) or specifying that it will be an identifier (@type=@id).

Becauses of theses classes, the compaction of JSON-LD does not work properly, for example:
https://tinyurl.com/y6esqw4m

We retrieve "https://data.vlaanderen.be/ns/gebouw#Gebouw.geometrie" instead of "Gebouw.geometrie", because @type can only be @id for objects:
https://tinyurl.com/yy23xgzs

When the object of the term is not a datatype, I suggest to make "@type": "@id", for example:

"Gebouw.geometrie": {
    "@id": "https://data.vlaanderen.be/ns/gebouw#Gebouw.geometrie",
    "@type": "@id"
  }
@brechtvdv brechtvdv added the bug label Feb 11, 2021
@brechtvdv brechtvdv changed the title Type coercion only for data types Type coercion only be for data types or @id Feb 11, 2021
@brechtvdv brechtvdv changed the title Type coercion only be for data types or @id Type coercion only for data types or @id Feb 11, 2021
@brechtvdv
Copy link
Collaborator Author

Related to ScorpioBroker/ScorpioBroker#199

@bertvannuffelen
Copy link
Collaborator

Brecht,

Gebouw is een jsonld context van Toolchain 1.0.
Kan je eens kijken naar context van recenter data standaarden zoals cultureel erfgoed?

Het probleem is dat we niet zomaar verbeteringen aan de context kunnen brengen voor alle data standaarden.

Bert

@brechtvdv
Copy link
Collaborator Author

Bij cultureel erfgoed zie ik dat het wel goed staat.

De oudere data standaarden moeten waarschijnlijk omgezet worden met toolchain 2.0?

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

No branches or pull requests

2 participants