All, I'm trying to do something analogous to this example from the SPARQL spec: http://www.w3.org/TR/rdf-sparql-query/#namedAndDefaultGraph which I have now gotten working, but I'd like to do a DESCRIBE. Now, the problem is that the client doesn't know the graph names, but it what kind of graph it is. Thus, I have inserted the following
INSERT DATA INTO GRAPH <http://msone.computas.no/graphs/> { <http://msone.computas.no/graphs/instance/nfi> a <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . } i.e. http://msone.computas.no/graphs/ is my default graph and http://msone.computas.no/graphs/instance/nfi is the graph where the triples I'm interested in are. My simplest test query is DESCRIBE <http://www.wizardis.com.au/2005/12/MAVIS#TitleWorkkey48739> FROM NAMED <http://msone.computas.no/graphs/instance/nfi> Now, analogous to the example in the SPARQL spec, I would like to DESCRIBE this URI, but using an IFP to identify it rather than directly name it. Since the client doesn't know the graph URI, I would rather reference it by :InstanceGraph, like this: DESCRIBE ?uri WHERE { ?g a <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . GRAPH ?g { ?uri <http://www.computas.com/mediasone#coverArt> <http://ruby3.computas.no/covers/nfi/48739.jpg> . } } this returns no result, so I try two things: SELECT ?uri WHERE { ?g a <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . GRAPH ?g { ?uri <http://www.computas.com/mediasone#coverArt> <http://ruby3.computas.no/covers/nfi/48739.jpg> . } } This returns the correct URI, so the solution is OK. Then I do: DESCRIBE ?uri FROM NAMED <http://msone.computas.no/graphs/instance/nfi> WHERE { ?g a <http://msone.computas.no/graphs/vocab/mediasone#InstanceGraph> . GRAPH ?g { ?uri <http://www.computas.com/mediasone#coverArt> <http://ruby3.computas.no/covers/nfi/48739.jpg> . } This returns the desired result. So, it seems that the match is OK, but to get the actual data from a DESCRIBE, I have to explicitly name the graph. Which creates problems on the client side... I have to admit that I am a bit confused about graph naming. Does this problem have a more trivial solution? The endpoint where all this runs is a public test endpoint at http://msone.computas.no:8890/sparql Kind regards Kjetil Kjernsmo -- Senior Knowledge Engineer Mobile: +47 986 48 234 Email: kjetil.kjern...@computas.com Web: http://www.computas.com/ | SHARE YOUR KNOWLEDGE | Computas AS PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | Fax:+47 6783 1001