Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# Define if the link to the embed display should be rendered above (top) or under (bottom) the file section on the item page.
# Only supported by theme Mirage
elsevier-sciencedirect.embed.link.position = top

Batch Elsevier items update script

Introduction

To accommodate for changes of previously imported items, an update scripts has been created.
This scripts enables the possibility to use a PII or DOI to re-check an item for possible updates in file permissions, Identifiers and Metadata. This check is done against the originally used Search API and uses the same configuration. 

Usage

The script can be run using the following command in the dspace installation directory.

Code Block
bin/dspace dsrun org.dspace.importer.external.scidir.UpdateElsevierItems (options)


These options can be used to specify what has to be updated or not

  • -t: test -> Only test the changes done by the script if this option is given.
  • -f: forcefully update the requested type of data
  • -a: assign pii:
    • - If the PII exists (and not testing), update the item metadata to include the PII
    • If “-f” is enabled, also verify the items with a DOI and a PII
      • If a PII exists in the API, and differs from the current PII, update the PII (if not testing)
      • If a PII exists in the AP, and is identical to the current PII, leave it unchanged
      • If the PII doesn’t exist in the API, but the current metadata contains a PII, remove it (if not testing)
  • -p: update permissions
    • If not testing, and this type of data should be updated, adjust the file permissions applied to the item if:
      • “-f” is enabled
      • or the permissions were not manually overruled during the submission or workflow
  • -m: import metadata
    • If not forced, this task won’t do anything
    • If “-f” is enabled
      • update the metadata fields retrieved from the API, leaving the other metadata fields unchanged (based on the current configuration of metadata fields)
      • Don’t update any metadata fields if they are all correct
      • Keep in mind that any manual additions to the configured metadata fields will be overruled
  • -i: item handle
    • If this option is given, only run the script for this specific item
    • It this option is omitted, run the script for all archived items


These options are not mutually exclusive, meaning that all updates can be run simultaneously.

An example of the script would be to forcefully test all updates on metadata,pii/doi,permissions for the item with handle 123456789/99

Code Block
./dspace dsrun org.dspace.importer.external.scidir.UpdateElsevierItems -t -p -a -m -f -i 123456789/99


This will result in the changes being shown in the command line. An example of these changes would be

Code Block
permission of bitstream with id 59d3ccc7-3ce4-472f-98b5-f74b68fef9d8 would be updated to audience Public start date 2016-06-10
permission of bitstream with id d94f0a08-b1b6-4354-897a-afe1f14375e2 would be updated to audience Public start date 2016-06-10
pii for item with id 2fea9fff-90b0-46f7-9429-064bf35d173f would be removed
metadata dc.identifier would be updated with value DOI:10.1016/j.jnutbio.2015.02.010 for item with id 2fea9fff-90b0-46f7-9429-064bf35d173f
metadata elsevier.identifier.eid would be updated with value 1-s2.0-S0955286315000716 for item with id 2fea9fff-90b0-46f7-9429-064bf35d173f
metadata dc.identifier would be updated with value 8 for item with id 2fea9fff-90b0-46f7-9429-064bf35d173f
metadata dc.format.extent would be updated with value 817 for item with id 2fea9fff-90b0-46f7-9429-064bf35d173f
metadata dc.date.available would be updated with value August 2015 for item with id 2fea9fff-90b0-46f7-9429-064bf35d173f
metadata dc.rights would be updated with value for item with id 2fea9fff-90b0-46f7-9429-064bf35d173f
metadata dc.type would be updated with value Research Article for item with id 2fea9fff-90b0-46f7-9429-064bf35d173f


If these changes are to be applied to the item, the -t option can be left out and the item would then be actually updated