Re: Stand-alone Shapes and oslc:valueRange implemented in SPIN

On 12/5/2014 5:08, Arthur Ryman wrote:
> All values must satisfy the shape pointed to by oslc:valueShape. OSLC 
> has no way to specify that some values must satisfy the shape. 

Ok thanks Arthur for clarifying this. So Resource Shapes doesn't seem to 
have a notion of Qualified Cardinalities, while ShEx seems to have that 
(correct me if I am wrong, Eric).

To create a solution that covers all use cases I believe it would be 
helpful to (explicitly) distinguish between

a) structural declarations "which properties are relevant for a 
resource/class"
b) arbitrary constraints "which additional conditions must be met"

The information from a) would be easy to interpret to drive user 
interfaces, e.g. it would contain the general cardinality and the 
valueType so that suitable input widgets can be selected.

The information from b) would be tested in the background, e.g. to 
validate an input form before it gets submitted.

With this categorization, oslc:valueType would be a single value in 
category a) while there can be any number of valueShapes in category b).

In my current prototyping, I have split spin:constraint into two 
different properties (:property and :constraint) to distinguish between 
those two categories. This also means that there would be something like

ex:Person
     :property [
         :predicate ex:parent ;
         :valueType ex:Person ;
         :minCount 2 ;
         :maxCount 2 ;
     ] ;
     :constraint [
         a :ShapeConstraint ;
         :shape ex:MalePerson ;
         :minCount 1 ;
         :maxCount 1 ;
     ] ;
     :constraint [
         a :ShapeConstraint ;
         :shape ex:FemalePerson ;
         :minCount 1 ;
         :maxCount 1 ;
     ] ;

which means that every Person must have two (biological) parents, one 
male and one female. This distinction between the "global" cardinality 
of 2 from the local qualified cardinalities would allow us to represent 
QCRs in a relatively clean way.

Eric, what do you think?

Holger

Received on Thursday, 4 December 2014 22:32:40 UTC