- Created by E. Lynette Rayle, last modified on Jul 20, 2021
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 3 Next »
Overview
This proposes a change document structure using Activity Streams. It includes examples for each type of change.
Activity Streams
References:
Specification for Activity Stream 2.0
Sidecar specification describing activity types (e.g. add, delete, etc.)
Add Example:
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> 'milk'@en." }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/cow_milk> <http://my.authority/vocab/hasLabel> 'cow milk'@en. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/broader_term> <http://my_repo/entity/milk>. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/narrow_term> <http://my_repo/entity/bovine_milk>. }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> b1:. <b1:> <http://my.authority/vocab/label> 'milk'@en." }
Delete Example:
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> 'milk'@en." }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term cow milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/cow_milk> <http://my.authority/vocab/hasLabel> 'cow milk'@en. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/broader_term> <http://my_repo/entity/milk>. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/narrow_term> <http://my_repo/entity/bovine_milk>. }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> b1:. <b1:> <http://my.authority/vocab/label> "milk"@en." }
Deprecate Example:
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Deprecate term milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> 'milk'@en." }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term cow milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/cow_milk> <http://my.authority/vocab/hasLabel> 'cow milk'@en. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/broader_term> <http://my_repo/entity/milk>. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/narrow_term> <http://my_repo/entity/bovine_milk>. }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> b1:. <b1:> <http://my.authority/vocab/label> "milk"@en." }
Change Example:
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> 'milk'@en." } { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term Milk as a replacement of term milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> 'Milk'@en" }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete narrower terms for milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/cow_milk> <http://my.authority/vocab/narrow_term> 'bovine milk'@en. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/narrow_term> 'oxen milk'@en." } { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add narrower terms for milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/cow_milk> <http://my.authority/vocab/narrow_term> 'Bovine milk'@en. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/narrow_term> 'Oxen milk'@en." }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> b1:. <b1:> <http://my.authority/vocab/label> 'milk'@en."} { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term Milk as a replacement of term milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> b2:. <b2:> <http://my.authority/vocab/label> 'milk'@en."} }
Split Example:
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term cow milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/cow_milk> <http://my.authority/vocab/hasLabel> 'cow milk'@en." } { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term bovine milk split from cow milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/bovine_milk> <http://my.authority/vocab/hasLabel> 'bovine milk'@en." } { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term oxen milk split from cow milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/oxen_milk> <http://my.authority/vocab/hasLabel> 'oxen milk'@en" }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term cow milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/cow_milk> <http://my.authority/vocab/hasLabel> 'cow milk'@en. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/altLabel> <http://my_repo/entity/bovine_milk>. <http://my_repo/entity/cow_milk> <http://my.authority/vocab/altLabel> <http://my_repo/entity/oxen_milk>. }} { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term bovine milk split from cow milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/bovine_milk> <http://my.authority/vocab/hasLabel> 'bovine milk'@en." } { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term oxen milk split from cow milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/oxen_milk> <http://my.authority/vocab/hasLabel> 'oxen milk'@en" }
{ "@context": "https://www.w3.org/ns/activitystreams", "summary": "Delete term milk", "type": "Delete", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> b1:. <b1:> <http://my.authority/vocab/label> 'milk'@en."} { "@context": "https://www.w3.org/ns/activitystreams", "summary": "Add term Milk as a replacement of term milk", "type": "Add", "actor": { "type": "Authority", "id": "http://my.authority", "name": "My Authority" }, "graph": "<http://my_repo/entity/milk> <http://my.authority/vocab/hasLabel> b2:. <b2:> <http://my.authority/vocab/label> 'milk'@en."}}
RDF Diff
- Provides info on several tools that (for the most part) compare 2 graphs and report on differences (https://www.w3.org/2001/sw/wiki/How_to_diff_RDF)
RDF*
Specification (draft) of RDF* and SPARQL* - https://w3c.github.io/rdf-star/cg-spec/editors_draft.html
Other Refs
- High level description and examples - https://enterprise-knowledge.com/rdf-what-is-it-and-why-do-i-need-it/
IIIF Change Discovery
Specification: https://iiif.io/api/discovery/0.9/
Uses ActivityStreams
- No labels