Linked Art in C#

object/nightwatch/70 matches the site

The description of The Night Watch was generated by an AI at a particular point in time, and is licensed as CC-BY.

On linked.art: Relationships and Context for Assignment of Attributes › Creation Details of Embedded Statements · site JSON · type HumanMadeObject · Assertions.Statement_With_Creation_And_License

C#

public static HumanMadeObject Statement_With_Creation_And_License()
{
    var nightwatch = new HumanMadeObject()
        .WithContext()
        .WithId("https://linked.art/example/object/nightwatch/70")
        .WithLabel("Night Watch");

    nightwatch.ReferredToBy = [
        new LinguisticObject()
            .WithClassifiedAs(Aat.Description, Aat.Statement)
            .WithClassifiedAs(Aat.Term("300456841"))
            .WithContent("Rembrandt's The Night Watch is a dynamic 17th-century group portrait of an Amsterdam militia company ...")
            .WithCreatedBy(c => c
                .WithTechnique(Aat.Term("300456842"))
                .WithTimeSpan(new LinkedArtTimeSpan
                {
                    BeginOfTheBegin = new LinkedArtDate(2024, 11, 7, 20, 50, 0),
                    EndOfTheEnd = new LinkedArtDate(2024, 11, 7, 20, 50, 0)
                }))
            .WithSubjectTo(
                new Right()
                    .WithClassifiedAs("https://creativecommons.org/licenses/by/4.0/", "CC-BY")
                    .WithName("CC-BY 4.0"))
    ];

    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.
  • Configured in place A lambda configures the nested object as it is created, so a name, an identifier or a production is built where it is attached instead of in a separate variable.
  • 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/70",
  "type": "HumanMadeObject",
  "_label": "Night Watch",
  "referred_to_by": [
    {
      "type": "LinguisticObject",
      "content": "Rembrandt's The Night Watch is a dynamic 17th-century group portrait of an Amsterdam militia company ...",
      "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"
            }
          ]
        },
        {
          "id": "http://vocab.getty.edu/aat/300456841",
          "type": "Type"
        }
      ],
      "created_by": {
        "type": "Creation",
        "timespan": {
          "type": "TimeSpan",
          "begin_of_the_begin": "2024-11-07T20:50:00Z",
          "end_of_the_end": "2024-11-07T20:50:00Z"
        },
        "technique": [
          {
            "id": "http://vocab.getty.edu/aat/300456842",
            "type": "Type"
          }
        ]
      },
      "subject_to": [
        {
          "type": "Right",
          "classified_as": [
            {
              "id": "https://creativecommons.org/licenses/by/4.0/",
              "type": "Type",
              "_label": "CC-BY"
            }
          ],
          "identified_by": [
            {
              "type": "Name",
              "content": "CC-BY 4.0"
            }
          ]
        }
      ]
    }
  ]
}

JSON on linked.art

{
  "@context": "https://linked.art/ns/v1/linked-art.json",
  "id": "https://linked.art/example/object/nightwatch/70",
  "type": "HumanMadeObject",
  "_label": "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"
            }
          ]
        },
        {
          "id": "http://vocab.getty.edu/aat/300456841",
          "type": "Type"
        }
      ],
      "content": "Rembrandt's The Night Watch is a dynamic 17th-century group portrait of an Amsterdam militia company ...",
      "created_by": {
        "type": "Creation",
        "technique": [
          {
            "id": "http://vocab.getty.edu/aat/300456842",
            "type": "Type"
          }
        ],
        "timespan": {
          "type": "TimeSpan",
          "begin_of_the_begin": "2024-11-07T20:50:00Z",
          "end_of_the_end": "2024-11-07T20:50:00Z"
        }
      },
      "subject_to": [
        {
          "type": "Right",
          "classified_as": [
            {
              "id": "https://creativecommons.org/licenses/by/4.0/",
              "type": "Type",
              "_label": "CC-BY"
            }
          ],
          "identified_by": [
            {
              "type": "Name",
              "content": "CC-BY 4.0"
            }
          ]
        }
      ]
    }
  ]
}

Comparison

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

Properties used

begin_of_the_begin classified_as content created_by end_of_the_end identified_by referred_to_by subject_to technique timespan

Vocabulary terms

Brief Text Description aat:300456841 aat:300456842