on what is a shape

Just what are shapes?

The terminology section says:

"Shape
A shape is a node in a shapes graph that is typically a SHACL instance of
sh:Shape. A shape provides a collection of targets, filters, constraints and
parameters of constraint components that specify how a data graph is
validated against the shape. Shapes can also provide non-validating
information, such as labels and comments."

Section 2 says:

"Shapes define constraints that a set of focus nodes can be validated
against."

This doesn't, however, provide guidance in determining what the shapes in a
shapes graph are.


Consider the following shapes graph:

[prefix stuff as needed]

s:s1 a sh:Shape ;
  sh:targetClass ex:c1 ;
  sh:nodeKind sh:IRI ;
  ex:p ex:q .

s:s2 a sh:Shape ;
  sh:targetClass ex:c1 ;
  ex:p ex:q .

s:s3 a sh:Shape ;
  sh:nodeKind sh:IRI ;
  ex:p ex:q .

s:s4 a sh:Shape ;
  ex:p ex:q .

s:s5 sh:targetClass ex:c1 ;
  sh:nodeKind sh:IRI ;
  ex:p ex:q .

s:s6 sh:targetClass ex:c1 ;
  ex:p ex:q .

s:s7 sh:nodeKind sh:IRI ;
  ex:p ex:q .

s:s8 ex:q ex:p .

s:s9 a sh:Shape ;
  sh:targetClass ex:c1 ;
  sh:sparql [
    sh:select
      ""SELECT $this WHERE {
       GRAPH $shapesGraph { $currentShape ex:p ?shape }
       BIND (sh:hasShape($this, ?shape) AS ?hasShape)
       BIND (!bound(?hasShape) AS ?failure) .
       FILTER (?failure || ?hasShape) . }""" ] ;
  ex:p ex:q .

s:s10 rdf:type sh:Shape ;
  sh:targetClass ex:foo ;
  sh:sparql [
    sh:select
      """SELECT $this WHERE {
        $this s:shape ?shape ;
 BIND (sh:hasShape($this,?shape,$shapesGraph) AS ?hasShape)
        BIND (!bound(?hasShape) AS ?failure )
        FILTER (?failure || !?hasShape) }""" ] .

Which of the ex:si are shapes and which are not shapes?  Are there any nodes
in the graph besides the ex:si that are shapes?

Peter F. Patel-Schneider
Nuance Communications

Received on Tuesday, 4 October 2016 17:26:09 UTC