Difference between revisions of "Make orderkey.pl"
(Added config file page.) |
m |
||
Line 4: | Line 4: | ||
'''make_orderkey.pl''' contains several functions to provide orderings to be used by the <code>make_value_orderkey</code> and <code>make_single_value_orderkey</code> field attributes. See [[Category:EPrints_Metadata_Fields#Ordering.2C_Indexing_and_Searching|EPrints Metadata Fields]] for more details. It adds the following functions to the configuration: | '''make_orderkey.pl''' contains several functions to provide orderings to be used by the <code>make_value_orderkey</code> and <code>make_single_value_orderkey</code> field attributes. See [[Category:EPrints_Metadata_Fields#Ordering.2C_Indexing_and_Searching|EPrints Metadata Fields]] for more details. It adds the following functions to the configuration: | ||
* '''<code>$c->{make_orderkey_ignore_extras}</code>''' - 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 <code>make_value_orderkey</code> and <code>make_single_value_orderkey</code>. | * '''<code>$c->{make_orderkey_ignore_extras}</code>''' - 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 <code>make_value_orderkey</code> and <code>make_single_value_orderkey</code>. | ||
− | * '''<code>$c->{make_name_orderkey}</code>''' - Only uses family name, given name and honourific in that order to generate the initial order key, then uses | + | * '''<code>$c->{make_name_orderkey}</code>''' - Only uses family name, given name and honourific in that order to generate the initial order key, then uses<code>$c->{make_orderkey_ignore_extras}</code> to sanitise each string in turn before joining together with underscores. |
− | * '''<code>$c->{make_title_orderkey}</code>''' - Calls | + | * '''<code>$c->{make_title_orderkey}</code>''' - Calls <code>$c->{make_orderkey_ignore_extras}</code> after removing any preceding definite or indefinite articles (i.e. ''a'', ''an'' and ''the''). |
− | * '''<code>$c->{make_sanitised_value_orderkey}</code>''' - Just calls | + | * '''<code>$c->{make_sanitised_value_orderkey}</code>''' - Just calls <code>$c->{make_orderkey_ignore_extras}</code>. |
Latest revision as of 09:55, 7 February 2022
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
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 ofmake_value_orderkey
andmake_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}
.