Make orderkey.pl

From EPrints Documentation
Revision as of 09:54, 7 February 2022 by Drn@ecs.soton.ac.uk (talk | contribs) (Added config file page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


Back to cfg.d

make_orderkey.pl contains several functions to provide orderings to be used by the make_value_orderkey and make_single_value_orderkey field attributes. See for more details. It adds the following functions to the configuration:

  • $c->{make_orderkey_ignore_extras} - Converts a to string that ignores all but the standard ASCII alphabet, numbers and underscores. All letters are upper-cased and full stops (.) are replaced with underscores (_). This is used by the functions below, which are called with the parameters of make_value_orderkey and make_single_value_orderkey.
  • $c->{make_name_orderkey} - Only uses family name, given name and honourific in that order to generate the initial order key, then uses $c->{make_orderkey_ignore_extras} to sanitise each string in turn before joining together with underscores.
  • $c->{make_title_orderkey} - Calls $c->{make_orderkey_ignore_extras} after removing any preceding definite or indefinite articles (i.e. a, an and the).
  • $c->{make_sanitised_value_orderkey} - Just calls $c->{make_orderkey_ignore_extras}.