Return-Path: X-Original-To: apmail-clerezza-dev-archive@www.apache.org Delivered-To: apmail-clerezza-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AB47FE48 for ; Wed, 20 Mar 2013 09:33:23 +0000 (UTC) Received: (qmail 35435 invoked by uid 500); 20 Mar 2013 09:33:23 -0000 Delivered-To: apmail-clerezza-dev-archive@clerezza.apache.org Received: (qmail 35381 invoked by uid 500); 20 Mar 2013 09:33:23 -0000 Mailing-List: contact dev-help@clerezza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@clerezza.apache.org Delivered-To: mailing list dev@clerezza.apache.org Received: (qmail 35350 invoked by uid 99); 20 Mar 2013 09:33:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Mar 2013 09:33:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andy.seaborne.apache@gmail.com designates 209.85.214.50 as permitted sender) Received: from [209.85.214.50] (HELO mail-bk0-f50.google.com) (209.85.214.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Mar 2013 09:33:13 +0000 Received: by mail-bk0-f50.google.com with SMTP id jg9so627515bkc.9 for ; Wed, 20 Mar 2013 02:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Psw5yiACDMXTSG7oARDtLmQr94hS0udwQRwojSdMssM=; b=uZR2WEsw2hjGfiXUZASMUIRcubxTqPepnaEsd8hyGNjXpo0dKHoC5VzLYRYMsBsZDT /UMAIdApKHc/qkGeHittwLdNk9v7CbJ48yIWmbUX+8RKfsAJYVXKoSJLbXswO1dkvQEh UYsjuNfoyuOtP2hVL67KvH6YvJc7FaEG9HiqvYkiNw1+qBJ9VKVii66SLT6LHRaMDaRJ Se7tsTLkrePzT2HP45r/ZPBwpF54s6w8Tvw2QDpsWPYZOpcpVMSRZ08BnKTnMNjdGfHw VGl0E/vKaXFQSziF2a6qopVzU8TlBaYjWz53jaa1KhLA8r5MT0zUU0+hemwmhG8sfGx9 SUtQ== X-Received: by 10.205.7.72 with SMTP id on8mr10273060bkb.122.1363771972767; Wed, 20 Mar 2013 02:32:52 -0700 (PDT) Received: from [192.168.0.10] (cpc37-aztw23-2-0-cust35.18-1.cable.virginmedia.com. [94.174.128.36]) by mx.google.com with ESMTPS id z6sm207728bkv.11.2013.03.20.02.32.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Mar 2013 02:32:51 -0700 (PDT) Sender: Andy Seaborne Message-ID: <51498242.4020809@apache.org> Date: Wed, 20 Mar 2013 09:32:50 +0000 From: Andy Seaborne User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: dev@clerezza.apache.org Subject: Re: Sparql 1.1 and Fastlane References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 20/03/13 06:37, Hasan Hasan wrote: > Hi Reto > > Right, the name of all graphs should be returned. But you don't specify any > graphs > in the query, so the default graph is returned. > GRAPH ?graphName {} (which is a Graph Graph Pattern) refers to graphs we > specify in DatasetClause (that is 'FROM' ( DefaultGraphClause | > NamedGraphClause )) GRAPH ?graphName {} is all the named graphs in the RDF Dataset being queried. Like SELECT DISTINCT ?g { GRAPH ?g { ?s ?p ?o } } but includes empty named graphs. Only FROM NAMED affects it. Andy > > cheers > Hasan > > On Tue, Mar 19, 2013 at 3:57 PM, Reto Bachmann-Gm�r wrote: > >> Hi Hasan, >> >> I don't think so. If the defaultGraph is returned this tells the caller >> that the query is directed only against the default graph and can thus >> fastlane the query to the provider of the default graph. But if I >> understand the query correctly the name of all graphs should be returned. >> So it can only be fastlaned if the TcManager has exactly one provider, in >> all other cases it has to be slowlaned. >> >> Cheers, >> Reto >> >> On Tue, Mar 19, 2013 at 7:48 AM, Hasan wrote: >> >>> Hi Reto, >>> >>> I think it should return the defaultGraph. >>> http://www.w3.org/TR/rdf-sparql-query/#queryDataset >>> >>> Cheers >>> Hasan >>> >>> On Mon, Mar 18, 2013 at 8:21 PM, Reto Bachmann-Gm�r >>> wrote: >>> >>>> Hi Hasan >>>> >>>> What should >>>> >>>> Set getQueryGraphs(Sting query, UriRef defaulGraph) >>>> >>>> return for a query like: >>>> >>>> SELECT ?graphName WHERE { GRAPH ?graphName {} } >>>> >>>> null? throw an exception? Or should we change the method to better suit >>>> these cases? >>>> >>>> Cheeers, >>>> Reto >>>> >>>> On Tue, Feb 26, 2013 at 4:36 AM, Reto Bachmann-Gm�r >>>> wrote: >>>> >>>>> Hi Hasan >>>>> >>>>> On Tue, Feb 26, 2013 at 4:11 AM, Hasan wrote: >>>>> >>>>>>> - Create subclass of TcProvider that accepts sparql query as >> string >>>>>>> >>>>>> >>>>>> Assumed that this string will be used when invoking the underlying >>>> engine >>>>>> >>>>>> Yes >>>>> >>>>>> >>>>>>> - Have a minimum parsing of the queries to get the names a query >> is >>>>>>> directed against >>>>>>> >>>>>> >>>>>> this would be the datasetclause of the "sparql query" and in case of >>>>>> "sparql update" >>>>>> it would be the graphref. >>>>>> So we need a simple parser to extract iri of the affected graphs. >>>>>> How should the interface definition of the parser look like for >> sparql >>>>>> update? >>>>>> >>>>> >>>>> What about a class SparqlPreParser with a singe method Set >>>>> getReferredGraphs(Sting query). The method should return all graphs >> the >>>>> query is directed to excluding remote service graph. One issue is the >>>>> default graph, the caller should know if the query explicitly sets a >>>>> default graph. So it would probably better to have Set >>>>> getQueryGraphs(Sting query, UriRef defaulGraph) instead. With this >>> method >>>>> defaultGraph is part of the result if the query has no FROM clause. >>>>> >>>>> >>>>> >>>>>> >>>>>>> >>>>>>> Question: >>>>>>> - Did you already model the results of Sparql 1.1? I think there >> is >>> no >>>>>> big >>>>>>> difference there to 1.0. >>>>>>> >>>>>> >>>>>> afaik it is the same for query, but a sparql update results in >> success >>>> or >>>>>> failure. >>>>>> >>>>> >>>>> Which is the same as for ASK queries. So the result is an Object that >>> can >>>>> be cast either to a ResultSet, a Graph or a Boolean. >>>>> >>>>> >>>>> Cheers, >>>>> Reto >>>>> >>>> >>> >> >