When some metadata section ids, but not all, are autogenerated, duplicates can easily occur. This PR changes metsrw to track ids used, and if a conflicting id is generated, retry.
I'm not totally happy with this implementation, I think if we had a more consistent metadata class structure, we could easily do this in a base class, but it's an improvement on what was there.
I've also made id_string a property (vs a method) in
bdf84b6, which is a small API change that will require updates to a few lines in Archivematica (all in archivematicaCreateMETSReingest.py). That change can be dropped if it is problematic, it just seemed like an easy improvement.
When some metadata section ids, but not all, are autogenerated, duplicates can easily occur. This PR changes metsrw to track ids used, and if a conflicting id is generated, retry.
I'm not totally happy with this implementation, I think if we had a more consistent metadata class structure, we could easily do this in a base class, but it's an improvement on what was there.
I've also made
id_string
a property (vs a method) in bdf84b6, which is a small API change that will require updates to a few lines in Archivematica (all in archivematicaCreateMETSReingest.py). That change can be dropped if it is problematic, it just seemed like an easy improvement.Connects to https://github.com/archivematica/Issues/issues/442.