Linked Art in C#

object/nightwatch/25 matches the site

The Rijksmuseum checked the condition of The Night Watch, at the beginning of the project "Operation Night Watch"

On linked.art: Conservation Activity › Condition Assessment · site JSON · type HumanMadeObject · Conservation.Nightwatch_Condition

C#

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

    nightWatch.AttributedBy = [
        new AttributeAssignment()
        {
            Label = "Condition Assessment of Night Watch",
            IdentifiedBy = [new Name("Thorough Condition Assessment")],
            ReferredToBy = [
                new LinguisticObject()
                    .WithClassifiedAs(Aat.Description, Aat.Statement)
                    .WithContent("Very fine cracks throughout the painted surface")
            ],
            TimeSpan = new LinkedArtTimeSpan
            {
                BeginOfTheBegin = new LinkedArtDate(2019, 5, 1),
                EndOfTheEnd = new LinkedArtDate(2019, 9, 30).LastSecondOfDay()
            },
            CarriedOutBy = [
                new Group()
                    .WithId("https://linked.art/example/group/rijksmuseum")
                    .WithLabel("Rijksmuseum")
            ],
            AssignedProperty = "classified_as",
            Assigned = [ Aat.Term("300387447", "Microcracks") ],
            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/25",
  "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"
        }
      ]
    }
  ],
  "attributed_by": [
    {
      "type": "AttributeAssignment",
      "_label": "Condition Assessment of Night Watch",
      "carried_out_by": [
        {
          "id": "https://linked.art/example/group/rijksmuseum",
          "type": "Group",
          "_label": "Rijksmuseum"
        }
      ],
      "identified_by": [
        {
          "type": "Name",
          "content": "Thorough Condition Assessment"
        }
      ],
      "timespan": {
        "type": "TimeSpan",
        "begin_of_the_begin": "2019-05-01T00:00:00Z",
        "end_of_the_end": "2019-09-30T23:59:59Z"
      },
      "referred_to_by": [
        {
          "type": "LinguisticObject",
          "content": "Very fine cracks throughout the painted surface",
          "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"
        }
      ],
      "assigned_property": "classified_as",
      "assigned": [
        {
          "id": "http://vocab.getty.edu/aat/300387447",
          "type": "Type",
          "_label": "Microcracks"
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/25",
  "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"
        }
      ]
    }
  ],
  "attributed_by": [
    {
      "type": "AttributeAssignment",
      "_label": "Condition Assessment of Night Watch",
      "identified_by": [
        {
          "type": "Name",
          "content": "Thorough Condition Assessment"
        }
      ],
      "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": "Very fine cracks throughout the painted surface"
        }
      ],
      "timespan": {
        "type": "TimeSpan",
        "begin_of_the_begin": "2019-05-01T00:00:00Z",
        "end_of_the_end": "2019-09-30T23: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"
        }
      ],
      "assigned_property": "classified_as",
      "assigned": [
        {
          "id": "http://vocab.getty.edu/aat/300387447",
          "type": "Type",
          "_label": "Microcracks"
        }
      ]
    }
  ]
}

Comparison

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

Properties used

assigned assigned_property attributed_by begin_of_the_begin carried_out_by classified_as content end_of_the_end identified_by part_of referred_to_by timespan

Vocabulary terms

Painting Microcracks Brief Text Description Type of Work