Closed nichtich closed 3 years ago
From #92:
The
modified
value of a concept scheme would refer to the date either its metadata or one of its concepts was last modified, depending which value is higher.
Originally, I thought we would manually set modified
to a value when the source information was modified, but I'd be fine with using the same logic as for mappings. (And as you noted, it's different for bulk import.)
Just to clarify and/or make a suggestion for the actual implementation:
modified
property on the scheme (will be VERY easy to implement). This would also mean that it's not possible to add one's own modified
property because the server will override it every time.created
property or, if it doesn't exist, add the current date as created
. Alternatively, we could also override created
for every new scheme.*created
so that it won't get changed.*This alternative has an issue: For bulk imports, we don't check for each scheme whether we are creating or modifying it, rather we're just using MongoDB's upsert option that will either create or modify an entity. So if we override created
for every scheme, we would update the value for those that are bulk imported and already exist. So I'm voting for the other option where we only change created
if it doesn't exist on the scheme.
There is no reason for changing a an already existing creating
other than via bulk import so I agree with the suggestion.
The fields
created
andmodified
are only added automatically on mappings but they are also needed for editing vocabularies in BARTOC (PUT and POST to /voc). Moreover it should be forbidden to override these fields except for bulk-import as done via command-line.