proposed test case for SHACL

Here is a good test case for SPARQL-SHACL.

Shapes Graph:

@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix ex: <http://example.org/rock/> .

ex:s1 sh:targetClass ex:Person ;
  sh:sparql [ sh:select """ SELECT $this WHERE {
    FILTER NOT EXISTS { $this
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
 <http://example.org/rock/Rock> . } } """ ] .

Data Graph:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.org/rock/> .

_:john rdf:type ex:Person .
ex:pet rdf:type ex:Rock .

Results:

Given a definition for pre-binding that matches intuitions in this case
(which is, of course, not assured) the data graph conforms to the shapes
graph.


Peter F. Patel-Schneider
Nuance Communications

Received on Thursday, 9 February 2017 00:23:20 UTC