text/koot_nightwatch_ch1/1 matches the site
C#
public static LinguisticObject Koot_Chapter()
{
var chapter = new LinguisticObject()
.WithContext()
.WithId("https://linked.art/example/text/koot_nightwatch_ch1/1")
.WithLabel("Chapter 1 of Koot")
.WithClassifiedAs(Aat.Chapter, Aat.TypeOfWork);
chapter.IdentifiedBy = [new Name("Introduction").AsPrimaryName()];
chapter.PartOf = [
new LinguisticObject()
.WithId("https://linked.art/example/text/koot_nightwatch")
.WithLabel("Koot's Night Watch")
];
return chapter;
}
- 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 linguisticObject = new LinguisticObject
{
Context = ["https://linked.art/ns/v1/linked-art.json"],
Id = "https://linked.art/example/text/koot_nightwatch_ch1/1",
Label = "Chapter 1 of Koot",
ClassifiedAs =
[
new Type("http://vocab.getty.edu/aat/300311699", "Chapter")
{
ClassifiedAs = [Aat.TypeOfWork],
},
],
IdentifiedBy =
[
new Name("Introduction")
{
ClassifiedAs = [Aat.PrimaryName],
},
],
PartOf =
[
new LinguisticObject
{
Id = "https://linked.art/example/text/koot_nightwatch",
Label = "Koot's Night Watch",
},
],
};
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/text/koot_nightwatch_ch1/1",
"type": "LinguisticObject",
"_label": "Chapter 1 of Koot",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300311699",
"type": "Type",
"_label": "Chapter",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300435443",
"type": "Type",
"_label": "Type of Work"
}
]
}
],
"identified_by": [
{
"type": "Name",
"content": "Introduction",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300404670",
"type": "Type",
"_label": "Primary Name"
}
]
}
],
"part_of": [
{
"id": "https://linked.art/example/text/koot_nightwatch",
"type": "LinguisticObject",
"_label": "Koot's Night Watch"
}
]
} JSON on linked.art
{
"@context": "https://linked.art/ns/v1/linked-art.json",
"id": "https://linked.art/example/text/koot_nightwatch_ch1/1",
"type": "LinguisticObject",
"_label": "Chapter 1 of Koot",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300311699",
"type": "Type",
"_label": "Chapter",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300435443",
"type": "Type",
"_label": "Type of Work"
}
]
}
],
"identified_by": [
{
"type": "Name",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300404670",
"type": "Type",
"_label": "Primary Name"
}
],
"content": "Introduction"
}
],
"part_of": [
{
"id": "https://linked.art/example/text/koot_nightwatch",
"type": "LinguisticObject",
"_label": "Koot's Night Watch"
}
]
} Comparison
The two documents are equivalent (property order ignored, array order significant).