RDF Reification
Neil Stansbury <[email protected]> Fri, 23 Dec 2005 01:56:47 +0000
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Hi all, I am trying to write a journal/undo mechanism for RDF statements. Considering the following arc: urn:abc => #dc:Title => "bob" Now if I change the arc's object from "bob" to "fred", I need to store the old value to be able to undo later. (Axel, perhaps you could correct me here) it doesn't seem possible to identify a specific arc without the entire triple? So I can't say the arc ID of "123456" last object was "bob", so first I assert: urn:abc => #dc:title => "fred" Then to avoid arcs colliding, in a different datasource I assert: urn:undo:1 => #undo => urn:abc urn:abc => #dc:title => "bob" All is well and good until the arc is changed again - say from "fred" to "mike" First: urn:abc => #dc:title => "mike" Then the journal assertion: urn:undo:2 => #undo => urn:abc urn:abc => #dc:title => "fred" But I already have an arc for "bob" so now I have no way of knowing which arc belongs to which "undo" assertion. Is this the kind of thing the RDF Reification Vocabulary could be used for? Something like: urn:undo:1 => rdf:subject => urn:abc urn:undo:1 => rdf:predicate => dc:Title urn:undo:1 => rdf:object => "bob" urn:undo:2 => rdf:subject => urn:abc urn:undo:2 => rdf:predicate => dc:Title urn:undo:2 => rdf:object => "fred" Not sure if this would be a correct way to use this vocab? In a similar vein, I'm intrigued when using the mozStorage interfaces for RDF as discussed here: http://wiki.mozilla.org/Mozilla2:Unified_Storage#RDF_Data_Store_interface How a triple in a datasource is going to be mapped to a "triple_id" in the SQL when saving an assertion? Or is the intention to just use nsIRDFXMLSerializer against an entire datasource rather than individual arcs? Cheers, N