Linked Art in C#

event/operation_nightwatch/1 matches the site

Operation Night Watch is a conservation and research project about The Night Watch

On linked.art: Conservation Activity › Conservation Project · site JSON · type Activity · Conservation.Nightwatch_Project

C#

public static Activity Nightwatch_Project()
{
    var operationNW = new Activity()
        .WithContext()
        .WithId("https://linked.art/example/event/operation_nightwatch/1")
        .WithLabel("Conservation Project")
        .WithClassifiedAs(Aat.ConservationActivity);

    operationNW.IdentifiedBy = [new Name("Operation Night Watch").AsPrimaryName()];
    operationNW.ReferredToBy = [
        new LinguisticObject()
            .WithClassifiedAs(Aat.Description, Aat.Statement)
            .WithContent("Operation Night Watch is the biggest and most wide-ranging ever study of Rembrandt’s most famous painting.")
    ];
    operationNW.TimeSpan = new LinkedArtTimeSpan
    {
        BeginOfTheBegin = new LinkedArtDate(2019, 1, 1),
        EndOfTheEnd = new LinkedArtDate(2023, 12, 31).LastSecondOfDay()
    };
    operationNW.CarriedOutBy = [
        new Group()
            .WithId("https://linked.art/example/group/rijksmuseum")
            .WithLabel("Rijksmuseum"),
        new Group()
            .WithId("https://linked.art/example/group/akzonobel")
            .WithLabel("AkzoNobel")
    ];

    return operationNW;

}
  • 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.
  • Role shortcuts AsPrimaryName, AsAccessionNumber and AsSystemAssignedNumber each add a single classification, with the AAT terms Primary Name, Accession Number and System Number.

JSON from the C#

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/event/operation_nightwatch/1",
  "type": "Activity",
  "_label": "Conservation Project",
  "classified_as": [
    {
      "id": "http://vocab.getty.edu/aat/300404519",
      "type": "Type",
      "_label": "Conservation Activity"
    }
  ],
  "carried_out_by": [
    {
      "id": "https://linked.art/example/group/rijksmuseum",
      "type": "Group",
      "_label": "Rijksmuseum"
    },
    {
      "id": "https://linked.art/example/group/akzonobel",
      "type": "Group",
      "_label": "AkzoNobel"
    }
  ],
  "identified_by": [
    {
      "type": "Name",
      "content": "Operation Night Watch",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ]
    }
  ],
  "timespan": {
    "type": "TimeSpan",
    "begin_of_the_begin": "2019-01-01T00:00:00Z",
    "end_of_the_end": "2023-12-31T23:59:59Z"
  },
  "referred_to_by": [
    {
      "type": "LinguisticObject",
      "content": "Operation Night Watch is the biggest and most wide-ranging ever study of Rembrandt’s most famous painting.",
      "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"
            }
          ]
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/event/operation_nightwatch/1",
  "type": "Activity",
  "_label": "Conservation Project",
  "classified_as": [
    {
      "id": "http://vocab.getty.edu/aat/300404519",
      "type": "Type",
      "_label": "Conservation Activity"
    }
  ],
  "identified_by": [
    {
      "type": "Name",
      "classified_as": [
        {
          "id": "http://vocab.getty.edu/aat/300404670",
          "type": "Type",
          "_label": "Primary Name"
        }
      ],
      "content": "Operation Night Watch"
    }
  ],
  "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": "Operation Night Watch is the biggest and most wide-ranging ever study of Rembrandt’s most famous painting."
    }
  ],
  "timespan": {
    "type": "TimeSpan",
    "begin_of_the_begin": "2019-01-01T00:00:00Z",
    "end_of_the_end": "2023-12-31T23:59:59Z"
  },
  "carried_out_by": [
    {
      "id": "https://linked.art/example/group/rijksmuseum",
      "type": "Group",
      "_label": "Rijksmuseum"
    },
    {
      "id": "https://linked.art/example/group/akzonobel",
      "type": "Group",
      "_label": "AkzoNobel"
    }
  ]
}

Comparison

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

Properties used

begin_of_the_begin carried_out_by classified_as content end_of_the_end identified_by referred_to_by timespan

Vocabulary terms

Conservation Activity Primary Name Brief Text Description