Re: ISSUE-81: Final names of property pair constraints?

On 9/13/2015 16:43, Karen Coyle wrote:
> Holger, my basic reaction is that the term "Constraint" on all of them 
> is awkward, and the constraints should just be:
>
> Equal, NotEqual, LessThan, LessThanOrEqual
>
> That's because the question is whether the values are equal, not 
> whether the constraints are equal.

We could do that, and drop the suffix "Constraint" from most of the 
built-in constraint types. Examples include sh:And, sh:ClosedShape etc, 
which would then look like

ex:MyShape
     sh:constraint [
         a sh:And ;
         sh:shapes ( ex:Shape1 ex:Shape2 )
     ] .

I have no strong opinion. The suffix "Constraint" can indeed be deduced 
from the context of being a value of sh:constraint. Also, in a sense 
most things in the SHACL namespace are constraints. Yet, having 
"Constraint" at the end of each name makes it more formally consistent. 
Note that we also have sh:PropertyConstraint where shortening it to 
sh:Property would be confusing to people with an RDF background where 
rdf:Property means something very different. Having "Constraint" at the 
end also makes it clearer when constraint instances are IRIs, and the 
sh:constraint context is less clear.

>
> However, I'm curious how the latter two will be implemented since they 
> imply an order between the two values.

In my current work they look like

ex:MyShape
     a sh:Shape ;
     sh:constraint [
         a sh:LessThanConstraint ;
         sh:predicate1 ex:property1 ;
         sh:predicate2 ex:property2 ;
     ]
.

i.e. the ordering is defined by being predicate1 or predicate2.


>
> It also seems that this mechanism assumes that there will always be 
> two different predicates to compare, and I'm not sure that this is the 
> case. For example, for the SKOS-related case, where you want to say 
> that you cannot have two skos:prefLabels with the same value 
> (including language code), a common instance example is:
>
>
>       <skos:prefLabel xml:lang="fr">sabliers</skos:prefLabel>
>       <skos:prefLabel xml:lang="en">sandglasses</skos:prefLabel>
>       <skos:prefLabel xml:lang="es">reloj de arena</skos:prefLabel>
>       <skos:prefLabel xml:lang="nl">zandlopers</skos:prefLabel>
>
> and more often having many more languages. How will this be handled?

The unique language case is different because it's about a single 
property only. Its syntax could simply be

ex:MyShape
     sh:property [
         sh:predicate skos:prefLabel ;
         sh:uniqueLang true ;
     ] .

We have ISSUE-82 open for this topic.

Holger

Received on Monday, 14 September 2015 00:44:29 UTC