Linked Art in C#

object/nightwatch/17 matches the site

The Night Watch is also (entirely hypothetically) loaned to the Getty Museum.

On linked.art: Objects: Provenance › Custody · site JSON · type HumanMadeObject · Ownership.Nightwatch_Permanent_Custody

C#

public static HumanMadeObject Nightwatch_Permanent_Custody()
{
    var nightWatch = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/nightwatch/17")
        .WithLabel("Painting")  // assume a mistake in the docs?
        .WithClassifiedAs(Aat.Painting, Aat.TypeOfWork)
        .WithClassifiedAs(Aat.Artwork);


    nightWatch.CurrentOwner = [
        new Group()
            .WithId("https://linked.art/example/group/amsterdam_govt")
            .WithLabel("City of Amsterdam Governing Body")
    ];

    nightWatch.CurrentPermanentCustodian = Ulan.Group("500246547", "Rijksmuseum");

    nightWatch.CurrentCustodian = [
        Ulan.Group("500115988", "Getty Museum")
    ];

    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.
  • Terms outside the registry The vocabulary registry holds only the terms linked.art itself publishes, so a dataset's own concepts, places and people are written with Aat.Term, Tgn.Place and Ulan.Person, giving the id and the label.

JSON from the C#

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/17",
  "type": "HumanMadeObject",
  "_label": "Painting",
  "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"
        }
      ]
    },
    {
      "id": "http://vocab.getty.edu/aat/300133025",
      "type": "Type",
      "_label": "Artwork"
    }
  ],
  "current_owner": [
    {
      "id": "https://linked.art/example/group/amsterdam_govt",
      "type": "Group",
      "_label": "City of Amsterdam Governing Body"
    }
  ],
  "current_permanent_custodian": {
    "id": "http://vocab.getty.edu/ulan/500246547",
    "type": "Group",
    "_label": "Rijksmuseum"
  },
  "current_custodian": [
    {
      "id": "http://vocab.getty.edu/ulan/500115988",
      "type": "Group",
      "_label": "Getty Museum"
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/17",
  "type": "HumanMadeObject",
  "_label": "Painting",
  "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"
        }
      ]
    },
    {
      "id": "http://vocab.getty.edu/aat/300133025",
      "type": "Type",
      "_label": "Artwork"
    }
  ],
  "current_owner": [
    {
      "id": "https://linked.art/example/group/amsterdam_govt",
      "type": "Group",
      "_label": "City of Amsterdam Governing Body"
    }
  ],
  "current_permanent_custodian": {
    "id": "http://vocab.getty.edu/ulan/500246547",
    "type": "Group",
    "_label": "Rijksmuseum"
  },
  "current_custodian": [
    {
      "id": "http://vocab.getty.edu/ulan/500115988",
      "type": "Group",
      "_label": "Getty Museum"
    }
  ]
}

Comparison

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

Properties used

classified_as current_custodian current_owner current_permanent_custodian

Vocabulary terms

Getty Museum Rijksmuseum Painting Artwork Type of Work