diff --git a/configurations/default/server.yml.tmp b/configurations/default/server.yml.tmp index 6d78c25cc..20edb3008 100644 --- a/configurations/default/server.yml.tmp +++ b/configurations/default/server.yml.tmp @@ -34,6 +34,28 @@ modules: load_on_fetch: false # use_extension: mtc # update_frequency: 30 # in seconds + manager: + normalizeFieldTransformation: + # Enter capitalization exceptions (e.g. acronyms), in the desired case, and separated by commas. + defaultCapitalizationExceptions: + - ACE + - BART + # Enter substitutions (e.g. substitute '@' with 'at'), one dashed entry for each substitution, with: + # - pattern: the regex string pattern that will be replaced, + # - replacement: the replacement string for that pattern, + # - normalizeSpace: if true, the resulting field value will include one space before and after the replacement string. + # Note: if the replacement must be blank, then normalizeSpace should be set to false + # and whitespace management should be handled in pattern instead. + # Substitutions are executed in order they appear in the list. + defaultSubstitutions: + - description: "Replace '@' with 'at', and normalize space." + pattern: "@" + replacement: at + normalizeSpace: true + - description: "Replace '+' (\\+ in regex) and '&' with 'and', and normalize space." + pattern: "[\\+&]" + replacement: and + normalizeSpace: true extensions: transitland: enabled: true diff --git a/configurations/test/server.yml.tmp b/configurations/test/server.yml.tmp index 951f4dd63..677eee64c 100644 --- a/configurations/test/server.yml.tmp +++ b/configurations/test/server.yml.tmp @@ -35,6 +35,39 @@ modules: load_on_fetch: false # use_extension: mtc # update_frequency: 30 # in seconds + manager: + normalizeFieldTransformation: + # Enter capitalization exceptions (e.g. acronyms), in the desired case, and separated by commas. + defaultCapitalizationExceptions: + - ACE + - BART + - SMART + - EB + - WB + - SB + - NB + # Enter substitutions (e.g. substitute '@' with 'at'), one dashed entry for each substitution, with: + # - pattern: the regex string pattern that will be replaced, + # - replacement: the replacement string for that pattern, + # - normalizeSpace: if true, the resulting field value will include one space before and after the replacement string. + # Note: if the replacement must be blank, then normalizeSpace should be set to false + # and whitespace management should be handled in pattern instead. + # Substitutions are executed in order they appear in the list. + defaultSubstitutions: + - description: "Replace '@' with 'at', and normalize space." + pattern: "@" + replacement: at + normalizeSpace: true + - description: "Replace '+' (\\+ in regex) and '&' with 'and, and normalize space." + pattern: "[\\+&]" + replacement: and + normalizeSpace: true + - description: "Remove content in parentheses and adjacent space outside the parentheses." + pattern: "\\s*\\(.+\\)\\s*" + replacement: "" + - description: "Remove content in square brackets and adjacent space outside the brackets." + pattern: "\\s*\\[.+\\]\\s*" + replacement: "" extensions: # Enable MTC extension so MTC-specific feed merge tests mtc: diff --git a/pom.xml b/pom.xml index 38ddb2de7..0a90ae2d1 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ https://github.com/ibi-group/datatools-server.git - 2.10.1 + 2.12.1 UTF-8 @@ -255,6 +255,13 @@ 5.7.0 test + + + org.junit.jupiter + junit-jupiter-params + 5.5.2 + test +