object/nightwatch/26 matches the site
Minor conservation improvements were made to The Night Watch.
C#
public static HumanMadeObject Nightwatch_Improvements()
{
var nightWatch = new HumanMadeObject()
.WithContext()
.WithId("https://linked.art/example/object/nightwatch/26")
.WithLabel("The Night Watch")
.WithClassifiedAs(Aat.Painting, Aat.TypeOfWork);
nightWatch.ModifiedBy = [
new Modification()
{
Label = "Conservation of Night Watch",
ReferredToBy = [
new LinguisticObject()
.WithClassifiedAs(Aat.Description, Aat.Statement)
.WithContent("Minor conservation work in response to earlier survey")
],
Technique = [Aat.Term("300053027", "Cleaning")],
TimeSpan = new LinkedArtTimeSpan
{
BeginOfTheBegin = new LinkedArtDate(2020, 1, 1),
EndOfTheEnd = new LinkedArtDate(2021, 12, 31).LastSecondOfDay()
},
CarriedOutBy = [
new Group()
.WithId("https://linked.art/example/group/rijksmuseum")
.WithLabel("Rijksmuseum")
],
PartOf = [
new Activity()
.WithId("https://linked.art/example/event/operation_nightwatch")
.WithLabel("Operation Night Watch")
]
}
];
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.
var humanMadeObject = new HumanMadeObject
{
Context = ["https://linked.art/ns/v1/linked-art.json"],
Id = "https://linked.art/example/object/nightwatch/26",
Label = "The Night Watch",
ClassifiedAs =
[
new Type("http://vocab.getty.edu/aat/300033618", "Painting")
{
ClassifiedAs = [Aat.TypeOfWork],
},
],
ModifiedBy =
[
new Modification
{
Label = "Conservation of Night Watch",
CarriedOutBy =
[
new Group
{
Id = "https://linked.art/example/group/rijksmuseum",
Label = "Rijksmuseum",
},
],
TimeSpan = new LinkedArtTimeSpan
{
BeginOfTheBegin = new LinkedArtDate(2020, 1, 1),
EndOfTheEnd = new LinkedArtDate(2021, 12, 31, 23, 59, 59),
},
ReferredToBy =
[
new LinguisticObject
{
Content = "Minor conservation work in response to earlier survey",
ClassifiedAs =
[
new Type("http://vocab.getty.edu/aat/300435416", "Description")
{
ClassifiedAs = [Aat.Statement],
},
],
},
],
PartOf =
[
new Activity
{
Id = "https://linked.art/example/event/operation_nightwatch",
Label = "Operation Night Watch",
},
],
Technique = [Aat.Term("300053027", "Cleaning")],
},
],
};
Generated from the object the example builds: every property that is set, as object initialisers, with the vocabulary constants where a term is in the registry. The fluent helpers are a convenience, not a requirement; this form and the one as written produce the same JSON.
JSON from the C#
{
"@context": "https://linked.art/ns/v1/linked-art.json",
"id": "https://linked.art/example/object/nightwatch/26",
"type": "HumanMadeObject",
"_label": "The Night Watch",
"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"
}
]
}
],
"modified_by": [
{
"type": "Modification",
"_label": "Conservation of Night Watch",
"carried_out_by": [
{
"id": "https://linked.art/example/group/rijksmuseum",
"type": "Group",
"_label": "Rijksmuseum"
}
],
"timespan": {
"type": "TimeSpan",
"begin_of_the_begin": "2020-01-01T00:00:00Z",
"end_of_the_end": "2021-12-31T23:59:59Z"
},
"referred_to_by": [
{
"type": "LinguisticObject",
"content": "Minor conservation work in response to earlier survey",
"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"
}
]
}
]
}
],
"part_of": [
{
"id": "https://linked.art/example/event/operation_nightwatch",
"type": "Activity",
"_label": "Operation Night Watch"
}
],
"technique": [
{
"id": "http://vocab.getty.edu/aat/300053027",
"type": "Type",
"_label": "Cleaning"
}
]
}
]
} JSON on linked.art
{
"@context": "https://linked.art/ns/v1/linked-art.json",
"id": "https://linked.art/example/object/nightwatch/26",
"type": "HumanMadeObject",
"_label": "The Night Watch",
"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"
}
]
}
],
"modified_by": [
{
"type": "Modification",
"_label": "Conservation of 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": "Minor conservation work in response to earlier survey"
}
],
"technique": [
{
"id": "http://vocab.getty.edu/aat/300053027",
"type": "Type",
"_label": "Cleaning"
}
],
"timespan": {
"type": "TimeSpan",
"begin_of_the_begin": "2020-01-01T00:00:00Z",
"end_of_the_end": "2021-12-31T23:59:59Z"
},
"carried_out_by": [
{
"id": "https://linked.art/example/group/rijksmuseum",
"type": "Group",
"_label": "Rijksmuseum"
}
],
"part_of": [
{
"id": "https://linked.art/example/event/operation_nightwatch",
"type": "Activity",
"_label": "Operation Night Watch"
}
]
}
]
} Comparison
The two documents are equivalent (property order ignored, array order significant).