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

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 ;
    ] .

Received on Monday, 13 June 2016 12:04:24 UTC