Use country vocabs from package resources

Import a local copy of iso_3166-1.json from iso-codes version 4.5.0
so we don't need to load it from the system.

See: https://salsa.debian.org/iso-codes-team/iso-codes
This commit is contained in:
Alan Orth 2020-07-31 22:18:32 +03:00
parent 01be5c69ba
commit d11bd00fa9
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 1679 additions and 2 deletions

View File

@ -51,8 +51,8 @@ public class CountryCodeTagger extends AbstractCurationTask
public int perform(DSpaceObject dso) throws IOException public int perform(DSpaceObject dso) throws IOException
{ {
// Load configuration // Load configuration
isocodesJsonPath = ConfigurationManager.getProperty(PLUGIN_PREFIX, "countrycodes.iso3166.json.path"); isocodesJsonPath = "/org/cgiar/cgspace/ctasks/iso_3166-1.json";
cgspaceCountriesJsonPath = ConfigurationManager.getProperty(PLUGIN_PREFIX, "countrycodes.cgspaceCountries.json.resource"); cgspaceCountriesJsonPath = "/org/cgiar/cgspace/ctasks/cgspace-countries.json";
iso3166Field = ConfigurationManager.getProperty(PLUGIN_PREFIX, "countrycodes.iso3166.field"); iso3166Field = ConfigurationManager.getProperty(PLUGIN_PREFIX, "countrycodes.iso3166.field");
iso3166Alpha2Field = ConfigurationManager.getProperty(PLUGIN_PREFIX, "countrycodes.iso3166-alpha2.field"); iso3166Alpha2Field = ConfigurationManager.getProperty(PLUGIN_PREFIX, "countrycodes.iso3166-alpha2.field");

File diff suppressed because it is too large Load Diff