Linked Art in C#

object/lepeintre/1 matches the site

The painting "Le Peintre" by Picasso was destroyed (in a plane crash) on September 2nd, 1998 at about 10:30pm. Source

On linked.art: Object Production and Destruction › Destruction · site JSON · type HumanMadeObject · ProductionDestruction.LePeintre_1_Destruction

C#

public static HumanMadeObject LePeintre_1_Destruction()
{
    var lepeintre = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/lepeintre/1")
        .WithLabel("Le Peintre by Picasso")
        .WithClassifiedAs(Aat.Painting, Aat.TypeOfWork);

    var destruction = new Destruction()
        .WithLabel("Destruction of Le Peintre");
    destruction.TimeSpan = new LinkedArtTimeSpan
    {
        BeginOfTheBegin = new LinkedArtDate(new DateTimeOffset(1998, 9, 2, 22, 20, 0, TimeSpan.Zero)),
        EndOfTheEnd = new LinkedArtDate(new DateTimeOffset(1998, 9, 2, 22, 40, 0, TimeSpan.Zero))
    };
    lepeintre.DestroyedBy = destruction;

    return lepeintre;
}
  • 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/lepeintre/1",
  "type": "HumanMadeObject",
  "_label": "Le Peintre by Picasso",
  "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"
        }
      ]
    }
  ],
  "destroyed_by": {
    "type": "Destruction",
    "_label": "Destruction of Le Peintre",
    "timespan": {
      "type": "TimeSpan",
      "begin_of_the_begin": "1998-09-02T22:20:00Z",
      "end_of_the_end": "1998-09-02T22:40:00Z"
    }
  }
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/lepeintre/1",
  "type": "HumanMadeObject",
  "_label": "Le Peintre by Picasso",
  "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"
        }
      ]
    }
  ],
  "destroyed_by": {
    "type": "Destruction",
    "_label": "Destruction of Le Peintre",
    "timespan": {
      "type": "TimeSpan",
      "begin_of_the_begin": "1998-09-02T22:20:00Z",
      "end_of_the_end": "1998-09-02T22:40:00Z"
    }
  }
}

Comparison

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

Properties used

begin_of_the_begin classified_as destroyed_by end_of_the_end timespan

Vocabulary terms

Painting Type of Work