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

Querying the Origin of Statements

From: Jos De_Roo <jos.deroo@agfa.com>
Date: Sun, 12 Sep 2004 21:17:04 +0200
To: public-rdf-dawg@w3.org
Message-ID: <OF3677E055.042F26EA-ONC1256F0D.0067ABD8-C1256F0D.0069F545@agfa.com>

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).


-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/
Received on Sunday, 12 September 2004 19:18:24 GMT

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