- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Wed, 4 Feb 2015 17:08:32 -0500
- To: Karen Coyle <kcoyle@kcoyle.net>
- Cc: "public-data-shapes-wg@w3.org" <public-data-shapes-wg@w3.org>
* Karen Coyle <kcoyle@kcoyle.net> [2015-02-04 12:58-0800] > One of the requirements that we will be discussing tomorrow is: > Declarations of Property Min/Max Cardinality > > Is there a related requirement that would assert min/max cardinality > on subjects of a type, or within a targeted graph? - e.g. only one > subject of type foaf:person per graph. This is a common requirement > that we have in the DCMI work. I believe that's a qualfied cardinality restriction. A bunch of clinical modelers have requested something basically like this: my:PersonShape { :hasBiologicalParent { :gender (:Male) }, :hasBiologicalParent { :gender (:Female) } } Which I implemented as requiring one of the first, one of the second, and no more instances of :hasBiologicalParent. see http://w3.org/brief/NDMy In OWL, that would look like a couple QCRs and an allValuesFrom: my:PersonShape rdfs:subClassOf [ owl:onProperty :hasBiologicalParent; owl:cardinality 1; owl:allValuesFrom [ owl:onProperty :gender ; owl:hasValue :Male ] ], [ owl:onProperty :hasBiologicalParent; owl:cardinality 1; owl:allValuesFrom [ owl:onProperty :gender ; owl:hasValue :Female ] ], [ owl:onProperty :hasBiologicalParent; owl:allValuesFrom [ owl:unionOf ( [ owl:onProperty :gender ; owl:hasValue :Male ] [ owl:onProperty :gender ; owl:hasValue :Female ] ) ] ] . I could simplify this example by removing the extra nested constraint, but it becomes a bit artificial: my:AnimalShape { :consumes :food, :consumes :water, :consumes :oxygen } would look like: my:AnimalShape rdfs:subClassOf // consumes each of three things: [ owl:onProperty :consumes; owl:cardinality 1; owl:hasValue :food ], [ owl:onProperty :consumes; owl:cardinality 1; owl:hasValue :water ], [ owl:onProperty :consumes; owl:cardinality 1; owl:hasValue :oxygen ], // consumes only those three things: [ owl:onProperty :consumes; owl:allValuesFrom [ owl:oneOf ( :food :water :oxygen ) ] ] . Without the last restriction, we fail to catch a lot of errors, e.g. coding errors: <Rex> :consumes :food, :water, O2 . or typos: <Rex> :consumes :food, :water, xoygen . > kc > > -- > Karen Coyle > kcoyle@kcoyle.net http://kcoyle.net > m: 1-510-435-8234 > skype: kcoylenet/+1-510-984-3600 > -- -ericP office: +1.617.599.3509 mobile: +33.6.80.80.35.59 (eric@w3.org) Feel free to forward this message to any list for any purpose other than email address distribution. There are subtle nuances encoded in font variation and clever layout which can only be seen by printing this message on high-clay paper.
Received on Wednesday, 4 February 2015 22:08:37 UTC