stanbol-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Grisel <>
Subject Re: Do Stanbol have a global SPARQL endpoint?
Date Wed, 16 Mar 2011 17:39:50 GMT
2011/3/16 Enrico Daga <>:
> On 16 March 2011 17:22, Olivier Grisel <> wrote:
>> One should probably extend / adapt the JAX-RS SPARQL resource of the
>> enhancers to point to other graph ids as needed. One could make a new
>> JAX-RS resources such as /graph/{graphId}/sparql to build dynamically
>> sparql endpoint for all the clerezza graphs registered in stanbol for
>> instance:
>> In the class SparqlQueryResource, instead of the hard-coded:
>>        Object result = tcManager.executeSparqlQuery(query,
>>                store.getEnhancementGraph());
>> One could have something like:
>>        Object result = tcManager.executeSparqlQuery(query,
>>                tcManager.getGraph(new UriRef("urn:graph:" + graphId)));
> But what happens if I want to query multiple graphs?
> I need for instance to query the enhancement graph and the result of
> my /kres/reengineer process (another graph) together. This would open
> to a variety of use cases, and in general this is how sparql endpoints
> work.

It seems to me by reading the source code of
TcManager#executeSparqlQuery and JenaSparqlEngine#execute and
TcDataset#getNamedGraph that the clerezza sparql execution should be
able to perform queries accross several graphs. The second argument of
TcManager#executeSparqlQuery is just the default named graph used when
the sparql query does not have FROM clause.

Please try to build a SPARQL query with an explicit FROM clause
pointing to a graph id used by kres to check this assertion. If it
works, try another query that mixes triples from both graphs
(reengineer and enhancer) using the GRAPH keyword in the body of the
SPARQL query as in for instance.

If it does not work, i think we should ask the question on the
clerezza mailing list directly instead.

Olivier -

View raw message