Linked Art in C#

object/yul_10801219/1 matches the site

Yale University Library holds a copy of Koot's book about The Night Watch.

On linked.art: Texts and Documents › Physical Objects, Conceptual Texts · site JSON · type HumanMadeObject · TextualDocuments.HumanMadeObject_Carries_Linguistic

C#

public static HumanMadeObject HumanMadeObject_Carries_Linguistic()
{
    var kootCopy = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/yul_10801219/1")
        .WithLabel("Yale's copy of Koot's Night Watch")
        .WithClassifiedAs(Aat.Book, Aat.TypeOfWork);

    kootCopy.IdentifiedBy = [ 
        new Name("Rembrandt's Night Watch. A Fascinating Story").AsPrimaryName(),
        new Identifier("mfhd:10801219").AsSystemAssignedNumber()
    ];

    kootCopy.ReferredToBy = [
        new LinguisticObject()
            .WithContent("92 p. with illus.")
            .WithClassifiedAs(Aat.PhysicalStatement, Aat.Statement)
    ];

    kootCopy.Carries = [
        new LinguisticObject()
            .WithId("https://linked.art/example/text/koot_nightwatch")
            .WithLabel("Content of Koot's Night Watch")
    ];

    return kootCopy;
}
  • 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/yul_10801219/1",
  "type": "HumanMadeObject",
  "_label": "Yale's copy of Koot's Night Watch",
  "carries": [
    {
      "id": "https://linked.art/example/text/koot_nightwatch",
      "type": "LinguisticObject",
      "_label": "Content of Koot's Night Watch"
    }
  ],
  "classified_as": [
    {
      "id": "http://vocab.getty.edu/aat/300028051",
      "type": "Type",
      "_label": "Book",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300435443",
          "type": "Type",
          "_label": "Type of Work"
        }
      ]
    }
  ],
  "identified_by": [
    {
      "type": "Name",
      "content": "Rembrandt's Night Watch. A Fascinating Story",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ]
    },
    {
      "type": "Identifier",
      "content": "mfhd:10801219",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300435704",
          "type": "Type",
          "_label": "System-Assigned Number"
        }
      ]
    }
  ],
  "referred_to_by": [
    {
      "type": "LinguisticObject",
      "content": "92 p. with illus.",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300435452",
          "type": "Type",
          "_label": "Physical Statement",
          "classified_as": [
            {
              "id": "http://vocab.getty.edu/aat/300418049",
              "type": "Type",
              "_label": "Brief Text"
            }
          ]
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/yul_10801219/1",
  "type": "HumanMadeObject",
  "_label": "Yale's copy of Koot's Night Watch",
  "classified_as": [
    {
      "id": "http://vocab.getty.edu/aat/300028051",
      "type": "Type",
      "_label": "Book",
      "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": "Rembrandt's Night Watch. A Fascinating Story"
    },
    {
      "type": "Identifier",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300435704",
          "type": "Type",
          "_label": "System-Assigned Number"
        }
      ],
      "content": "mfhd:10801219"
    }
  ],
  "referred_to_by": [
    {
      "type": "LinguisticObject",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300435452",
          "type": "Type",
          "_label": "Physical Statement",
          "classified_as": [
            {
              "id": "http://vocab.getty.edu/aat/300418049",
              "type": "Type",
              "_label": "Brief Text"
            }
          ]
        }
      ],
      "content": "92 p. with illus."
    }
  ],
  "carries": [
    {
      "id": "https://linked.art/example/text/koot_nightwatch",
      "type": "LinguisticObject",
      "_label": "Content of Koot's Night Watch"
    }
  ]
}

Comparison

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

Properties used

carries classified_as content identified_by referred_to_by

Vocabulary terms

Book Primary Name Brief Text Type of Work Physical Statement System-Assigned Number