Linked Art in C#

object/spring/29 matches the site

Spring has "Framed [Outer Dim]" and "Unframed" dimensions. The "Unframed" height and width are 74 and 51.5cm.

On linked.art: Objects: Physical Characteristics › Measurement of Object Features · site JSON · type HumanMadeObject · PhysicalCharacteristics.Spring_29_Measurement_of_Features

C#

public static HumanMadeObject Spring_29_Measurement_of_Features()
{
    var spring = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/spring/29")
        .WithLabel("Spring")
        .WithClassifiedAs(Aat.Painting, Aat.TypeOfWork)
        .WithHeightDimension(74, MeasurementUnit.Centimeters)
        .WithWidthDimension(51.5, MeasurementUnit.Centimeters);

    var attrAssignment = new AttributeAssignment()
        .WithLabel("Unframed Measuring")
        .WithTechnique("https://linked.art/example/concept/measuring_unframed", "Unframed Measuring");

    spring.Dimension![0].AssignedBy = [attrAssignment];
    spring.Dimension![1].AssignedBy = [attrAssignment];

    return spring;
}
  • 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/spring/29",
  "type": "HumanMadeObject",
  "_label": "Spring",
  "dimension": [
    {
      "type": "Dimension",
      "value": 74,
      "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": "Unframed Measuring",
          "technique": [
            {
              "id": "https://linked.art/example/concept/measuring_unframed",
              "type": "Type",
              "_label": "Unframed Measuring"
            }
          ]
        }
      ]
    },
    {
      "type": "Dimension",
      "value": 51.5,
      "unit": {
        "id": "http://vocab.getty.edu/aat/300379098",
        "type": "MeasurementUnit",
        "_label": "centimeters"
      },
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300055647",
          "type": "Type",
          "_label": "Width"
        }
      ],
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "_label": "Unframed Measuring",
          "technique": [
            {
              "id": "https://linked.art/example/concept/measuring_unframed",
              "type": "Type",
              "_label": "Unframed Measuring"
            }
          ]
        }
      ]
    }
  ],
  "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/spring/29",
  "type": "HumanMadeObject",
  "_label": "Spring",
  "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": 74,
      "unit": {
        "id": "http://vocab.getty.edu/aat/300379098",
        "type": "MeasurementUnit",
        "_label": "centimeters"
      },
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "_label": "Unframed Measuring",
          "technique": [
            {
              "id": "https://linked.art/example/concept/measuring_unframed",
              "type": "Type",
              "_label": "Unframed Measuring"
            }
          ]
        }
      ]
    },
    {
      "type": "Dimension",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300055647",
          "type": "Type",
          "_label": "Width"
        }
      ],
      "value": 51.5,
      "unit": {
        "id": "http://vocab.getty.edu/aat/300379098",
        "type": "MeasurementUnit",
        "_label": "centimeters"
      },
      "assigned_by": [
        {
          "type": "AttributeAssignment",
          "_label": "Unframed Measuring",
          "technique": [
            {
              "id": "https://linked.art/example/concept/measuring_unframed",
              "type": "Type",
              "_label": "Unframed Measuring"
            }
          ]
        }
      ]
    }
  ]
}

Comparison

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

Properties used

assigned_by classified_as dimension technique unit value

Vocabulary terms

centimeters Painting Height Width Type of Work