Linked Art in C#

object/spring/21 matches the site

It is asserted in 2015 that "Spring" has a material of canvas.

On linked.art: Relationships and Context for Assignment of Attributes › Assigning Attributes · site JSON · type HumanMadeObject · Assertions.Assertion_that_Spring_Is_Canvas

C#

public static HumanMadeObject Assertion_that_Spring_Is_Canvas()
{
    var spring = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/spring/21")
        .WithLabel("Spring")
        .WithClassifiedAs(Aat.Painting, Aat.TypeOfWork);

    spring.AttributedBy = [
        new AttributeAssignment()
        {
            TimeSpan = LinkedArtTimeSpan.FromYear(2015),
            AssignedProperty = "made_of",
            Assigned = [
                new Material { Id = Aat.Uri("300014078") }
            ]
        }
    ];

    // remove label from year to match docs

    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.

JSON from the C#

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/spring/21",
  "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"
        }
      ]
    }
  ],
  "attributed_by": [
    {
      "type": "AttributeAssignment",
      "timespan": {
        "type": "TimeSpan",
        "begin_of_the_begin": "2015-01-01T00:00:00Z",
        "end_of_the_end": "2015-12-31T23:59:59Z"
      },
      "assigned_property": "made_of",
      "assigned": [
        {
          "id": "http://vocab.getty.edu/aat/300014078",
          "type": "Material"
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/spring/21",
  "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"
        }
      ]
    }
  ],
  "attributed_by": [
    {
      "type": "AttributeAssignment",
      "timespan": {
        "type": "TimeSpan",
        "begin_of_the_begin": "2015-01-01T00:00:00Z",
        "end_of_the_end": "2015-12-31T23:59:59Z"
      },
      "assigned_property": "made_of",
      "assigned": [
        {
          "id": "http://vocab.getty.edu/aat/300014078",
          "type": "Material"
        }
      ]
    }
  ]
}

Comparison

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

Properties used

assigned assigned_property attributed_by begin_of_the_begin classified_as end_of_the_end timespan

Vocabulary terms

canvas Painting Type of Work