Hi,
I have a RDF file thats used to track item revisions. Using this data I can traceback the changes made to an item through its lifetime. Once a specific has changed the corresponding data is placed as a new revision. Have a look..
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix mymeta: <http://www.mymeta.com/meta/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
<urn:ITEMID:12345> rdf:type mymeta:item .
<urn:ITEMID:12345> mymeta:itemchange <urn:ITEMID:12345:REV-1> .
<urn:ITEMID:12345:REV-1> dc:title "Product original name"@en .
<urn:ITEMID:12345:REV-1> dc:issued "2006-12-01"@en .
<urn:ITEMID:12345:REV-1> dc:format "4 x 6 x 1 in"@en .
<urn:ITEMID:12345:REV-1> dc:extent "200"@en .
<urn:ITEMID:12345> rdf:type mymeta:item .
<urn:ITEMID:12345> mymeta:itemchange <urn:ITEMID:12345:REV-2> .
<urn:ITEMID:12345:REV-2> dc:title "Improved Product Name"@en .
<urn:ITEMID:12345:REV-2> dc:issued "2007-06-01"@en .
According to this data, there was an item revision on "2007-06-01" where only the item name was changed to "Improved Product Name". As you can see, "dc:format" and "dc:extent" are missing from the latest data revision. This is on purpose to avoid millions of duplicate records!
I can write a SPARQL query that shows me the latest product revision information (REV-2: dc:title and dc:issued), but its missing "dc:format" and "dc:extent" which I want carried over from the last revision (REV-1).
How can I write a SPARQL query to do this? Any help much appreciated!