I have a hierarchy of business activity , I want to filter companies on a specific activity so I mean to capture all companies that work in the specific activity or any of its descendants.
Activities are assigned through the my:hasActivity predicate and hierarchy is expressed with a my:isPartOf predicate (that is meant to be transitive)
So to filter the resultset I add a this pattern in my query :
?company my:asActivity/my:isPartOf* @base
I expect it to be equivalent to an induction pattern like :
{ ?company my:hasActivity @base }
UNION { ?company my:hasActivity ?s1 . ?s1 my:isPartOf @base }
...
UNION { ?company my:hasActivity ?s_n . ?s_n my:isPartOf ?s_(n-1) . [...] . ?s1 my:isPartOf @base }
but the results I get are inconsistent with this.
Am I wrong in my assumptions or is there a issue with this propertyPath pattern in DotNetRdf ?
As it is, it would seem that the sparql engine looses the constraint between the my:hasActivity triple object and the my:isPartOf subject...
Thanks in advance for your advice,
Max.