I cannot think of a good way to do this right now. The only place where
true backward chaining of sh:values rules is supported right now is in
sh:path node expressions where the path is a IRI predicate. That isn't
the case here, as you'd need sh:path [ sh:inversePath schema:son ] .
FWIW the source code of the relevant logic is
https://github.com/TopQuadrant/shacl/blob/master/src/main/java/org/topbraid/shacl/expr/PathEvaluator.java#L230
and the improvement here would be to add special handling for the case
where a predicate is given and isInverse is true.
The only work-around I could think of is to rewrite a sh:values rule
that has the inverse logic of the schema:son property.
Holger
On 2022-04-20 7:22 am, [email protected] wrote:
When a resource is an (inferred) *object* of a SHACL values rule, is
there any way to have EDG display that information when viewing the
resource?
For example, suppose I defined schema:son using the property shape
given in TQ's "Inferring Data with SHACL Property Value Rules"
<https://www.topquadrant.com/graphql/values.html> tutorial:
schema:Person
sh:property [
sh:path schema:son ;
sh:class schema:Person ;
sh:description "The son(s) of a person. These values are
inferred as the children that have male gender." ;
sh:name "son" ;
sh:values [
sh:nodes [
sh:path schema:children ;
] ;
sh:filterShape [
sh:property [
sh:path schema:gender ;
sh:hasValue "male" ;
] ;
] ;
] ;
] .
Is there a way to add a property shape that displays all the parents
of a son by reusing schema:son in the inverse direction? (I know in
this case you could do this more simply a different way, but I wanted
to use an established example.)
Clearly it won't work to simply define the property shape as the
sh:inversePath of schema:son, as we might do with an explicitly stated
property. Can we do it instead with another sh:values rule?
--
You received this message because you are subscribed to the Google
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/b054824d-de22-4f0f-9f8b-aab996a9f1e8n%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/b054824d-de22-4f0f-9f8b-aab996a9f1e8n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "TopBraid
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/6902c4ac-19e1-4ff8-b06c-003539af7a0e%40topquadrant.com.