rewrite put_aggregation and update_imex
put_aggregation
and update_imex
may share the same code.
we could rewrite put_aggregation
so that it first creates the imex file by creating empty textgrid objects for every file and assigns the resulting textgrid uris. the empty placeholder objects shall have no real metadata yet, to be robust to faulty metadata on disk.
for putting actual data then update_imex
method shall be used by put_aggregation
.
the benefit would be that faulty imports can be resumed, and less code duplication.
at a later stage we may test if getting uris from crud with "get_uris" and writing a method "update_or_create" which tests if an object is already existing is faster. as updates need to read_metadata in every case, this may create objects if read_metadata failed