FAIRDataPoint
FAIRDataPoint copied to clipboard
Add SHACL validation using SHACL-SHACL
supersedes #95
@kburger there is some issue resulting in org.eclipse.rdf4j.sail.shacl.ast.ShaclUnsupportedException
for the shacl-shacl.ttl
(based on #95), any idea why that happends? 😕
@kburger there is some issue resulting in
org.eclipse.rdf4j.sail.shacl.ast.ShaclUnsupportedException
for theshacl-shacl.ttl
(based on #95), any idea why that happends? 😕
I'm guessing certain features in the shacl-shacl are not supported. https://rdf4j.org/documentation/programming/shacl/#supported-shacl-features states for example:
sh:path
is limited to single predicate paths, e.g.ex:age
or a single inverse path. Sequence paths, alternative paths and the like are not supported.
shacl-shacl contains a lot of those, so maybe that causes the exception to be thrown instead of a shacl violation report. One option is to postpone this feature until we have a library that supports it. Alternative is to slim down the shacl-shacl shapes to the supported features from rdf4j's shacl validation.
shacl-shacl contains a lot of those, so maybe that causes the exception to be thrown instead of a shacl violation report. One option is to postpone this feature until we have a library that supports it. Alternative is to slim down the shacl-shacl shapes to the supported features from rdf4j's shacl validation.
Hmmm 🤔 Maybe having there an exclusion mechanism for all triples with predicates not listed in ShaclSail.getSupportedShaclPredicates()
would be an actually good way to go. Even now, when someone creates a schema with unsupported predicates, the validation will always fail... What do you think?
shacl-shacl contains a lot of those, so maybe that causes the exception to be thrown instead of a shacl violation report. One option is to postpone this feature until we have a library that supports it. Alternative is to slim down the shacl-shacl shapes to the supported features from rdf4j's shacl validation.
Hmmm 🤔 Maybe having there an exclusion mechanism for all triples with predicates not listed in
ShaclSail.getSupportedShaclPredicates()
would be an actually good way to go. Even now, when someone creates a schema with unsupported predicates, the validation will always fail... What do you think?
Worth a try. Would we then warn about unsupported triples and reject the shape? Or silently ignore them? (sounds like the worst option of the two).
Worth a try. Would we then warn about unsupported triples and reject the shape? Or silently ignore them? (sounds like the worst option of the two).
That would require some validation reporting back what will be ignored... and some unsupported things are also a bit more complicated than just a predicate not in a list (as you indicated the one with sh:path
or nested sh:property
).
@kburger It seems that after rebasing to the newest develop (with new version of RDF4J) this passes all tests. Question is whether we want to still improve something here...
Next step: check error messages and possibly improve what is displayed in the client