SEMICeu / DCAT-AP

This is the issue tracker for the maintenance of DCAT-AP
https://joinup.ec.europa.eu/solution/dcat-application-profile-data-portals-europe
72 stars 24 forks source link

SHACL / Missing `sh:path` in rules? #365

Closed fxprunayre closed 2 months ago

fxprunayre commented 2 months ago

Jena fails to parse SHACL shapes due to missing path:

No sh:path on a property shape: 
node=<https://semiceu.github.io/DCAT-AP/releases/3.0.0/html/shacl/shapes.ttl#DatasetSeries_Shape> 
sh:property _:B1f2b5d2b47a093d15d2dd175eb75559e

Probably related to https://github.com/apache/jena/issues/2129

Intellij also report an error on those rules:

Invalid cardinality: expected min 1: Got count = 0
Broader shape:
shsh:PropertyShapeShape
Shape:
[__:o:9683 in shsh.ttl]
Path:
sh:path
SHACL:
sh:path
Component:
sh:MinCountConstraintComponent

image

For the series, I'm not 100% sure sh:inversePath dcat:inSeries; and sh:path [ sh:inversePath dcat:inSeries; ]; are equivalent.

Also when validating a series only, this rule will always fails when the dataset is not in the graph - but that's another discussion.

fxprunayre commented 2 months ago

Fixed in https://github.com/SEMICeu/DCAT-AP/commit/591fae6038c6f7c06f25d29b39d2df4f30edcd4f