W3C home > Mailing lists > Public > public-sparql-dev@w3.org > July to September 2007

RE: SPARQL Algebra to SPARQL Query

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Tue, 21 Aug 2007 16:53:51 +0100
Message-ID: <86FE9B2B91ADD04095335314BE6906E80164AE65@sdcexc04.emea.cpqcorp.net>
To: "Ahmad Ali Iqbal" <ahmad.iqbal@nicta.com.au>, <public-sparql-dev@w3.org>



-------- Original Message --------
> From: Ahmad Ali Iqbal <>
> Date: 21 August 2007 04:28
> 
> Hi all,
> 
> I am curious to know, if anyone know that how can we generate a SPARQL
> query given that we have available SPARQL Algebra.

I recently added this to ARQ in aid of an extension for calling remote
SPARQL services in the middle of a query.

The extension is a new graph pattern:

    SERVICE <endpointURI> { ..pattern.. }

To make the remote call over HTTP, the algebra expression for the
pattern needs to be turned into a SPARQL query string.


The conversion to the syntax reverses the query string -> algebra
algortihm from the SPAQRL spec.

It does not always get exactly the same syntax as input (slight ordering
differences that the original conversion looses) but it will be a query
that will then generate the same algebra expression (i.e. it's blank
node isomorphic).

The code is in ARQ 2.1 beta (just released).

	Andy

> 
> Thanks,
> 
> ---
> Ahmad

------------------------------------------
 Hewlett-Packard Limited
 Registered Office: Cain Road, Bracknell, Berks RG12 1HN
 Registered No: 690597 England
Received on Tuesday, 21 August 2007 15:54:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 December 2014 20:04:55 UTC