Linked Art in C#

object/nightwatch/57 matches the site

The Night Watch is related to another object in the Rijksmuseum collection "Nachtwacht", but the relationship is not captured specifically.

On linked.art: Relationships and Context for Assignment of Attributes › Related Entities · site JSON · type HumanMadeObject · Assertions.Non_Specific_Relationship

C#

public static HumanMadeObject Non_Specific_Relationship()
{
    var nightwatch = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/nightwatch/57")
        .WithLabel("The Night Watch")
        .WithClassifiedAs(Aat.Painting, Aat.TypeOfWork);

    nightwatch.IdentifiedBy = [new Name("The Night Watch").AsPrimaryName()];

    nightwatch.AttributedBy = [
        new AttributeAssignment()
        {
            IdentifiedBy = [
                new Name("Related Object")
                    .WithClassifiedAs(Aat.DisplayName)
            ],
            Assigned = [
                new HumanMadeObject()
                    .WithId("https://linked.art/example/object/rppob-28-106")
                    .WithLabel("Nachtwacht")
            ],
        }
    ];

    return nightwatch;
}
  • Metatype classification The second argument classifies the first, not the object: WithClassifiedAs(Aat.Description, Aat.Statement) says this is a Description, and Description is a kind of Statement. The Plain C# form shows the nesting.
  • 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/57",
  "type": "HumanMadeObject",
  "_label": "The Night Watch",
  "classified_as": [
    {
      "id": "http://vocab.getty.edu/aat/300033618",
      "type": "Type",
      "_label": "Painting",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300435443",
          "type": "Type",
          "_label": "Type of Work"
        }
      ]
    }
  ],
  "identified_by": [
    {
      "type": "Name",
      "content": "The Night Watch",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ]
    }
  ],
  "attributed_by": [
    {
      "type": "AttributeAssignment",
      "identified_by": [
        {
          "type": "Name",
          "content": "Related Object",
          "classified_as": [
            {
              "id": "http://vocab.getty.edu/aat/300404669",
              "type": "Type",
              "_label": "Display Title"
            }
          ]
        }
      ],
      "assigned": [
        {
          "id": "https://linked.art/example/object/rppob-28-106",
          "type": "HumanMadeObject",
          "_label": "Nachtwacht"
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/57",
  "type": "HumanMadeObject",
  "_label": "The Night Watch",
  "classified_as": [
    {
      "id": "http://vocab.getty.edu/aat/300033618",
      "type": "Type",
      "_label": "Painting",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300435443",
          "type": "Type",
          "_label": "Type of Work"
        }
      ]
    }
  ],
  "identified_by": [
    {
      "type": "Name",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ],
      "content": "The Night Watch"
    }
  ],
  "attributed_by": [
    {
      "type": "AttributeAssignment",
      "identified_by": [
        {
          "type": "Name",
          "classified_as": [
            {
              "id": "http://vocab.getty.edu/aat/300404669",
              "type": "Type",
              "_label": "Display Title"
            }
          ],
          "content": "Related Object"
        }
      ],
      "assigned": [
        {
          "id": "https://linked.art/example/object/rppob-28-106",
          "type": "HumanMadeObject",
          "_label": "Nachtwacht"
        }
      ]
    }
  ]
}

Comparison

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

Properties used

assigned attributed_by classified_as content identified_by

Vocabulary terms

Painting Display Title Primary Name Type of Work