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

Hi Holger,

I think there is a typo in your example, it should be sh:scopeClass.

For me it is fine to have this as syntactic sugar for Karen's use case but
we need to be more precise on how this will work with scoping in general.
Does this constraint apply on the union of all defined scopes or per
defined scope ?

e.g. consider this example
ex:MyPersonShape
    a sh:Shape ;
    sh:scopeClass  ex:Doctor, ex:Patience ;
    sh:scopeNode ex:DrWho, ex:Bob
    sh:scopeProperty ex:operated
    sh:scopeInverseProperty ex:operated
    sh:constraint [
        sh:minInstanceCount 1 ;
        sh:maxInstanceCount 1 ;
    ] .

do we require 1 doctor, 1 Patience, 1 ...
or only 1 of all together?

Also, what would be the definition when this constraint is referenced from
e.g. sh:shape?
ex:MyHospitalShape
   a sh:Shape
   sh:scopeClass ex:Hospital
   sh:property [
       sh:predicate ex:personStayed
       sh:shape ex:MyPersonShape
  ]

does the constraint apply an all hospitals with a property ex:personStayed
( ex:Hospital[ex:stayed]) ?

Best
Dimitris

On Mon, Jun 13, 2016 at 3:04 PM, RDF Data Shapes Working Group Issue
Tracker <sysbot+tracker@w3.org> 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 ;
>     ] .
>
>
>
>


-- 
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 Monday, 13 June 2016 17:34:10 UTC