This vocabulary defines a set of terms for describing changes to resource descriptions. The vocabulary introduces the notion of a ChangeSet which encapsulates the delta between two versions of a resource description. In this context a resource description is the set of triples that in some way comprise a description of a resource. The delta is represented by two sets of triples: additions and removals. A ChangeSet can be used to modify a resource description by first removing all triples from the description that are in the removals set and adding the triples in the additions set.
This example shows how a history of changes can be used to implement an "undo" or "rollback" of changes to a particular resource description. A linkd series of ChangeSets are shown below. The ChangeSets form an ordered list representing the version history of the resource description. A hypothetical user interface could present these changes, ordered using the precedingChangeSet property. Selecting a ChangeSet could result in the undoing of all changes up to that point. For the most recent ChangeSet this operation is simply a matter of removing all additions and adding all removals specified in the ChangeSet. Rolling back more than one ChangeSet involves reversing the effects of each ChangeSet in reverse chronological order. For example if the user requested a rollback up to and including the ChangeSet identified by ex:change3 then the additions and removals of ex:change5 would first have to be reversed, followed by those of the ChangeSet referenced by its precedingChangeSet property, ex:change4, and finally those of ex:change3 more...
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@prefix dc: <http://purl.org/dc/elements/1.1/>
@prefix cs: <http://purl.org/vocab/changeset/schema#>
@prefix ex: <http://example.com/res#>
<ex:change1>
a cs:ChangeSet ;
cs:subjectOfChange ex:thing ;
cs:createdDate "2006-01-01T00:00:00Z" ;
cs:creatorName "Anne Onymous" ;
cs:changeReason "Change of title" ;
cs:removal [
a rdf:Statement ;
rdf:subject ex:thing ;
rdf:predicate dc:title ;
rdf:object "Original Title" .
] ;
cs:addition [
a rdf:Statement ;
rdf:subject ex:thing ;
rdf:predicate dc:title ;
rdf:object "New Title" .
] .
<ex:change2>
a cs:ChangeSet ;
cs:precedingChangeSet ex:change1 ;
cs:subjectOfChange ex:thing ;
cs:createdDate "2006-01-02T00:00:00Z" ;
cs:creatorName "Anne Onymous" ;
cs:changeReason "Addition of identifier" ;
cs:addition [
a rdf:Statement ;
rdf:subject ex:thing ;
rdf:predicate dc:identifier ;
rdf:object "Z875331" .
] .
<ex:change3>
a cs:ChangeSet ;
cs:precedingChangeSet ex:change2 ;
cs:subjectOfChange ex:thing ;
cs:createdDate "2006-01-03T00:00:00Z" ;
cs:creatorName "Anne Onymous" ;
cs:changeReason "Removal of description" ;
cs:removal [
a rdf:Statement ;
rdf:subject ex:thing ;
rdf:predicate dc:descripton ;
rdf:object "A short description of this resource" .
] .
<ex:change4>
a cs:ChangeSet ;
cs:precedingChangeSet ex:change3 ;
cs:subjectOfChange ex:thing ;
cs:createdDate "2006-01-04T00:00:00Z" ;
cs:creatorName "Anne Onymous" ;
cs:changeReason "New description" ;
cs:addition [
a rdf:Statement ;
rdf:subject ex:thing ;
rdf:predicate dc:descripton ;
rdf:object "Revised description of resource" .
] .
<ex:change5>
a cs:ChangeSet ;
cs:precedingChangeSet ex:change4 ;
cs:subjectOfChange ex:thing ;
cs:createdDate "2006-01-05T00:00:00Z" ;
cs:creatorName "Anne Onymous" ;
cs:changeReason "Added creator and date" ;
cs:addition [
a rdf:Statement ;
rdf:subject ex:thing ;
rdf:predicate dc:creator ;
rdf:object "Jim Bo" .
] ;
cs:addition [
a rdf:Statement ;
rdf:subject ex:thing ;
rdf:predicate dc:date ;
rdf:object "2004-03-12T14:22:10Z" .
] .The following ChangeSet describes a change the the description of the resource identified by http://example.com/res#thing. It describes the removal of a single statement, the dc:title of the resource and the subsequent addition of another statement with a new value for dc:title. more...
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cs="http://purl.org/vocab/changeset/schema#">
<cs:ChangeSet rdf:about="http://example.com/changesets#change">
<cs:subjectOfChange rdf:resource="http://example.com/res#thing"/>
<cs:createdDate>2006-01-01T00:00:00Z</cs:createdDate>
<cs:creatorName>Anne Onymous</cs:creatorName>
<cs:changeReason>Change of title</cs:changeReason>
<cs:removal>
<rdf:Statement>
<rdf:subject rdf:resource="http://example.com/res#thing"/>
<rdf:predicate rdf:resource="http://purl.org/dc/elements/1.1/title"/>
<rdf:object>Original Title</rdf:object>
</rdf:Statement>
</cs:removal>
<cs:addition>
<rdf:Statement>
<rdf:subject rdf:resource="http://example.com/res#thing"/>
<rdf:predicate rdf:resource="http://purl.org/dc/elements/1.1/title"/>
<rdf:object>New Title</rdf:object>
</rdf:Statement>
</cs:addition>
</cs:ChangeSet>
</rdf:RDF>