Hello, I’ve enabled a shacl endpoint as described in Apache Jena Shacl <https://jena.apache.org/documentation/shacl/> and have some questions.
Our objective in using the endpoint is to be able to validate a given resource graph in the tdb:unionDefaultGraph against a given shapes graph. 1) I added: fuseki:endpoint [ fuseki:operation fuseki:shacl ; fuseki:name "shacl" ] ; to the Fuseki assembler file for a dataset and restarted, and it is reachable. One observation is that using the above “new style” endpoint declaration apparently can be replaced by: fuseki:serviceShacl "shacl" ; I’m not sure about this but the comment in the doc: > This is not installed into a dataset setup by default; a configuration file > using fuseki:serviceShacl is necessary seems to suggest it sort of. 2) In any event, when I call the endpoint like: curl -s GET http://ldspdi-dev.bdrc.io/shapes/core/PersonShapes | curl -XPOST --data-binary @- --header 'Content-type: text/turtle' 'http://ahost:aport/fuseki/newcorerw/shacl?http://purl.bdrc.io/graph/P707' I see a result like: [ a sh:ValidationReport ; sh:conforms false ; sh:result [ a sh:ValidationResult ; sh:focusNode bdr:UNKNOWN_Person ; sh:resultMessage "minCount[1]: Invalid cardinality: expected min 1: Got count = 0" ; sh:resultPath bdo:personName ; sh:resultSeverity sh:Violation ; sh:sourceConstraintComponent sh:MinCountConstraintComponent ; sh:sourceShape bds:PersonShape-personName ] ] . which is surprising given that there’s no reference in the graph http://purl.bdrc.io/graph/P707 <http://purl.bdrc.io/graph/P707> that refers eventually to bdr:UNKNOWN_Person. The P707 graph is a Person graph. I’ve also tried using an encoded url, http%3a%2f%2fpurl.bdrc.io%2fgraph%2fP707, but that makes no difference. In fact, using a non-Person graph like http://purl.bdrc.io/graph/W12827 <http://purl.bdrc.io/graph/W12827> produces the same result. As does, submitting a non-existent graph URL like http://no.such.org/flip/flop <http://no.such.org/flip/flop>. This all leads me to conclude that SHACL-Validation#L61 <https://github.com/apache/jena/blob/ab7882a73445c7a75e811eb58d06211c410891b0/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SHACL_Validation.java#L61> isn’t getting in a way that I understand. I haven’t found any logging that gives any helpful entries and so I’m asking questions rather than diving deeper for now. If I use another shape graph like http://ldspdi-dev.bdrc.io/shapes/core/WorkShapes <http://ldspdi-dev.bdrc.io/shapes/core/WorkShapes>, then I get a result like: [ a sh:ValidationReport ; sh:conforms true ] . again regardless of the graph argument. I don’t understand the results. 3) This result leads to a related question. It seems that a result of: sh:conforms true means that the data graph conforms to the shapes graph in all respects where the shapes graph picks out features in the data graph, even if the shapes graph picks out nothing at all in the data graph. Is there any way to tell whether the shapes graph in some sense doesn’t apply to the data graph? This seems like an important distinction. I appreciate any help on these questions, Chris