Hi Richard, Here are some SPARQL queries that might be helpful:
Select all direct imports of <http://some-named-graph <http://some-named-graph/>>: SELECT ?import WHERE { GRAPH <http://some-named-graph <http://some-named-graph/>> { <http://some-named-graph <http://some-named-graph/>> owl:imports ?import } } Select all direct and indirect imports of <http://some-named-graph <http://some-named-graph/>>: SELECT ?import WHERE { BIND (ui:graphWithImports(<urn:x-evn-master:t1>) AS ?graph) GRAPH ?graph { <urn:x-evn-master:t1> owl:imports+ ?import } } Return ALL triples from the graph <http://some-named-graph <http://some-named-graph/>> as well as all triples from any directly or indirectly imported graphs: CONSTRUCT { ?s ?p ?o } WHERE { BIND (ui:graphWithImports(<http://some-named-graph <http://some-named-graph/>>) AS ?graph) GRAPH ?graph { ?s ?p ?o } } Return only the owl:imports triples from the previous query: CONSTRUCT { ?s owl:imports ?o } WHERE { BIND (ui:graphWithImports(<http://some-named-graph <http://some-named-graph/>>) AS ?graph) GRAPH ?graph { ?s owl:imports ?o } } Hope that helps, Richard C > On 25 Mar 2022, at 16:06, 'Richard Nagelmaeker' via TopBraid Suite Users > <[email protected]> wrote: > > Hi Richard, > > Thank you for your question. I 've got a solution I think, see the query > below: > > construct > { > ?s2 owl:imports ?o2 . > } > where > { > graph ?o > { > ?s2 owl:imports ?o2 . > } > > { > SELECT ?o > { > graph <http://some-named-graph/> > { > ?s owl:imports ?o . > } > } > }} > > This isn't the final query, but it does the thing I need, query all graphs in > the imports. > > Regards, > > Richard > On Thursday, March 24, 2022 at 2:55:18 PM UTC+1 Richard Cyganiak wrote: > Hi Richard, > > What do you mean by “query” here? Are you talking about something like a > SPARQL CONSTRUCT query? Or do you simply want to return a graph with all its > imports in RDF/XML format? > > Richard C > > > > >> On 24 Mar 2022, at 12:33, 'Richard Nagelmaeker' via TopBraid Suite Users >> <[email protected] >> <applewebdata://E89D4BB6-DE35-4509-9194-D9B91B38F7C3>> wrote: >> > >> Hi All, >> >> In earlier versions of EDG, we used Sparqlmotion to query a named graph >> including all of it's imports. >> In recent versions of EDG, SPARQLMotion is removed. So we wonder how we can >> query a named graph including it's imports? >> >> The query is sent or triggered by an application and the response has to be >> in RDF/XML. >> >> Anybody a solution for this? >> >> Cheers, >> >> Richard >> >> > >> -- >> 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] >> <applewebdata://E89D4BB6-DE35-4509-9194-D9B91B38F7C3>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/topbraid-users/659d8c50-6aa7-430f-b1d3-2729abf2a2een%40googlegroups.com >> >> <https://groups.google.com/d/msgid/topbraid-users/659d8c50-6aa7-430f-b1d3-2729abf2a2een%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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/topbraid-users/7a4b957c-dcc4-4665-8dde-8750aa9c42ebn%40googlegroups.com > > <https://groups.google.com/d/msgid/topbraid-users/7a4b957c-dcc4-4665-8dde-8750aa9c42ebn%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/D3F62F95-1692-4E45-B7A2-70E6DBD8281E%40topquadrant.com.
