Property paths in property pair constraint components

Dear all,

I’m currently working with a fairly complex graph. Long story short, the standard adopted in this project has classes for tons of attributes (birthdates, names, etc.). The following works swell:

<#foo:DOB>
 a sh:NodeShape ;
 sh:targetClass foo:Person ; 
 sh:property [
  sh:path ( foo:start foo:with ) ;
  sh:lessThan foo:end ;
 ] ;
.

<#x>
 a foo:Person ;
 foo:start [ foo:with "2002-05-29"^^xsd:date ] ;
 foo:end "2002-05-30"^^xsd:date ;
.

<#y>
 a foo:Person ;
 foo:start [ foo:with "2002-05-30"^^xsd:date ] ;
 foo:end "2002-05-30"^^xsd:date ;
.

The problem is that the data is more complex and rather looks as follows:

<#x>
 a foo:Person ;
 foo:start [ foo:with "2002-05-29"^^xsd:date ] ;
 foo:end [ foo:with "2002-05-30"^^xsd:date ] ;
.

<#y>
 a foo:Person ;
 foo:start [ foo:with "2002-05-30"^^xsd:date ] ;
 foo:end [ foo:with "2002-05-30"^^xsd:date ] ;
.

This cannot be solved by providing a property path ( foo:end foo:with ) for sh:lessThan. 

<#foo:DOB>
 a sh:NodeShape ;
 sh:targetClass foo:Person ; 
 sh:property [
  sh:path ( foo:start foo:with ) ;
  sh:lessThan ( foo:end foo:with ) ;
 ] ;
.

The specification limits the values of property pair constraints to IRIs. Yes, I could probably achieve the desired result by creating property shapes from the date of birth (for instance), but that does not seem as intuitive as approaching it from the perspective of people.

Was there a particular reason property paths are not allowed for sh:lessThan? Or am I overlooking something and is it feasible?
I currently solve this problem with a SPARQLConstraint, which I am not entirely happy with.

With my best regards,

Christophe

Received on Thursday, 20 February 2020 21:56:11 UTC