On 31/07/12 08:52, Olivier Rossel wrote:
Oops, the webpage I mentionned had wrong code.The correct code to run my query is: QueryExeuction exec = QueryExecutionFactory.create(QueryFactory.create("yourfederatedquery", Syntax.syntaxARQ), new DatasetImpl(ModelFactory.createDefaultModel())); exec.execSelect(); Forcing the syntax to Syntax.syntaxARQ is mandatory because client-side federation is a ARQ-specific feature.
Only in very old versions of ARQ - SERVICE is part of SPARQL 1.1
On Tue, Jul 31, 2012 at 9:40 AM, Olivier Rossel <[email protected]> wrote:Hi all. I would like to try Jena basic federation. I tried this query: SELECT DISTINCT ?thCenturyClassicalComposers0 WHERE { SERVICE <http://api.talis.com/stores/bbc-backstage/services/sparql> { ?thCenturyClassicalComposers0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/class/yago/20thCenturyClassicalComposers> . }} LIMIT 300 with the code provided here: cf http://tech.groups.yahoo.com/group/jena-dev/message/48130 I get some results. Now I try this query: SELECT DISTINCT ?thCenturyClassicalComposers0 ?comment WHERE { SERVICE <http://api.talis.com/stores/bbc-backstage/services/sparql> {?thCenturyClassicalComposers0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/class/yago/20thCenturyClassicalComposers> . } SERVICE <http://dbpedia.org/sparql> {?thCenturyClassicalComposers0 <http://www.w3.org/2000/01/rdf-schema#comment> ?comment} } LIMIT 300 I get no result. But when checking data on each endpoint, I should get some results. Is there something wrong in my SPARQL SERVICE syntax? BTW, being able to limit/offset/orderBy and OPTIONALize each SERVICE block would be uber nice ! ! ! Is it possible already?
