Linked Art in C#

object/yiadom-boakye/1 matches the site

The Kehinde Wiley painting "Portrait of Lynette Yiadom-Boakye, Jacob Morland of Capplethwaite" is jointly owned by the Yale University Art Gallery and the Yale Center for British Art. Both organizations have assigned their own accession numbers to the painting, and both are correct simultaneously.

On linked.art: Relationships and Context for Assignment of Attributes › Assigned Value as Subject Entity · site JSON · type HumanMadeObject · Assertions.Two_Accession_Numbers

C#

public static HumanMadeObject Two_Accession_Numbers()
{
    var portrait = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/yiadom-boakye/1")
        .WithLabel("Portrait of Lynette Yiadom-Boakye")
        .WithClassifiedAs(Aat.Painting, Aat.TypeOfWork);

    var yuagId = new Identifier("2021.25.1").AsAccessionNumber();
    yuagId.AssignedBy = [
        new AttributeAssignment()
        {
            CarriedOutBy = [
                new Group()
                    .WithId("https://linked.art/example/group/yuag")
                    .WithLabel("Yale University Art Gallery")
                    .WithClassifiedAs(Aat.Museum)
            ]
        }
    ];

    var ycbaId = new Identifier("B2021.5").AsAccessionNumber();
    ycbaId.AssignedBy = [
        new AttributeAssignment()
        {
            CarriedOutBy = [
                new Group()
                    .WithId("https://linked.art/example/group/ycba")
                    .WithLabel("Yale Center for British Art")
                    .WithClassifiedAs(Aat.Museum)
            ]
        }
    ];
    portrait.IdentifiedBy = [ yuagId, ycbaId ];

    return portrait;
}
  • 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/yiadom-boakye/1",
  "type": "HumanMadeObject",
  "_label": "Portrait of Lynette Yiadom-Boakye",
  "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": "Identifier",
      "content": "2021.25.1",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300312355",
          "type": "Type",
          "_label": "Accession Number"
        }
      ],
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "carried_out_by": [
            {
              "id": "https://linked.art/example/group/yuag",
              "type": "Group",
              "_label": "Yale University Art Gallery",
              "classified_as": [
                {
                  "id": "http://vocab.getty.edu/aat/300312281",
                  "type": "Type",
                  "_label": "Museum"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "Identifier",
      "content": "B2021.5",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300312355",
          "type": "Type",
          "_label": "Accession Number"
        }
      ],
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "carried_out_by": [
            {
              "id": "https://linked.art/example/group/ycba",
              "type": "Group",
              "_label": "Yale Center for British Art",
              "classified_as": [
                {
                  "id": "http://vocab.getty.edu/aat/300312281",
                  "type": "Type",
                  "_label": "Museum"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/yiadom-boakye/1",
  "type": "HumanMadeObject",
  "_label": "Portrait of Lynette Yiadom-Boakye",
  "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": "Identifier",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300312355",
          "type": "Type",
          "_label": "Accession Number"
        }
      ],
      "content": "2021.25.1",
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "carried_out_by": [
            {
              "id": "https://linked.art/example/group/yuag",
              "type": "Group",
              "_label": "Yale University Art Gallery",
              "classified_as": [
                {
                  "id": "http://vocab.getty.edu/aat/300312281",
                  "type": "Type",
                  "_label": "Museum"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "type": "Identifier",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300312355",
          "type": "Type",
          "_label": "Accession Number"
        }
      ],
      "content": "B2021.5",
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "carried_out_by": [
            {
              "id": "https://linked.art/example/group/ycba",
              "type": "Group",
              "_label": "Yale Center for British Art",
              "classified_as": [
                {
                  "id": "http://vocab.getty.edu/aat/300312281",
                  "type": "Type",
                  "_label": "Museum"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Comparison

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

Properties used

assigned_by carried_out_by classified_as content identified_by

Vocabulary terms

Painting Museum Accession Number Type of Work