Re: Transformation to RDF reification

On 2012-09 -26, at 14:20, Dominik Tomaszuk wrote:

> Hi all,
> 
> Does anyone know a tool for transforming from normal RDF to RDF with reification?
> 
> I mean:
> 
> :s1 :p1 :o1 .
> :s2 :p2 :o2 .
> 
> transform to:
> 
> _:a rdf:type rdf:Statement .
> _:a rdf:subject :s1 .
> _:a rdf:predicate :p1 .
> _:a rdf:object :o1 .
> _:b rdf:type rdf:Statement .
> _:b rdf:subject :s2 .
> _:b rdf:predicate :p2 .
> _:b rdf:object :o2 .
> 
> Supported syntaxes are irrelevant.
> 
> Best,
> Dominik
> 
> 

CWM, part from bing able to do it with rules, has a form of reification built in:

$ echo ':s1 :p1 :o1 . :s2 :p2 :o2 .' | cwm --reify
#Processed by Id: cwm.py,v 1.198 2012/01/30 09:30:20 timbl Exp 
        #    using base file:///devel/github.com/linkeddata/tabulator-firefox/content/js/panes/issue/
             @prefix : <http://www.w3.org/2004/06/rei#> .
    @prefix owl: <http://www.w3.org/2002/07/owl#> .
    
      [      a <http://www.w3.org/2000/10/swap/log#Truth>;
             :existentials  [
                 owl:oneOf () ];
             :statements  [
                 owl:oneOf  (
                 [
                         :object  [
                             :uri "file:///devel/github.com/linkeddata/tabulator-firefox/content/js/panes/issue/#o1" ];
                         :predicate  [
                             :uri "file:///devel/github.com/linkeddata/tabulator-firefox/content/js/panes/issue/#p1" ];
                         :subject  [
                             :uri "file:///devel/github.com/linkeddata/tabulator-firefox/content/js/panes/issue/#s1" ] ]
                 [
                         :object  [
                             :uri "file:///devel/github.com/linkeddata/tabulator-firefox/content/js/panes/issue/#o2" ];
                         :predicate  [
                             :uri "file:///devel/github.com/linkeddata/tabulator-firefox/content/js/panes/issue/#p2" ];
                         :subject  [
                             :uri "file:///devel/github.com/linkeddata/tabulator-firefox/content/js/panes/issue/#s2" ] ] ) ];
             :universals  [
                 owl:oneOf () ] ].
    
$ 

Received on Wednesday, 26 September 2012 22:36:10 UTC