Re: shapes-ISSUE-34 (OrConstraint): 2 disjuncts at a time in sh:OrConstraint [SHACL Spec]

Hi!

> Could you confirm this works for you, Simon?

Exactly what I had in mind!

thx, simon

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

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

Am 2015-04-02 08:30, schrieb Holger Knublauch:
> I'd be happy to change this to an rdf:List of shapes. An example of
> that would look like:
> 
> ex:RectangleWithArea
>     a rdfs:Class ;
>     rdfs:subClassOf rdfs:Resource ;
>     sh:constraint [
>         a sh:OrConstraint ;
>         sh:shapes (
>         [
>             sh:property [
>                 sh:predicate ex:width ;
>                 sh:minCount 1 ;
>             ] ;
>             sh:property [
>                 sh:predicate ex:height ;
>                 sh:minCount 1 ;
>             ]
>         ]
>         [
>             sh:property [
>                 sh:predicate ex:area ;
>                 sh:minCount 1 ;
>             ]
>         ] )
>     ] .
> 
> The body of the sh:OrConstraint in SPARQL would then be
> 
>             SELECT *
>             WHERE {
>                 FILTER NOT EXISTS {
>                     ?shapes rdf:rest*/rdf:first ?shape .
>                     FILTER sh:hasShape(?this, ?shape) .
>                 }
>             }
> 
> I assume this is better than what's in the current draft, so unless I
> hear objections I'll update the proposal tomorrow.
> 
> Could you confirm this works for you, Simon?
> 
> Thanks,
> Holger
> 
> 
> On 4/2/2015 16:01, RDF Data Shapes Working Group Issue Tracker wrote:
>> shapes-ISSUE-34 (OrConstraint): 2 disjuncts at a time in 
>> sh:OrConstraint [SHACL Spec]
>> 
>> http://www.w3.org/2014/data-shapes/track/issues/34
>> 
>> Raised by: Simon Steyskal
>> On product: SHACL Spec
>> 
>> I was wondering whether we want to "limit" ourselves to 2 disjuncts 
>> (i.e. sh:shape1 & sh:shape2) at a time, rather than having potentially 
>> n disjuncts as proposed by Eric's "sh:choice" construct.
>> 
>> Ofc, one could nest another sh:OrConstraint within sh:shape2 and if 
>> necessary another one in the nested one and so forth, but I guess this 
>> gets pretty ugly/verbose very quickly.
>> 
>> Any thoughts on this? Or am I missing something?
>> 
>> cheers,
>> simon
>> 
>> 
>> 

Received on Thursday, 2 April 2015 06:35:08 UTC