object/nightwatch/15 matches the site
The Night Watch is on loan to the Rijksmuseum from the City of Amsterdam.
C#
public static HumanMadeObject Nightwatch_Credit_Statement()
{
var nightWatch = new HumanMadeObject()
.WithContext()
.WithId("https://linked.art/example/object/nightwatch/15")
.WithLabel("Night Watch by Rembrandt");
nightWatch.ReferredToBy = [
new LinguisticObject()
.WithClassifiedAs(Aat.CreditLine, Aat.Statement)
.WithContent("On loan from the City of Amsterdam")
];
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.
var humanMadeObject = new HumanMadeObject
{
Context = ["https://linked.art/ns/v1/linked-art.json"],
Id = "https://linked.art/example/object/nightwatch/15",
Label = "Night Watch by Rembrandt",
ReferredToBy =
[
new LinguisticObject
{
Content = "On loan from the City of Amsterdam",
ClassifiedAs =
[
new Type("http://vocab.getty.edu/aat/300026687", "Credit Statement")
{
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/object/nightwatch/15",
"type": "HumanMadeObject",
"_label": "Night Watch by Rembrandt",
"referred_to_by": [
{
"type": "LinguisticObject",
"content": "On loan from the City of Amsterdam",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300026687",
"type": "Type",
"_label": "Credit Statement",
"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/object/nightwatch/15",
"type": "HumanMadeObject",
"_label": "Night Watch by Rembrandt",
"referred_to_by": [
{
"type": "LinguisticObject",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300026687",
"type": "Type",
"_label": "Credit Statement",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300418049",
"type": "Type",
"_label": "Brief Text"
}
]
}
],
"content": "On loan from the City of Amsterdam"
}
]
} Comparison
The two documents are equivalent (property order ignored, array order significant).