W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2001

Contexts vs. Reification Revisited

From: Sean B. Palmer <sean@mysterylights.com>
Date: Sat, 5 May 2001 23:55:33 +0100
Message-ID: <003101c0d5b6$806a7b00$4bf02cc3@z5n9x1>
To: <www-rdf-interest@w3.org>
Using TimBL's model.n3 [1] as inspiration, along with Aaron's simple
explanation of the problem, here's a simple N3 filter that converts
contexts into reified statements:-

   { { { :a :b :c } } log:implies { [ a rdf:Statement; rdf:subject :a;
   rdf:predicate :b; rdf:object :c ] } } log:forAll :a , :b , :c .

I originally wanted to use it on itself (irony: a reifying filter,
reifying itself!), but CWM doesn't like doing that (because you have a
context within a context... which doesn't make all that much sense,
and won't convert), so I tried one which reifies a subject as a
context:-

   { { { :a :b :c } :d :e } log:implies { [ a rdf:Statement;
   rdf:subject :a; rdf:predicate :b; rdf:object :c ] :d :e } }
   log:forAll :a , :b , :c , :d , :e .

But that didn't work either, so I ended up converting the longer
filter into a set of reified statements by hand. I came up with:-

     [ a rdf:Statement; rdf:subject [ a rdf:Statement; rdf:subject
     [ a rdf:Statement; rdf:subject :a; rdf:predicate :b; rdf:object
:c ];
     rdf:predicate :d; rdf:object :e ]; rdf:predicate log:implies;
     rdf:object [ a rdf:Statement; rdf:subject [ a rdf:Statement;
     rdf:subject :a; rdf:predicate :b; rdf:object :c ]; rdf:predicate
:d;
     rdf:object :e ] ] log:forAll :a , :b , :c , :d , :e .

(see also, the pretty version [2]), and I did it twice, just to check.
Still, as with most of the things I do, I'm sure this has been
discussed to bits and already bought up ad nauseum. cf. [3].

[1] http://www.w3.org/2000/10/swap/model.n3
[2]
     [ a rdf:Statement;
       rdf:subject [ a rdf:Statement;
                     rdf:subject [ a rdf:Statement;
                                   rdf:subject :a;
                                   rdf:predicate :b;
                                   rdf:object :c ];
                     rdf:predicate :d;
                     rdf:object :e ];
       rdf:predicate log:implies;
       rdf:object [ a rdf:Statement;
                    rdf:subject [ a rdf:Statement;
                                  rdf:subject :a;
                                  rdf:predicate :b;
                                  rdf:object :c ];
                    rdf:predicate :d;
                    rdf:object :e ]
     ] log:forAll :a , :b , :c , :d , :e .
[3] http://www.w3.org/2000/03/rdf-tracking/#rdfms-contexts

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .
Received on Saturday, 5 May 2001 18:54:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:49 GMT