Re: on what is a shape

Dear Peter, thank you for your comments
note that this is an unofficial response that is not necessarily endorsed
by the WG

We updated the definition of a shape can you check if this looks good to
you now?

based on your question, you are right, there is no way to determine if a
node is a shape when the sh:hasShape SPARQL function is used.
This is evaluated during runtime and unless one uses a customised SPARQL
engine there is no way to get this information back from a SHACL Processor.

Best,
Dimitris


On Tue, Oct 4, 2016 at 8:25 PM, Peter F. Patel-Schneider <
pfpschneider@gmail.com> wrote:

> 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
>
>


-- 
Dimitris Kontokostas
Department of Computer Science, University of Leipzig & DBpedia Association
Projects: http://dbpedia.org, http://rdfunit.aksw.org,
http://aligned-project.eu
Homepage: http://aksw.org/DimitrisKontokostas
Research Group: AKSW/KILT http://aksw.org/Groups/KILT

Received on Tuesday, 11 October 2016 15:02:13 UTC