Informatievlaanderen / OSLO-EA-to-RDF

European Union Public License 1.2
8 stars 2 forks source link

Type coercion only for data types or @id #24

Open brechtvdv opened 3 years ago

brechtvdv commented 3 years ago

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 commented 3 years ago

Related to https://github.com/ScorpioBroker/ScorpioBroker/issues/199

bertvannuffelen commented 3 years ago

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 commented 3 years ago

Bij cultureel erfgoed zie ik dat het wel goed staat.

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