On 09/07/13 14:50, Rob Walpole wrote:
Hi,

I could use some help to understand default and named graphs within Jena
(TDB/Fuseki)...

In the following example taken from the W3C SPARQL 1.1 spec what needs to
go in place of...

FROM <http://example.org/dft.ttl>

...assuming I have loaded dft.ttl into the 'default' graph of TDB and am
querying via Fuseki?

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT ?who ?g ?mbox
FROM <http://example.org/dft.ttl>
FROM NAMED <http://example.org/alice>
FROM NAMED <http://example.org/bob>

That load for the purpose of the query ... you already have the data in the dataset. Remove these.

Did you load into "http://example.org/bob";

WHERE
{
    ?g dc:publisher ?who .
    GRAPH ?g { ?x foaf:mbox ?mbox }
}


Run this:

SELECT * {
  { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } }
}

to see what you have.

I have tried using the form <http://localhost:3030/my-dataset/data?default>
but this has no affect (although I can download the data from here...)

Longer:

In TDB it picks FROM/FROM NAMED from the set of already loaded named graphs.

http://jena.apache.org/documentation/tdb/dynamic_datasets.html

But it is only from data already loaded. You probably don't want to do that.

        Andy


Many thanks
Rob


Reply via email to