- From: Sean B. Palmer <sean@mysterylights.com>
- Date: Sat, 5 May 2001 23:55:33 +0100
- 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 UTC