- From: Arthur Ryman <arthur.ryman@gmail.com>
- Date: Fri, 25 Sep 2015 15:02:33 -0400
- To: "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
- Cc: Holger Knublauch <holger@topquadrant.com>, "public-data-shapes-wg@w3.org" <public-data-shapes-wg@w3.org>
Peter, Not sure if I understand the semantics of qualified cardinality correctly, but I would have thought that the last bit should be: sh:property [ sh:predicate ex:p ; sh:qualifiedValueShape [ rdf:type sh:Shape ; sh:constraint [ rdf:type sh:AndConstraint ; sh:shapes ( C B ) ] ] ; sh:qualifiedMaxCount 0 ] -- Arthur On Wed, Sep 9, 2015 at 7:42 AM, Peter F. Patel-Schneider <pfpschneider@gmail.com> wrote: > We want a shape that is satisfied (i.e., not violated) by nodes that have > between nc and mc values (including unbounded) for ex:p that satisfy shape C > and between nb and mb values (including unbounded) for ex:p that satisfy > shape B and no other values for ex:p. Further there are no nodes that can > satisfy both C and B. > > This can be done with the following SHACL shape: > > S rdf:type sh:Shape ; > sh:property [ sh:predicate ex:p ; > sh:qualifiedValueShape C ; > sh:qualifiedMinCount nc ; > sh:qualifiedMaxCount mc ] ; > sh:property [ sh:predicate ex:p ; > sh:qualifiedValueShape B ; > sh:qualifiedMinCount nb ; > sh:qualifiedMaxCount mb ] ; > sh:property [ sh:predicate ex:p ; > sh:valueShape [ rdf:type sh:Shape ; > sh:constraint [ rdf:type sh:OrConstraint ; > sh:shapes ( C B ) ] ] ] . > > If the "no other values for ex:p" is not wanted, then the last constraint is > removed. > > > If C and B are not disjoint *and no values are supposed to be in the > intersection*, then the constraint > > sh:property [ sh:predicate ex:p ; > sh:valueShape [ rdf:type sh:Shape ; > sh:constraint [ rdf:type sh:AndConstraint ; > sh:shapes ( C B ) ] ] ; > sh:qualifiedMaxCount 0 ] > > is added. > > NB: None of this has been checked against a SHACL implementation, so the > syntax might not be completely correct. > >
Received on Friday, 25 September 2015 19:03:01 UTC