W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > November 2005

CONSTRUCT: allow *?

From: Leo Sauermann <leo@gnowsis.com>
Date: Wed, 16 Nov 2005 21:17:24 +0100
Message-ID: <437B93D4.3080402@gnowsis.com>
To: public-rdf-dawg-comments@w3.org

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 Wednesday, 16 November 2005 20:17:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:49 GMT