Re: question on on shacl semantics

addition: The results to 1) and 2) are discuss-worthy though.. 
(depending on how the specification of closed shapes as currently stated 
is understood)

"The SHACL core language includes a construct called 
sh:ClosedShapeConstraint that can be assigned to a shape via the 
property sh:constraint to indicate that valid resources must only have 
values for those properties that have been explicitly declared via 
sh:property. "

regards,
simon

---
DDipl.-Ing. Simon Steyskal
Institute for Information Business, WU Vienna

www: http://www.steyskal.info/  twitter: @simonsteys

Am 2015-09-09 14:41, schrieb Simon Steyskal:
> 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:49:19 UTC