Hi Andy,

> On May 10, 2020, at 2:53 PM, Andy Seaborne <a...@apache.org> wrote:
> 
> On 08/05/2020 21:34, Chris Tomlinson wrote:
> 
>> 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'
> 
> Maybe it's email corruption but that isn't the invocation syntax.
> 
> That should have ?graph=
> 
> Otherwise it defaults to "?graph=default" which seems consistent with the 
> report.
> 
> "?http://purl.bdrc.io/graph/P707"; is going to be ignored and for you that's 
> the union default graph.

I’ve tried adding query= parameter and it doesn’t make any difference:

curl -s GET http://ldspdi-dev.bdrc.io/shapes/core/PersonShapes | curl -XPOST 
--data-binary @-  --header 'Content-type: text/turtle' 
'http://host:port/fuseki/newcorerw/shacl?query=http://purl.bdrc.io/graph/P707'

I get the same results as I reported. When using PersonShapes I see:

[ 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
               ]
] .

Regardless of whether a Person graph (P707), Work graph (W1FPL1), or no graph 
(NO_GRAPH) is used.

When using WorkShapes everything reports sh:conforms true ;.

I have written small test cases using the jena-shacl libs that fetch the above 
shapes and target graphs and they produce expected validation results. 

To fully conform some elements of the dataset union graph are needed which is 
why I’m investigating the shacl endpoint as a way of performing validation of  
single graph in the context of the entire dataset.


>> 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.
> 
> You can add a constraint that is always triggered.
> 
> [] sh:targetNode ex:myNode
> 
> is always triggered; it does not require ex:myNode to be in the data.
> 
> From there, a SPARQL constraint could do any validations for "right graph", 
> "empty graph" etc.

Thanks for the pointer. I’ll explore this idea once I get more understanding.

Also, what is the relationship of jena-shacl to TopBraid SHACL API 
<https://github.com/TopQuadrant/shacl>?

Thanks,
Chris


Reply via email to