On 30/09/13 07:44, Arthur Vaïsse-Lesteven wrote:
Hi again,



What's in config.ttl?
I made my tests with the default file "config.ttl" that defined 2 datasets, "ds" and "books". As 
"books" doesn't support SPARQL update I made my tests on "ds".
Testing with the default "config-tdb.ttl" allow the 2 queries to work on the "TDB 
Service (RW)" dataset.

Just to check if I correctly understood,
If my query contains "FROM <http://example.com#MyGraph>"

In case of TDB the service will check if any local graph match this URI.
>
Others will send an HTTP get to http://example.com#MyGraph, and execute the 
query on the dataset built on the base of this result.

That is correct ?

Yes.

Can we swap a non-TDB service to a TDB behaviour concerning the "from <graph 
uri>" ?

Not in the current codebase. The behaviour of FROM to GET a URL remotely is a valid usecase. There could be another implementation of DatasetGraph that provided dynamic datasets. (I have unfinished code in my personal github to do this.)

If yes, I supposed we have to override some class to change this behaviour.

Have you considered using GRAPH in the query? That is the better way to access a specific graph. GRAPH accesses the dataset's graphs, while FROM describes the dataset.

PREFIX uso: <http://weblab.ow2.org/SWAG_users_ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?p ?o ?n
WHERE {
  GRAPH <http://swag_data.com/users_graph> {
    ?user uso:name "[email protected]"^^xsd:String.
    ?user uso:password "liferay_portal"^^xsd:String.
    ?user ?p ?o.
    OPTIONAL { ?o uso:name ?n }
  }
}




Arthur VAÏSSE-LESTEVEN

Reply via email to