Linked Art in C#

object/nightwatch/26 matches the site

Minor conservation improvements were made to The Night Watch.

On linked.art: Conservation Activity › Conservation Activities · site JSON · type HumanMadeObject · Conservation.Nightwatch_Improvements

C#

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

    nightWatch.ModifiedBy = [
        new Modification()
        {
            Label = "Conservation of Night Watch",
            ReferredToBy = [
                new LinguisticObject()
                    .WithClassifiedAs(Aat.Description, Aat.Statement)
                    .WithContent("Minor conservation work in response to earlier survey")
            ],
            Technique = [Aat.Term("300053027", "Cleaning")],
            TimeSpan = new LinkedArtTimeSpan
            {
                BeginOfTheBegin = new LinkedArtDate(2020, 1, 1),
                EndOfTheEnd = new LinkedArtDate(2021, 12, 31).LastSecondOfDay()
            },
            CarriedOutBy = [
                new Group()
                    .WithId("https://linked.art/example/group/rijksmuseum")
                    .WithLabel("Rijksmuseum")
            ],
            PartOf = [
                new Activity()
                    .WithId("https://linked.art/example/event/operation_nightwatch")
                    .WithLabel("Operation Night Watch")
            ]
        }
    ];

    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.
  • Terms outside the registry The vocabulary registry holds only the terms linked.art itself publishes, so a dataset's own concepts, places and people are written with Aat.Term, Tgn.Place and Ulan.Person, giving the id and the label.

JSON from the C#

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/26",
  "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"
        }
      ]
    }
  ],
  "modified_by": [
    {
      "type": "Modification",
      "_label": "Conservation of Night Watch",
      "carried_out_by": [
        {
          "id": "https://linked.art/example/group/rijksmuseum",
          "type": "Group",
          "_label": "Rijksmuseum"
        }
      ],
      "timespan": {
        "type": "TimeSpan",
        "begin_of_the_begin": "2020-01-01T00:00:00Z",
        "end_of_the_end": "2021-12-31T23:59:59Z"
      },
      "referred_to_by": [
        {
          "type": "LinguisticObject",
          "content": "Minor conservation work in response to earlier survey",
          "classified_as": [
            {
              "id": "http://vocab.getty.edu/aat/300435416",
              "type": "Type",
              "_label": "Description",
              "classified_as": [
                {
                  "id": "http://vocab.getty.edu/aat/300418049",
                  "type": "Type",
                  "_label": "Brief Text"
                }
              ]
            }
          ]
        }
      ],
      "part_of": [
        {
          "id": "https://linked.art/example/event/operation_nightwatch",
          "type": "Activity",
          "_label": "Operation Night Watch"
        }
      ],
      "technique": [
        {
          "id": "http://vocab.getty.edu/aat/300053027",
          "type": "Type",
          "_label": "Cleaning"
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/26",
  "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"
        }
      ]
    }
  ],
  "modified_by": [
    {
      "type": "Modification",
      "_label": "Conservation of Night Watch",
      "referred_to_by": [
        {
          "type": "LinguisticObject",
          "classified_as": [
            {
              "id": "http://vocab.getty.edu/aat/300435416",
              "type": "Type",
              "_label": "Description",
              "classified_as": [
                {
                  "id": "http://vocab.getty.edu/aat/300418049",
                  "type": "Type",
                  "_label": "Brief Text"
                }
              ]
            }
          ],
          "content": "Minor conservation work in response to earlier survey"
        }
      ],
      "technique": [
        {
          "id": "http://vocab.getty.edu/aat/300053027",
          "type": "Type",
          "_label": "Cleaning"
        }
      ],
      "timespan": {
        "type": "TimeSpan",
        "begin_of_the_begin": "2020-01-01T00:00:00Z",
        "end_of_the_end": "2021-12-31T23:59:59Z"
      },
      "carried_out_by": [
        {
          "id": "https://linked.art/example/group/rijksmuseum",
          "type": "Group",
          "_label": "Rijksmuseum"
        }
      ],
      "part_of": [
        {
          "id": "https://linked.art/example/event/operation_nightwatch",
          "type": "Activity",
          "_label": "Operation Night Watch"
        }
      ]
    }
  ]
}

Comparison

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

Properties used

begin_of_the_begin carried_out_by classified_as content end_of_the_end modified_by part_of referred_to_by technique timespan

Vocabulary terms

Painting Cleaning Brief Text Description Type of Work