After discussion in Slack:#dev-mtg it is proposed that we move all DOIs generated by DSpace into a new field 'dc.identifier.doi'. This will resolve the discrepancy between the DataCite and EZID DOI generation code (DS-2199), disentangle generated DOIs from Handles, and consistently separate generated DOIs from user-entered DOIs. Thereafter, dc.identifier will hold all user-supplied identifiers; dc.identifier.doi will hold all DSpace-generated DOIs; and dc.identifier.uri will hold all Handles. This will make storage of identifiers more consistent, prevent confusion of generated and submitted identifiers, and make it simpler to work with generated identifiers since each field will hold only one type.
Manually submitted DOIs will not be affected.
The patch should include code, such as a Flyway migration, to automatically resettle all generated identifiers held by existing DSpace instances. DataCite DOIs can be recognized by being in dc.identifier.uri and not being Handles. EZID DOIs can be recognized by being in dc.identifier and containing the prefix (value of identifier.doi.ezid.shoulder) that is configured for DOI generation. DOIIdentifierProvider.supports(String) might be used to recognize DOIs regardless of representation.