Linked Art in C#

object/nightwatch/2 matches the site

The accession number identifier for "The Night Watch" is "SK-C-5":

On linked.art: Basic Patterns › Identifiers · site JSON · type HumanMadeObject · BasicPatterns.NightWatch_2_Accession

C#

public static HumanMadeObject NightWatch_2_Accession()
{
    var nightWatch = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/nightwatch/2")
        .WithLabel("Night Watch by Rembrandt");

    var accessionNumber = new Identifier("SK-C-5").AsAccessionNumber();
    var name = new Name("The Night Watch").AsPrimaryName();

    nightWatch.IdentifiedBy = [accessionNumber, name];

    return nightWatch;
}
  • 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/nightwatch/2",
  "type": "HumanMadeObject",
  "_label": "Night Watch by Rembrandt",
  "identified_by": [
    {
      "type": "Identifier",
      "content": "SK-C-5",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300312355",
          "type": "Type",
          "_label": "Accession Number"
        }
      ]
    },
    {
      "type": "Name",
      "content": "The Night Watch",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/2",
  "type": "HumanMadeObject",
  "_label": "Night Watch by Rembrandt",
  "identified_by": [
    {
      "type": "Identifier",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300312355",
          "type": "Type",
          "_label": "Accession Number"
        }
      ],
      "content": "SK-C-5"
    },
    {
      "type": "Name",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ],
      "content": "The Night Watch"
    }
  ]
}

Comparison

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

Properties used

classified_as content identified_by

Vocabulary terms

Accession Number Primary Name