zazuko / cube-link

Cube Schema
https://zazuko.github.io/cube-link/
Other
12 stars 8 forks source link

unexpected warning for dataKind in context of `GeoShape` #167

Closed Rdataflow closed 3 months ago

Rdataflow commented 5 months ago

Warning of XoneConstraintComponent: "Data kind should be one of the following: GeneralDateTimeDescription, GeoShape, GeoCoordinates" with path null at focus node _:b88_b88_b89_genid2d696cd65eaa3c446eb84dc77f8a8bb54f2d1FA5BF88E3E2AC483D6DB765B45E8A9C1 (source: https://cube.link/shape/shared/data-kind#DataKind)

steps to reproduce

npx barnard59 cube fetch-metadata \
  --cube https://environment.ld.admin.ch/foen/besch_holz_inst_einheit_weniger4/20 \
  --endpoint https://int.lindas.admin.ch/query \
| npx barnard59 cube check-metadata --profile https://cube.link/latest/shape/profile-visualize \
| npx barnard59 shacl report-summary

@giacomociti

giacomociti commented 5 months ago

A repro with simplified data: https://s.zazuko.com/3eHnbfF, shows that the focus node (<node1>) satisfies all three shapes (:GeneralDateTimeDescription :GeoShape :GeoCoordinates). So sh:xone fails (while sh:or would be successful).

To make sh:xone work, we may add additional constraints:

:GeoShape sh:class schema:GeoShape .
:GeoCoordinates sh:class schema:GeoCoordinates .
:GeneralDateTimeDescription sh:class time:GeneralDateTimeDescription .
Rdataflow commented 5 months ago

... or revert to sh:or whichever you choose is more appropriate to implement 👍