incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Minto van der Sluis <>
Subject Re: Query over multiple named graphs
Date Tue, 08 Jan 2013 15:05:54 GMT
Hi Reto,

Thanks for your answer.

It's not that I want to merge multiple named graphs together to perform
a query. I already achieved that as a workaround by adding new triples
to both a named graph and a default graph. Like this I can query the
default graph.

What I actually try to achieve is find all named graphs the meet certain
requirements. For instance the following simple query to return then
names of all named graph.

  GRAPH ?g {
    ?s ?p ?o

This query contains no FROM clause. So I guess the supplied graph
(second argument) is still used.

The workaround I currently use is satisfactory for the time being, but
does not meet the requirements I have for the near future. So I have to
come up with something one way or another.



Op 8-1-2013 14:16, Reto Bachmann-Gmür schreef:
> Hi Minto,
> The defaultGraph passed as second argument is ignered if a FROM clause is
> present in your query, otherwise this is used as default Graph and other
> graphs can be access using "FROM NAMED".
> If you want to rund your query about afainst the union of several graphs
> you should use UnionMGraph as Tommaso pointed out. If this is your usecase
> we should keep this in mind for the fast-lane to be implemented.
> Cheers,
> Reto
> On Tue, Jan 8, 2013 at 8:53 AM, Tommaso Teofili
> <>wrote:
>> Hi Minto,
>> I think that you should use a union graph (UnionMGraph) over your
>> underlying named graphs and that should work as expected.
>> I hope this helps,
>> Tommaso
>> 2013/1/6 Minto van der Sluis <>
>>> Hi folks,
>>> Currently I am using clerezza with a Jena TDB storage backend to store
>>> multiple named graphs.
>>> Now I wonder how to perform a query over these named graphs. I can use
>>> the following command:
>>>     TcManager.executeSparqlQuery( query, ? )
>>> But what should be used as the triple collection? If the default graph,
>>> how do I specify that?
>>> Regards,
>>> Minto van der Sluis
>>> Software innovator / renovator
>>> Xup BV

ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV

Mobiel: +31 (0) 626 014541

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message