Linked Art in C#

object/pompeii-buildings/1 matches the site

On linked.art: Temporal Context: Periods, Events and Activities › Causes · site JSON · type HumanMadeObject · Events.Pompeii_Destroyed_By_Eruption

C#

public static HumanMadeObject Pompeii_Destroyed_By_Eruption()
{
    var pompeii = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/pompeii-buildings/1")
        .WithLabel("Buildings making up the city of Pompeii");

    pompeii.IdentifiedBy = [new Name("City of Pompeii").AsPrimaryName()];

    pompeii.DestroyedBy = new Destruction
    {
        CausedBy = [
            new Event().WithId("https://linked.art/example/event/vesuvius")
        ]
    };

    return pompeii;
}
  • Role shortcuts AsPrimaryName, AsAccessionNumber and AsSystemAssignedNumber each add a single classification, with the AAT terms Primary Name, Accession Number and System Number.

JSON from the C#

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/pompeii-buildings/1",
  "type": "HumanMadeObject",
  "_label": "Buildings making up the city of Pompeii",
  "identified_by": [
    {
      "type": "Name",
      "content": "City of Pompeii",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ]
    }
  ],
  "destroyed_by": {
    "type": "Destruction",
    "caused_by": [
      {
        "id": "https://linked.art/example/event/vesuvius",
        "type": "Event"
      }
    ]
  }
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/pompeii-buildings/1",
  "type": "HumanMadeObject",
  "_label": "Buildings making up the city of Pompeii",
  "identified_by": [
    {
      "type": "Name",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ],
      "content": "City of Pompeii"
    }
  ],
  "destroyed_by": {
    "type": "Destruction",
    "caused_by": [
      {
        "id": "https://linked.art/example/event/vesuvius",
        "type": "Event"
      }
    ]
  }
}

Comparison

The two documents are equivalent (property order ignored, array order significant).

Properties used

caused_by classified_as content destroyed_by identified_by

Vocabulary terms

Primary Name