Thanks to @kasei for finding.
from cromulent import model, vocab
what = model.HumanMadeObject()
what.referred_to_by = vocab.MaterialStatement(content="a")
what.referred_to_by = vocab.MaterialStatement(content="b")
print(model.factory.toString(what, compact=False))
Results in the below, where brief text metatype is not repeated on the second instance.
{
"@context": "https://linked.art/ns/v1/linked-art.json",
"id": "http://lod.example.org/museum/HumanMadeObject/0",
"type": "HumanMadeObject",
"referred_to_by": [
{
"id": "http://lod.example.org/museum/LinguisticObject/0",
"type": "LinguisticObject",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300435429",
"type": "Type",
"_label": "Material Statement",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300418049",
"type": "Type",
"_label": "Brief Text"
}
]
}
],
"content": "a"
},
{
"id": "http://lod.example.org/museum/LinguisticObject/1",
"type": "LinguisticObject",
"classified_as": [
{
"id": "http://vocab.getty.edu/aat/300435429",
"type": "Type",
"_label": "Material Statement"
}
],
"content": "b"
}
]
}
Thanks to @kasei for finding.
Results in the below, where brief text metatype is not repeated on the second instance.
{ "@context": "https://linked.art/ns/v1/linked-art.json", "id": "http://lod.example.org/museum/HumanMadeObject/0", "type": "HumanMadeObject", "referred_to_by": [ { "id": "http://lod.example.org/museum/LinguisticObject/0", "type": "LinguisticObject", "classified_as": [ { "id": "http://vocab.getty.edu/aat/300435429", "type": "Type", "_label": "Material Statement", "classified_as": [ { "id": "http://vocab.getty.edu/aat/300418049", "type": "Type", "_label": "Brief Text" } ] } ], "content": "a" }, { "id": "http://lod.example.org/museum/LinguisticObject/1", "type": "LinguisticObject", "classified_as": [ { "id": "http://vocab.getty.edu/aat/300435429", "type": "Type", "_label": "Material Statement" } ], "content": "b" } ] }