-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I propose the addition of a (Boolean-valued?) constraint component that would create a validation error for any repeated value among those obtained from evaluating a property path. This would presumably only be meaningful if the path was not just a single predicate or an inverse path of a single predicate. This could be used to help detect irregularities in tree-like structures.
For example, consider a genealogy graph. Suppose one wanted to create a constraint that verified a person's parents did not share a parent (i.e., that a person does not have a grandparent via more than one way). Also, it would make sense to add this constraint component to the property shape for the path ex:father|ex:mother
given as an example in the current SHACL spec to verify a person was not both the mother and father of a person.
I realize that this behavior can be easily accomplished via a SPARQL Constraint or Constraint Component, but it would presumably be more convenient and efficient if it was a built-in capability. Also, I suppose this would only work if the SHACL validator returned the full list of values reached when evaluating a property path instead of the set of unique values- I'm not sure how specific implementations work in this respect.