Thanks, Andy.

I would have bet $100 I had tried that already.

Dave

-----Original Message-----
From: Andy Seaborne [mailto:[email protected]] On Behalf Of Andy 
Seaborne
Sent: Tuesday, December 18, 2012 9:56 AM
To: [email protected]
Subject: Re: SPARQL equivalent to StoreUtils.storeGraphNames?

On 18/12/12 14:53, Lebling, David (US SSA) wrote:
> I'd like to be able to use SPARQL to get a list of all named graphs. 
> (StoreUtils.storeGraphNames(store) will get that list in code, of course.)
>
> I know that if the name of my graph and the "main" subject in it are the same 
> (which is true in my case) I can do:
>
> SELECT DISTINCT ?g
> WHERE {
>                  {GRAPH ?g {?g ?p ?o}}

                    {GRAPH ?g {?s ?p ?o}}

> }
>
> but that appears to take a long time. Using storeGraphNames() seems pretty 
> much instantaneous and is more general.
>
> Is there any way to do what I want?
>
> Thanks,
>
> Dave

GRAPH ?g {}

        Andy

Reply via email to