I am finding the use of inferred properties to be very valuable. Using
tosh:values in SPARQL to retrieve inferred values works well.

If I had a choice, I would prefer the second option (see below in bold)
which doesn't require tosh:values.   Using tosh:values means the user must
know the property they are querying is an inferred property and that is not
obvious without looking at the property shape.  I think understanding
complex property shapes is a level of knowledge above a user that can write
a SPARQL query.

Tim


Inferring Data with SHACL Property Value Rules (topquadrant.com)
<https://archive.topquadrant.com/graphql/values.html#sparql>

Use of Inferred Values using SPARQL

TopBraid includes a magic property (aka property function) tosh:values that
can be used to fetch inferred values, or to check whether a given focus
node has certain inferred values for a given predicate. Here is an example
query:

SELECT *
WHERE {
        ?person a schema:Person .
        (?person schema:age) tosh:values ?age .
}

Note that this magic property can only be used to derive the right-hand
value from the left-hand values, not vice versa. So the caller needs to
make sure that both variables on the left-hand side are bound when
tosh:values is evaluated. This magic property makes property value rules
available to any SPARQL-based technology in the TopBraid platform,
including SWP, SPARQLMotion, SPIN and SHACL-SPARQL itself.

tosh:values falls back to any declared sh:defaultValue if no other value
exists for the focus node and predicate.

We are currently evaluating whether this integration with SPARQL should
also more directly work with every use of an inferred property in a SPARQL
query. For example, the following would then also work:

*SELECT *
WHERE {
        ?person a schema:Person .
        ?person schema:age ?age .
}*

*We welcome feedback on whether TopBraid should support this syntax in
SPARQL or whether tosh:values is sufficient.*

-- 
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/CAF0WbnJJsGDcLLpwa1g53P12AB0vYC9CGCSYj_mgCt6u_xS36g%40mail.gmail.com.

Reply via email to