W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2004

Re: Querying the Origin of Statements

From: Eric Prud'hommeaux <eric@w3.org>
Date: Sun, 12 Sep 2004 16:20:08 -0400
To: Jos De_Roo <jos.deroo@agfa.com>
Cc: public-rdf-dawg@w3.org
Message-ID: <20040912202008.GA30902@w3.org>
On Sun, Sep 12, 2004 at 09:17:04PM +0200, Jos De_Roo wrote:
> 
> In http://www.w3.org/2001/sw/DataAccess/rq23/#source
> $Revision: 1.55 $ of $Date: 2004/09/07 13:03:48 $
> 
> there is an interesting test case, at least I have made one out of it..
> 
> 
> ====
> data
> ====
> 
> ### http://eulersharp.sourceforge.net/2004/04test/statement1.n3
> 
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
> @prefix  bank:  <http://bank.example/statements#>.
> 
> _:1 rdf:type bank:Statement .
> _:1 bank:creditor "Joe's Grill" .
> _:1 bank:debtor bank:act01347797 .
> _:1 bank:date "2002-07-06" .
> _:1 bank:amount "18.23" .
> ###
> 
> 
> ### http://eulersharp.sourceforge.net/2004/04test/JoeCo.n3
> 
> @prefix  ical:  <www.w3.org/2002/12/cal/ical#> .
> 
> _:1 a ical:Vevent .
> _:1 ical:uid "20020630T230445Z-3895-69-1-7@jammer" .
> _:1 ical:dtstart "2002-07-06" .
> _:1 ical:summary "Scooby Conference" .
> _:1 ical:location "San Francisco" .
> ###
> 
> 
> ### http://eulersharp.sourceforge.net/2004/04test/origin.n3
> 
> @prefix log: <http://www.w3.org/2000/10/swap/log#>.
> @prefix bank:  <http://bank.example/statements#>.
> 
> bank:debtor log:definitiveDocument <statement1.n3>.
> bank:creditor log:definitiveDocument <statement1.n3>.
> bank:amount log:definitiveDocument <statement1.n3>.
> ###
> 
> 
> =====
> query
> =====
> 
> ### http://eulersharp.sourceforge.net/2004/04test/originQ.n3
> 
> @prefix q: <http://www.w3.org/2004/ql#>.
> @prefix bank:  <http://bank.example/statements#>.
> @prefix ical:  <www.w3.org/2002/12/cal/ical#> .
> 
> []
> q:select { (?C ?A ?D ?S ?L) };
> q:where { ?X bank:debtor bank:act01347797; bank:creditor ?C;
>              bank:amount ?A; bank:date ?D.
>           ?Y ical:dtstart ?D; ical:summary ?S; ical:location ?L }.
> ###
> 
> 
> ======
> result
> ======
> 
> ### http://eulersharp.sourceforge.net/2004/04test/originE.n3
> 
> @prefix log: <http://www.w3.org/2000/10/swap/log#>.
> @prefix ical: <file://sfcvs/2004/04test/www.w3.org/2002/12/cal/ical#>.
> @prefix q: <http://www.w3.org/2004/ql#>.
> @prefix bank: <http://bank.example/statements#>.
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
> 
> ("Joe's Grill" "18.23" "2002-07-06" "Scooby Conference" "San Francisco") . 
> 
> ###
> 
> 
> The design is with log:definitiveDocument
> http://www.w3.org/2000/10/swap/doc/Reach#Getting1
> which is very nifty imo..
> If in origin.n3 one would have
>   bank:creditor log:definitiveDocument <statement74.n3>.
> then there are no results (I have tested that).

So the provenance assertions are in the data. In N3QL, it's trivial to
express these provenance assertions along with your query because the
query is also just data.

It occurs to me that I should have included some assertions that the
are ruled out by the provenance constraints. Perhaps I'll update the
less trusted document at or after the face to face.
-- 
-eric

office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
                        Shonan Fujisawa Campus, Keio University,
                        5322 Endo, Fujisawa, Kanagawa 252-8520
                        JAPAN
        +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +1.857.222.5741 (does not work in Asia)

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Sunday, 12 September 2004 20:20:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:20 GMT