Re: shapes-ISSUE-40 (Property Cardinality): sh:min/max constrains properties, not values

On 4/7/2015 13:59, Karen Coyle wrote:
> Oh, now I think I get it. Holger, you are describing this in terms of 
> the result of a SPARQL query, right? You query on the property, and 
> count the number of objects that are returned? and that tells you how 
> many triples with that property exist?

Counting triples is not a just SPARQL operation but can be done with any 
RDF based system, but yes, COUNT is also a SPARQL aggregation which is 
similar to its SQL equivalent. I introduced the term "object" because in 
the small table underneath the sentence I had to write something like 
sh:minCount "The minimum number of objects". I have no good idea how 
else to write this and welcome better proposals. For now I have changed 
it to:

https://github.com/w3c/data-shapes/commit/2c1588ffc0a79ae12d06233b18cc174737f277fa

The properties|sh:minCount|and|sh:maxCount|restrict the number of 
triples with thefocus nodeas thesubjectand the given property as 
thepredicate.
Property  Value Type  Summary
|sh:minCount|  |xsd:integer|  The minimum cardinality. Optional. Default 
value is 0.
|sh:maxCount|  |xsd:integer|  The maximum cardinality. Optional. Default 
interpretation is unlimited.


Holger


>
> That is probably what confused me, because it isn't clear from the 
> language that a query is assumed. I'll let others weigh in, but I 
> would rather that we not assume query functionality, so I'd go for 
> "count the number of triples with the focus node as the subject and 
> the given property as the predicate."
>
> kc
>
> On 4/6/15 8:20 PM, Karen Coyle wrote:
>>
>>
>> On 4/6/15 7:00 PM, Holger Knublauch wrote:
>>> I have attempted to clarify this via
>>>
>>> https://github.com/w3c/data-shapes/commit/1ffa8cd3225d2cc340ae3883abd5411913d7a7d4 
>>>
>>>
>>>
>>>
>>> Please let me know if this helps. I had started to use the term "value"
>>> because I thought that "object" is less clear to newcomers who are not
>>> too familiar with RDF technology. Yet for a formal spec, using the term
>>> "object" may indeed be less objectionable.
>>
>> Sorry, Holger, trading "object" for "value" doesn't help -- my confusion
>> was something else.
>>
>> What exactly is being constrained in:
>>
>> "The properties sh:minCount and sh:maxCount restrict the number of
>> objects in triples with the focus node as the subject and the given
>> property as the predicate"
>>
>> I think what you are saying is that you are restricting the number of
>> times a particular predicate can appear in the focus node. Right?
>> Because this is listed as a property constraint. Where do the objects
>> come into that if this is a constraint on the propert(y/ies)? It's the
>> "objects in triples" that throws me off -- number of objects in a triple
>> is 1, right? So clearly I'm not reading this with the meaning you intend
>> to convey.
>>
>> kc
>>
>>>
>>> Holger
>>>
>>>
>>> On 4/6/2015 2:08, RDF Data Shapes Working Group Issue Tracker wrote:
>>>> shapes-ISSUE-40 (Property Cardinality): sh:min/max constrains
>>>> properties, not values
>>>>
>>>> http://www.w3.org/2014/data-shapes/track/issues/40
>>>>
>>>> Raised by: Karen Coyle
>>>> On product:
>>>>
>>>> The spec at https://w3c.github.io/data-shapes/shacl/ currently reads:
>>>>
>>>> "The properties sh:minCount and sh:maxCount restrict the number of
>>>> values of the given property at the focus node."
>>>>
>>>> It should read:
>>>> "The properties sh:minCount and sh:maxCount restrict the cardinality
>>>> of properties of the focus node."
>>>>
>>>> The cardinality of the value of a triple is always min=1 max=1. It is
>>>> the cardinality of the properties in the node that can be constrained,
>>>> e.g.
>>>>
>>>> sh:property [
>>>>         sh:predicate foaf:name ;
>>>>         sh:minCount 1 ;
>>>>         sh:maxCount 1 .
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>

Received on Tuesday, 7 April 2015 04:41:58 UTC