Re: question on on shacl semantics

These all correspond to my understanding of the current state of SHACL.

Closure is with respect to properties that explicitly appear in top-level
property constraints.  You can fiddle with this by adding in vacuous
constraints for the other properties or by using sh:ignoredProperties.
See http://w3c.github.io/data-shapes/shacl/#ClosedShape for more information.

peter

On 09/09/2015 05:41 AM, Simon Steyskal wrote:
> Hi!
> 
> I've tested it with TBC (there might have been some changes to SHACL that
> haven't been implemented in TBC yet):
> 
> 1) fails -> 2x "Invalid triple for closed shape", one for ex:a "value1"; and
> one for ex:b "value2";
> 2) fails -> 1x "Invalid triple for closed shape", for ex:b "value2";
> 3) no, doesn't constrain anything
> 
> cheers,
> simon
> 
> ---
> DDipl.-Ing. Simon Steyskal
> Institute for Information Business, WU Vienna
> 
> www: http://www.steyskal.info/  twitter: @simonsteys
> 
> Am 2015-09-09 14:29, schrieb Iovka Boneva:
>> Dear all,
>>
>> I'm trying to clarify (for myself) the SHACL semantics.
>>
>> Here are three examples, can somebody please tell me whether these
>> examples pass or fail for the corresponding data.
>>
>> Thanks in advance,
>> Iovka
>>
>> // Example 1: is the ex:Instance node valid for that shape ?
>>
>> ex:ClosedShapeExampleShape
>>     a sh:Shape ;
>>     sh:constraint [
>>         a sh:ClosedShapeConstraint ;
>>     ] ;
>>            sh:constraint [
>>         a sh:OrConstraint ;
>>         sh:shapes (
>>             [
>>                 sh:property [
>>                     sh:predicate ex:a ;
>>                     sh:minCount 1 ;
>>                 ]
>>             ]
>>             [
>>                 sh:property [
>>                     sh:predicate ex:b ;
>>                     sh:minCount 1 ;
>>                 ]
>>             ]
>>         )
>>     ] ;
>>     sh:property [
>>         sh:predicate ex:c ;
>>     ] .
>>
>>
>> ex:Instance
>>     ex:a "value1";
>>     ex:b "value2";
>>     ex:c "value3";
>>
>> __________________________
>>
>> // Example 2: is the ex:Instance node valid for that shape ?
>>
>> ex:ClosedShapeExampleShape
>>     a sh:Shape ;
>>     sh:constraint [
>>         a sh:ClosedShapeConstraint ;
>>     ] ;
>>            sh:constraint [
>>         a sh:OrConstraint ;
>>         sh:shapes (
>>             [
>>                 sh:property [
>>                     sh:predicate ex:a ;
>>                     sh:maxCount 0 ;
>>                 ]
>>             ]
>>             [
>>                 sh:property [
>>                     sh:predicate ex:b ;
>>                     sh:minCount 1 ;
>>                 ]
>>             ]
>>         )
>>     ] ;
>>     sh:property [
>>         sh:predicate ex:a ;
>>     ] ;
>>     sh:property [
>>         sh:predicate ex:c ;
>>     ] .
>>
>>
>> ex:Instance
>>     ex:a "value1";
>>     ex:b "value2";
>>     ex:c "value3".
>>
>>
>> ______________________
>>
>> // Example 3: Is this constraining something ? Is this valid for every node ?
>>
>> ex:AShape
>>     a sh:Shape ;
>>     sh:property [
>>         sh:predicate ex:a ;
>>     ] ;
>>     sh:property [
>>         sh:predicate ex:c ;
>>     ] .
> 

Received on Wednesday, 9 September 2015 12:57:29 UTC