- From: Richard Newman <r.newman@reading.ac.uk>
- Date: Wed, 16 Nov 2005 17:30:18 -0800
- To: Leo Sauermann <leo@gnowsis.com>
- Cc: public-rdf-dawg-comments@w3.org
I hit this in twinql -- you want to run a query, and return all of
the triples that you used to build the bindings.
I termed this 'faux-construct', though I didn't layer the syntax on
top ('*'). Essentially, the engine takes the query graph pattern and
uses it again for the construction pattern, pushing the results back
in to recreate the triples. The amount of effort for implementors is
essentially nil -- I got faux-construct working before CONSTRUCT itself.
It's quite useful for interchange, and makes a certain amount of
theoretical sense -- faux-construct returns the minimal graph
required for the given query to produce the intermediate bindings
(i.e., if you ran it as a SELECT, what's the smallest graph that
would return those results).
-R
On 16 Nov 2005, at 12:17, Leo Sauermann wrote:
>
> Hi,
>
> I am just in the process of writing many describe queries, where I
> basically want to select certain subgraphs of the graph,
> but do not necessarily construct something new.
>
> example:
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX org: <http://km.dfki.de/model/org#>
> PREFIX retrieve: <http://www.gnowsis.org/ont/gnoretrieve#>
> CONSTRUCT {
> <http://dfki.rdf.util.rdf2java/default#id_20050108_235544_41f227>
> org:containsMember ?m. ?m rdfs:label ?labelm. ?m rdf:type ?typem.
> }
> WHERE {
> <http://dfki.rdf.util.rdf2java/default#id_20050108_235544_41f227>
> org:containsMember ?m. ?m rdfs:label ?labelm. ?m rdf:type ?typem.
> }
>
> so what I do, Is that I basically include all triples that were needed
> to evaluate the binding.
> In Jena, there used to be a method to get all the triples that were
> used
> to determine a RDQL query, perhaps this would also work:
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> CONSTRUCT * WHERE {
> <http://dfki.rdf.util.rdf2java/default#id_20050108_235544_41f227>
> org:containsMember ?m. ?m rdfs:label ?labelm. ?m rdf:type ?typem.
> }
>
> In the current spec, this is intended for SELECT:
> |'SELECT' 'DISTINCT'? ( Var
> <http://www.w3.org/TR/rdf-sparql-query/#rVar>+ | '*' )|
>
> but not for describe.
>
> Additionally, to construct more, it may be nice to have:
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> CONSTRUCT *, {?m blah:blub 'Hello World' }
> WHERE {
> <http://dfki.rdf.util.rdf2java/default#id_20050108_235544_41f227>
> org:containsMember ?m. ?m rdfs:label ?labelm. ?m rdf:type ?typem.
> }
>
> did anybody else stumble accross these implementation problem yet?
>
> cheers
> Leo
>
>
Received on Thursday, 17 November 2005 01:30:30 UTC