Linked Art in C#

object/nightwatch/9 matches the site

The measurement of the Night Watch was carried out by the "Operation Night Watch" team, during "Operation Night Watch"

On linked.art: Objects: Physical Characteristics › Measurements of Dimensions · site JSON · type HumanMadeObject · PhysicalCharacteristics.Nightwatch_9_Measurement_Assigned

C#

public static HumanMadeObject Nightwatch_9_Measurement_Assigned()
{
    var nightWatch = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/nightwatch/9")
        .WithLabel("Night Watch by Rembrandt")
        .WithClassifiedAs(Aat.Painting, Aat.TypeOfWork)
        .WithHeightDimension(379.5, MeasurementUnit.Centimeters);

    var attrAssignment = new AttributeAssignment()
        .WithLabel("Measurement of the Night Watch");
    attrAssignment.CarriedOutBy = [
        new Group()
            .WithId("https://linked.art/example/group/nightwatchteam")
            .WithLabel("Operation Night Watch Team")
    ];
    attrAssignment.PartOf = [
        new Activity()
            .WithId("https://linked.art/example/event/operationnightwatch")
            .WithLabel("Operation Night Watch")
    ];

    nightWatch.Dimension![0].AssignedBy = [attrAssignment];

    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.
  • Dimensions and physical description Each helper builds a Dimension with its AAT type, value and unit, or a classification with its metatype: height, width, colour, shape, page count, component count, file size, duration in days.

JSON from the C#

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/9",
  "type": "HumanMadeObject",
  "_label": "Night Watch by Rembrandt",
  "dimension": [
    {
      "type": "Dimension",
      "value": 379.5,
      "unit": {
        "id": "http://vocab.getty.edu/aat/300379098",
        "type": "MeasurementUnit",
        "_label": "centimeters"
      },
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300055644",
          "type": "Type",
          "_label": "Height"
        }
      ],
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "_label": "Measurement of the Night Watch",
          "carried_out_by": [
            {
              "id": "https://linked.art/example/group/nightwatchteam",
              "type": "Group",
              "_label": "Operation Night Watch Team"
            }
          ],
          "part_of": [
            {
              "id": "https://linked.art/example/event/operationnightwatch",
              "type": "Activity",
              "_label": "Operation 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"
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/9",
  "type": "HumanMadeObject",
  "_label": "Night Watch by Rembrandt",
  "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"
        }
      ]
    }
  ],
  "dimension": [
    {
      "type": "Dimension",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300055644",
          "type": "Type",
          "_label": "Height"
        }
      ],
      "value": 379.5,
      "unit": {
        "id": "http://vocab.getty.edu/aat/300379098",
        "type": "MeasurementUnit",
        "_label": "centimeters"
      },
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "_label": "Measurement of the Night Watch",
          "carried_out_by": [
            {
              "id": "https://linked.art/example/group/nightwatchteam",
              "type": "Group",
              "_label": "Operation Night Watch Team"
            }
          ],
          "part_of": [
            {
              "id": "https://linked.art/example/event/operationnightwatch",
              "type": "Activity",
              "_label": "Operation Night Watch"
            }
          ]
        }
      ]
    }
  ]
}

Comparison

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

Properties used

assigned_by carried_out_by classified_as dimension part_of unit value

Vocabulary terms

centimeters Painting Height Type of Work