Description

Currently, the DSpaceMETSIngester makes the choice of which <dmdSec> to crosswalk when a METS file is ingested by the Packager script. The current algorithm is as follows (as documented in DSpaceMETSIngester.chooseItemDmd() method):

(1) Crosswalk the MODS <dmdSec> if found
(2) If MODS not found, crosswalk the DC <dmdSec> if found
(3) If neither are found, crosswalk the first <dmdSec> encountered

I'd like to propose that we also allow the user to specify the primary <dmdSec> to be crosswalked, via a commandline parameter. So, instead, the new algorithm would be:

(1) Crosswalk the <dmdSec> specified by the "dmd" parameter to the Packager script (if specified)
(2) If "dmd" param not specified, crosswalk the MODS <dmdSec> if found
(3) If MODS not found, crosswalk the DC <dmdSec> if found
(4) If none are found, crosswalk the first <dmdSec> encountered

The reasoning for this change is that it could be possible that there are multiple <dmdSec>'s and the MODS or the DC may not actually be the best choice to crosswalk (to avoid metadata loss). A simple example could be if a user had exported a METS file from DSpace containing both DIM and MODS. With the old algorithm, the MODS <dmdSec> would be choosen....even though in this special case the DIM <dmdSec> would be more appropriate as DSpace doesn't even need to crosswalk it.