event/operation_nightwatch/1 matches the site
Operation Night Watch is a conservation and research project about The Night Watch
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.
var activity = new Activity
{
Context = ["https://linked.art/ns/v1/linked-art.json"],
Id = "https://linked.art/example/event/operation_nightwatch/1",
Label = "Conservation Project",
ClassifiedAs = [Aat.ConservationActivity],
CarriedOutBy =
[
new Group
{
Id = "https://linked.art/example/group/rijksmuseum",
Label = "Rijksmuseum",
},
new Group
{
Id = "https://linked.art/example/group/akzonobel",
Label = "AkzoNobel",
},
],
IdentifiedBy =
[
new Name("Operation Night Watch")
{
ClassifiedAs = [Aat.PrimaryName],
},
],
TimeSpan = new LinkedArtTimeSpan
{
BeginOfTheBegin = new LinkedArtDate(2019, 1, 1),
EndOfTheEnd = new LinkedArtDate(2023, 12, 31, 23, 59, 59),
},
ReferredToBy =
[
new LinguisticObject
{
Content = "Operation Night Watch is the biggest and most wide-ranging ever study of Rembrandt’s most famous painting.",
ClassifiedAs =
[
new Type("http://vocab.getty.edu/aat/300435416", "Description")
{
ClassifiedAs = [Aat.Statement],
},
],
},
],
};
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/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).