inventaire
inventaire copied to clipboard
Add claim references
Use cases:
- store the source of a claim when taken from authority sources (national libraries, etc), in order to be able to bring this data to Wikidata
To bring references to Wikidata, applying the same data object as wikibase-edit seems reachable.
Storing references would go from today couchdb entity document:
{
_id: "foo",
claims: {
"wdt:P31": [ 'wd:Q5' ]
}
}
to
{
_id: 'foo',
claims: {
'wdt:P31': [
{
value: 'wd:Q5',
references: [
{
'wdt:P268': '13516296h',
'wdt:P813': '2024-01-29'
}
]
}
]
}
}
There seems to be 2 obvious ways to deal with current documents (without references):
- keep them as is, with a serializer which would simplify claims to their
mainsnak
value (probably to be inserted ingetInvEntitiesByClaim
). This would keep administrative data update tasks small/inexitant, but would require additional code when references will be used in other part of the app (ie. entity history) - bulk update the million~ish entities.
In any case, patches would also need some updates with same possibilities as entities above: either an adapter to understand new claims structure, or rewrite patches (which would significantly increase patch db size).
Issue on adding qualifiers https://github.com/inventaire/inventaire/issues/145
Done by #748