Re: shapes-ISSUE-168 (instance count): How to constrain number of instances of a class in a graph [SHACL - Core]

My preference overall would be to not use classes at all in validation; 
to have all operations on triples, and rdf:type would be simply a 
predicate like any other. (I believe that ShEx takes this approach.) 
However, if you encourage people to view the objects of rdf:type as 
classes, then you have to allow them to do so throughout,  otherwise it 
becomes difficult to explain "when is a class not a class?".

With the solution in this proposal, we have what to the user is a class 
but it does not use scopeClass, and scopeNode binds to the subject of a 
triple, AFAI can determine. The below would not match the schema.org 
example.[1]

kc
[1] http://schema.org/FlightReservation


On 6/13/16 5:04 AM, RDF Data Shapes Working Group Issue Tracker wrote:
> shapes-ISSUE-168 (instance count): How to constrain number of instances of a class in a graph [SHACL - Core]
>
> http://www.w3.org/2014/data-shapes/track/issues/168
>
> Raised by: Holger Knublauch
> On product: SHACL - Core
>
> There was recent discussion about how to specify min/max numbers of instances in a graph.  Off-list I had also received a question from schema.org people about how to state that a graph/message must have exactly one instance of schema:FlightReservation, possibly to ensure that a graph has a starting point/root for validation.
>
> A possible syntax that would easily work with the current architecture could be
>
> ex:MyShape
>     a sh:Shape ;
>     sh:scopeNode schema:FlightReservation ;
>     sh:constraint [
>         sh:minInstanceCount 1 ;
>         sh:maxInstanceCount 1 ;
>     ] .
>
>
>
>

-- 
Karen Coyle
kcoyle@kcoyle.net http://kcoyle.net
m: 1-510-435-8234
skype: kcoylenet/+1-510-984-3600

Received on Friday, 17 June 2016 17:10:58 UTC