Skip to content

Instantly share code, notes, and snippets.

@alanorth
Last active June 5, 2016 09:52
Show Gist options
  • Save alanorth/1a730bec5ac9457a8fb0e3e72c98d09c to your computer and use it in GitHub Desktop.
Save alanorth/1a730bec5ac9457a8fb0e3e72c98d09c to your computer and use it in GitHub Desktop.
To move in May/June

Fields to move in May/June

  • dc.identifier.status → cg.identifier.status
  • dc.river.basin → cg.river.basin
  • dc.targetaudience → cg.targetaudience
  • dc.fulltextstatus → cg.fulltextstatus
  • dc.editon → cg.edition
  • dc.isijournal → cg.isijournal
  • dc.rplace.region → cg.coverage.region
  • dc.cplace.country → cg.coverage.country
  • dc.place → cg.place
  • dc.identifier.fund → cg.identifier.cpwfproject (mostly, but there are ~15 that will go to dc.description.sponsorship)

Progress

A list to track my progress as I work through the DSpace configuration changing metadata references:

  • dspace/config/dspace.cfg
  • dspace/config/input-forms.xml
  • dspace/config/modules/atmire-cua.cfg
  • dspace/config/spring/api/discovery.xml
  • dspace/modules/xmlui/src/main/webapp/i18n/aspects/Statistics/messages.xml
  • dspace/modules/xmlui/src/main/webapp/i18n/messages.xml
  • dspace/modules/additions/src/main/resources/Messages.properties
  • dspace/modules/xmlui-mirage2/src/main/webapp/themes/0_CGIAR
  • dspace/config/modules/atmire-listings-and-reports.cfg

Process

  • Start maven build on 5_x-prod branch
  • Move the metadata
  • Stop Tomcat
  • Re-deploy DSpace with ant
  • Run system updates and restart the server
  • Start full Discovery index
  • Start full Authority index
  • Check and delete old fields from DSpace metadata registry via web UI (including id 75!)
  • Email people!

Commands

First, move CPWF-specific funding codes from dc.identifier.fund to cg.identifier.cpwfproject:

dspacetest=# update metadatavalue set metadata_field_id=130 where metadata_field_id=75 and (text_value like 'PN%' or text_value like 'PHASE%' or text_value = 'CBA' or text_value = 'IA');

Then the remaining fields from dc.identifier.fund to dc.description.sponsorship:

dspacetest=# update metadatavalue set metadata_field_id=29 where metadata_field_id=75;

Move the rest of the fields using migrate-fields.sh with the following mappings:

77  227 #cg.coverage.region
78  228 #cg.coverage.country
80  206 #cg.identifier.status
81  207 #cg.river.basin
101 213 #cg.targetaudience
103 214 #cg.fulltextstatus
92  224 #cg.edition
93  225 #cg.place
104 226 #cg.isijournal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment