Property paths for multiple graphs


Assuming we have the following graphs in our stardog DB: a schema graph and a data graph

<> <> <> <> .
<> <> <> <> .
<> <> <> <> .
<> <> <> <> .

I want to be able to get results from queries like

select * where {?s rdf:type/rdfs:subClassOf <> }

when I enable querying in all graphs by default in settings, or explicitly as

select * 
from named <>
from named <>
where {?s rdf:type/rdfs:subClassOf <> }

but the queries return nothing. I have already seen the answer to this similar query and would like to make a more specific support request here.

what is the best way to get the transitive closure of types? I am only interested rdf:type/rdfs:subClassOf paths in this case.
in our setup, merging everything on the default graph or copying the schema graph in each graph would not work and was wondering is there is a lightweight reasoning option without the rdfs side effects ofe.g.rdfs:domain & rdfs:range

Thank you in advance

Hi Dimitris,

If you have query.all.graphs=true in your, then the first query should return Bolt. At least it does so for me with the latest Stardog. You should get the same result from the 2nd query if you change from named to from since your property path pattern is in the default scope (i.e. not within graph ?g { .. }).

Make sure you do not have query.pp.contexts=true in your (otherwise property paths won’t cross named graph boundaries) and you use 5.2.


Thank you Pavel,

we are a few versions back, will check this as soon as we upgrade.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.