hugomanguinhas / europeana_shapes

2 stars 2 forks source link

Update to current SHACL spec ? #1

Open tfrancart opened 3 years ago

tfrancart commented 3 years ago

Hello !

Any plan to update these SHACL definitions against the official SHACL recommendation ?

Should mostly be a matter of renaming sh constructs,

We would actually be interested in an updated EDM SHACL definition to validate some data to be sent to Europeana

SvenLieber commented 3 years ago

Hi @tfrancart

we were also interested in updated EDM shapes. SHACL defines SHACL shapes for itself, we used these shapes to find violations of the EDM shapes with respect to the current SHACL spec and fixed the violations. The updated shapes as well as documentation what we changed is documented here: https://github.com/RMLio/social-media-archiving/tree/master/data-quality/shapes/europeana-shapes

Actually I would like to verify (besides syntactical SHACL correctness) that the shapes "still work". This repository here contains some test cases but so far I wasn't able to execute them.

tfrancart commented 3 years ago

Thanks. I Found an sh:filterShape that is not part of the spec here : https://github.com/RMLio/social-media-archiving/blob/master/data-quality/shapes/europeana-shapes/WebResource.ttl#L146 - Maybe elsewhere too. Don't know exactly what this was used for.

SvenLieber commented 2 years ago

Filter shapes are indeed not part of the SHACL core spec, however, they belong to SHACL-AF (advanced features) https://www.w3.org/TR/shacl-af/#node-expressions-filter-shape. Apparently filter shapes provide instructions to a SHACL engine how to compute as set of nodes (of course to engines "understanding" SHACL-AF).

There are two occurrences of filter shapes in WebResource.ttl and they are used to represent two different behaviors for dct:issued, one shape should only be applied on literal values of dct:issued and one shape should only be applied on IRI values of dct:issued (to ensure they are instances of edm:TimeSpan).

I think this could be represented with SHACL-core by using sh:or instead. I will test it and update if successful.