object/lepeintre/2 matches the site
Le Peintre was destroyed because of the plane crashing. (Which also would have caused the destruction of the plane, the death of the crew, passengers and many other consequences)
C#
public static HumanMadeObject LePeintre_2_Destruction_CausedBy()
{
var lepeintre2 = new HumanMadeObject()
.WithContext()
.WithId("https://linked.art/example/object/lepeintre/2")
.WithLabel("Le Peintre by Picasso")
.WithClassifiedAs(Aat.Painting, Aat.TypeOfWork);
var destruction = new Destruction()
.WithLabel("Destruction of Le Peintre");
destruction.TimeSpan = new LinkedArtTimeSpan
{
BeginOfTheBegin = new LinkedArtDate(new DateTimeOffset(1998, 9, 2, 22, 20, 0, TimeSpan.Zero)),
EndOfTheEnd = new LinkedArtDate(new DateTimeOffset(1998, 9, 2, 22, 40, 0, TimeSpan.Zero))
};
destruction.CausedBy = [
new Event()
.WithId("https://linked.art/example/event/sr111crash")
.WithLabel("Crash of Swiss Air 111")
];
lepeintre2.DestroyedBy = destruction;
return lepeintre2;
}
- 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/lepeintre/2",
Label = "Le Peintre by Picasso",
ClassifiedAs =
[
new Type("http://vocab.getty.edu/aat/300033618", "Painting")
{
ClassifiedAs = [Aat.TypeOfWork],
},
],
DestroyedBy = new Destruction
{
Label = "Destruction of Le Peintre",
TimeSpan = new LinkedArtTimeSpan
{
BeginOfTheBegin = new LinkedArtDate(1998, 9, 2, 22, 20, 0),
EndOfTheEnd = new LinkedArtDate(1998, 9, 2, 22, 40, 0),
},
CausedBy =
[
new Event
{
Id = "https://linked.art/example/event/sr111crash",
Label = "Crash of Swiss Air 111",
},
],
},
};
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/lepeintre/2",
"type": "HumanMadeObject",
"_label": "Le Peintre by Picasso",
"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"
}
]
}
],
"destroyed_by": {
"type": "Destruction",
"_label": "Destruction of Le Peintre",
"timespan": {
"type": "TimeSpan",
"begin_of_the_begin": "1998-09-02T22:20:00Z",
"end_of_the_end": "1998-09-02T22:40:00Z"
},
"caused_by": [
{
"id": "https://linked.art/example/event/sr111crash",
"type": "Event",
"_label": "Crash of Swiss Air 111"
}
]
}
} JSON on linked.art
{
"@context": "https://linked.art/ns/v1/linked-art.json",
"id": "https://linked.art/example/object/lepeintre/2",
"type": "HumanMadeObject",
"_label": "Le Peintre by Picasso",
"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"
}
]
}
],
"destroyed_by": {
"type": "Destruction",
"_label": "Destruction of Le Peintre",
"timespan": {
"type": "TimeSpan",
"begin_of_the_begin": "1998-09-02T22:20:00Z",
"end_of_the_end": "1998-09-02T22:40:00Z"
},
"caused_by": [
{
"id": "https://linked.art/example/event/sr111crash",
"type": "Event",
"_label": "Crash of Swiss Air 111"
}
]
}
} Comparison
The two documents are equivalent (property order ignored, array order significant).