Since DCLPMetaIdentifier/DCLPTextIdentifier map to the same file, they need special logic for when either of the DCLP identifiers associated with a publication is renamed during finalization.
DCLPMetaIdentifier/DCLPTextIdentifier could have logic in an after_rename method which calls rename with the new name on the opposite DCLP identifier associated with the publication (this would also need to have a guard that checks that the identifier is not already renamed to the new name, to avoid infinitely running the after_rename back and forth).
Related: #326 #330
Since DCLPMetaIdentifier/DCLPTextIdentifier map to the same file, they need special logic for when either of the DCLP identifiers associated with a publication is renamed during finalization.
DCLPMetaIdentifier/DCLPTextIdentifier could have logic in an
after_rename
method which callsrename
with the new name on the opposite DCLP identifier associated with the publication (this would also need to have a guard that checks that the identifier is not already renamed to the new name, to avoid infinitely running theafter_rename
back and forth).See also: https://github.com/DCLP/sosol/blob/master/app/models/identifier.rb#L349-L393