text/koot_nightwatch_ch1/2 matches the site
The introduction chapter to Koot's book is 10 pages long.
C#
public static LinguisticObject Page_Count()
{
var chapter = new LinguisticObject()
.WithContext()
.WithId("https://linked.art/example/text/koot_nightwatch_ch1/2")
.WithLabel("Chapter 1 of Koot")
.WithClassifiedAs(Aat.Chapter, Aat.TypeOfWork);
chapter.IdentifiedBy = [new Name("Introduction").AsPrimaryName()];
chapter.ReferredToBy = [
new LinguisticObject()
.WithContent("5 - 15")
.WithClassifiedAs(Aat.PaginationStatement, Aat.Statement)
];
chapter.WithPageCount(10, "10 pages");
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.
- Dimensions and physical description Each helper builds a Dimension with its AAT type, value and unit, or a classification with its metatype: height, width, colour, shape, page count, component count, file size, duration in days.
var linguisticObject = new LinguisticObject
{
Context = ["https://linked.art/ns/v1/linked-art.json"],
Id = "https://linked.art/example/text/koot_nightwatch_ch1/2",
Label = "Chapter 1 of Koot",
Dimension =
[
new Dimension
{
Label = "10 pages",
Value = 10,
Unit = Aat.Pages,
ClassifiedAs = [Aat.Term("300404433", "Count Of")],
},
],
ClassifiedAs =
[
new Type("http://vocab.getty.edu/aat/300311699", "Chapter")
{
ClassifiedAs = [Aat.TypeOfWork],
},
],
IdentifiedBy =
[
new Name("Introduction")
{
ClassifiedAs = [Aat.PrimaryName],
},
],
ReferredToBy =
[
new LinguisticObject
{
Content = "5 - 15",
ClassifiedAs =
[
new Type("http://vocab.getty.edu/aat/300435440", "Pagination 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/text/koot_nightwatch_ch1/2",
"type": "LinguisticObject",
"_label": "Chapter 1 of Koot",
"dimension": [
{
"type": "Dimension",
"_label": "10 pages",
"value": 10,
"unit": {
"id": "http://vocab.getty.edu/aat/300194222",
"type": "MeasurementUnit",
"_label": "Pages"
},
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300404433",
"type": "Type",
"_label": "Count Of"
}
]
}
],
"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"
}
]
}
],
"referred_to_by": [
{
"type": "LinguisticObject",
"content": "5 - 15",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300435440",
"type": "Type",
"_label": "Pagination 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/text/koot_nightwatch_ch1/2",
"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"
}
],
"referred_to_by": [
{
"type": "LinguisticObject",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300435440",
"type": "Type",
"_label": "Pagination Statement",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300418049",
"type": "Type",
"_label": "Brief Text"
}
]
}
],
"content": "5 - 15"
}
],
"dimension": [
{
"type": "Dimension",
"_label": "10 pages",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300404433",
"type": "Type",
"_label": "Count Of"
}
],
"value": 10,
"unit": {
"id": "http://vocab.getty.edu/aat/300194222",
"type": "MeasurementUnit",
"_label": "Pages"
}
}
]
} Comparison
The two documents are equivalent (property order ignored, array order significant).