owlim-discussion  

Re: [Owlim-discussion] how to use context in sparql?

Jacek Kopecky
Mon, 02 Aug 2010 02:02:48 -0700

Hi Yonghong, 
a quick example adapted from the link sent by Barry:

SELECT * 
FROM NAMED <http://example.org/example/example.rdf>
WHERE { your graph pattern }

This should just use the triples in that particular context.
Hope it helps,
Jacek

On 2 Aug 2010, at 09:46, Barry Bishop wrote:

> Hi Yonghong,
> 
> If you have not done this before, probably the best place to start is to
> read here:
> 
>    http://www.w3.org/TR/rdf-sparql-query/#namedGraphs
> 
> You will need to use FROM or FROM NAMED or a combination of the two. I
> won't explain further, as the above URL explains it better than I could.
> 
> Best of luck,
> barry
> 
> --
> Barry Bishop
> OWLIM Product Manager
> Ontotext AD
> Tel: +43 650 2000 237
> email: barry.bis...@ontotext.com
> www.ontotext.com
> 
> On 02/08/2010 10:31, yonghong ke wrote:
>> Hi, all:
>>  I create a context like follow:
>> 
>>      String location = "http://example.org/example/example.rdf";;
>> 
>>      URI context = f.createURI(location);
>> 
>> 
>>      con.add(sub, predicate, obj, context);
>> 
>> 
>> i want to query  in the ‘context’ use sparql,  how should i do ?
>> 
>> Thanks!
>> 
>> 
>> 
>> _______________________________________________
>> OWLIM-discussion mailing list
>> OWLIM-discussion@ontotext.com
>> http://ontotext.com/mailman/listinfo/owlim-discussion
> _______________________________________________
> OWLIM-discussion mailing list
> OWLIM-discussion@ontotext.com
> http://ontotext.com/mailman/listinfo/owlim-discussion


-- 
The Open University is incorporated by Royal Charter (RC 000391), an exempt 
charity in England & Wales and a charity registered in Scotland (SC 038302).
_______________________________________________
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion