Re: question on on shacl semantics

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:42:04 UTC