Skip to content

Instantly share code, notes, and snippets.

@sfolsom
Last active January 31, 2023 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sfolsom/c91be2d1dd0f6984fdcd5a367d34cbae to your computer and use it in GitHub Desktop.
Save sfolsom/c91be2d1dd0f6984fdcd5a367d34cbae to your computer and use it in GitHub Desktop.
With and without Relationship patterns.
### Flat examples without using Activity Stream Relationship Pattern. In each case the consumer would have to go to the object URI/s to get more information.
## Create.
{
"type": "Create",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity0.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/sh85032152"
},
## Deprecate and merge cookeryWhiskey and cookeryWine into sh85032152
{
"type": "Deprecate",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity1.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/cookeryWhiskey"
},
{
"type": "Deprecate",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity1.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/cookeryWine"
},
{
"type": "Merge",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity1.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/cookeryWhiskey"
},
{
"type": "Merge",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity1.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/cookeryWine"
},
## Or Splitting sh85032152 into cookeryWhiskey and cookeryWine
{
"type": "Create",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity0.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/cookeryWhiskey"
},
{
"type": "Create",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity0.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/cookeryWine"
},
{
"type": "Split",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity1.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/sh85032152"
},
{
"type": "Deprecate",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity1.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/sh85032152"
},
### Flat examples using Activity Stream Relationship Pattern
## Relationship Pattern not applicable for Create.
{
"type": "Create",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity0.json",
"published": "2022-02-03T15:04:18Z",
"object": "http://id.loc.gov/authorities/subjects/sh85032152"
},
## If cookeryWhiskey was deprecated and replace by one entity.
{
"type": "Deprecate",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity1.json",
"published": "2022-02-03T15:04:18Z",
"object": [
{
"type": "Relationship",
"subject": "http://id.loc.gov/authorities/subjects/cookeryWhiskey",
"relationship": "http://www.loc.gov/mads/rdf/v1#useInstead",
"object": "http://id.loc.gov/authorities/subjects/sh85032152",
"startTime": "2015-04-21T12:34:56"
}
]
},
## If both cookeryWhiskey and cookeryWine were deprecated and replace by sh85032152.
{
"type": "Merge",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity2.json",
"published": "2022-02-03T15:04:18Z",
"object": [
{
"type": "Relationship",
"subject": "http://id.loc.gov/authorities/subjects/cookeryWhiskey",
"relationship": "http://www.loc.gov/mads/rdf/v1#useInstead",
"object": "http://id.loc.gov/authorities/subjects/sh85032152",
"startTime": "2015-04-21T12:34:56"
},
{
"type": "Relationship",
"subject": "http://id.loc.gov/authorities/subjects/cookeryWine",
"relationship": "http://www.loc.gov/mads/rdf/v1#useInstead",
"object": "http://id.loc.gov/authorities/subjects/sh85032152",
"startTime": "2015-04-21T12:34:56"
}
]
},
## If sh85032152 was deprecated and replaced by cookeryWhiskey and cookeryWine. Calls into question whether we should have multiple Activity types, and if not, if the Relationships should only be on the Splits.
{
"type": "Deprecate",
"type": "Split",
"id": "https://ld4.github.io/entity_metadata_management/examples/activity1.json",
"published": "2022-02-03T15:04:18Z",
"object": [
{
"type": "Relationship",
"subject": "http://id.loc.gov/authorities/subjects/sh85032152",
"relationship": "http://www.loc.gov/mads/rdf/v1#useInstead",
"object": "http://id.loc.gov/authorities/subjects/cookeryWhiskey",
"startTime": "2015-04-21T12:34:56"
},
{
"type": "Relationship",
"subject": "http://id.loc.gov/authorities/subjects/sh85032152",
"relationship": "http://www.loc.gov/mads/rdf/v1#useInstead",
"object": "http://id.loc.gov/authorities/subjects/cookeryWine",
"startTime": "2015-04-21T12:34:56"
}
]
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment