ISO-TC211 / iso-geodetic-registry

ISO Geodetic Registry backend
https://registry.isotc211.org
Other
5 stars 4 forks source link

Re-generating all Registry content #92

Open maccraymer opened 4 years ago

maccraymer commented 4 years ago

@florianesser, if the spreadsheet that was used to populate the current Registry were to be imported Into a new instance, would it give the exact same Registry with all items being assigned the same item numbers? And if corrections were made to some values in the spreadsheet contents (but exact same number and order of items were maintained), would that also result in the same item numbers for all items? I'm thinking of a way of making many corrections to values in the Registry without having to submit individual clarifications or supersessions via the GUI. For example, as we discussed earlier, appending the Online Resources column info to the Other Details column.

florianesser commented 4 years ago

if the spreadsheet that was used to populate the current Registry were to be imported Into a new instance, would it give the exact same Registry with all items being assigned the same item numbers?

@maccraymer No, the item identifiers are not guaranteed to be the same for every item in a new import. The only one that is guaranteed is that the Unity unit of measure will get the identifier 1. After that, the imported items are grouped by their item class and processed in the order defined here. The order of identifier assignment within each group is random.

I don't think that importing the whole spreadsheet with all data is suited to handle registry updates. The two main reasons are:

I'm thinking of a way of making many corrections to values in the Registry without having to submit individual clarifications or supersessions via the GUI. For example, as we discussed earlier, appending the Online Resources column info to the Other Details column.

Currently, Excel templates in the Geodetic Registry can only be used to create new items (i.e. addition proposals that can reference other existing items). To facilitate the update of a larger number of existing items, the Excel import function could be extended to also support the creation of supersession and clarification proposals, e.g. by adding optional Clarify item and Supersede item columns in the spreadsheet where identifier of the item to be clarified/superseded can be entered.

maccraymer commented 4 years ago

@florianesser, I was not thinking of reimporting the spreadsheet as a way of regularly updating the registry but rather to recreate the original registry one time with the same spreadsheet as originally used. The spreadsheet would have exactly the same items in exactly the same order except some of the attributes would be corrected or revised. For example, appending the content of the “online resources” column to the content of the “other details” column for citation items. I am thinking this is only possible because there have been no changes to the registry content since it was originally created. I am hoping this will recreate the registry with same item numbers but corrected and revised attributes for items. We would not be able to do this again once we started adding changes to this original registry content.

florianesser commented 4 years ago

@maccraymer Ah ok, I agree that this would be possible, given that no change has been made to the registry content since the original import.

I am hoping this will recreate the registry with same item numbers but corrected and revised attributes for items.

I don't think this will work as the item numbers are not guaranteed to be exactly the same when doing the import again. However, I think there's another way: we can apply the revisions directly to the database. That way, I think, you will get the desired result: revise the original items without having to submit clarifications or supersessions and the item identifiers (and also the UUIDs) will stay the same.

maccraymer commented 4 years ago

Hmm...I'd like to try this out with the staging instance to see what happens.