sul-dlss / dlme-transform

Transforms raw DLME metadata to DLME intermediate representation
Apache License 2.0
0 stars 2 forks source link

Ensure translation maps are complete #704

Closed jacobthill closed 3 years ago

jacobthill commented 3 years ago

As the DLME data manager I need to ensure that all normalized values are found in all translation maps. For example, when normalizing types, raw values from the data contributor are passed to the normalize_has_type macro which looks for these values in multiple has_type_from_* translation maps. If found, a normalized value is returned in place of the raw value. That normalized value is then passed to the normalize_edm_type macro which looks for a broader category value in the edm_type_from_has_type translation map. Finally, both normalized values are translated to Arabic using the has_type_ar_from_en and the edm_type_ar_from_en translation maps. It is okay if a raw value from a data contributor is not found in one of the has_type_from_* translation maps; we can't map every string a data contributor might give us. However, once we have a normalize cho_has_type value, we should always be able to translate it into Arabic, map it to a broader cho_edm_type value, and translate that cho_edm_type value. A similar pattern exists with the cho_language, cho_aat_material, cho_spatial_norm, and cho_temporal_norm

aaron-collier commented 3 years ago

@jacobthill I'm going to close this one simply to reopen an edited ticket. I don't want to lose your text here in case I miss something (or misunderstand something) but essentially, I'm just rewriting as an epic.