Class LocalCountryCodeConverter

java.lang.Object
org.codice.ddf.internal.country.converter.local.LocalCountryCodeConverter
All Implemented Interfaces:
org.codice.ddf.internal.country.converter.api.CountryCodeConverter

public class LocalCountryCodeConverter extends Object implements org.codice.ddf.internal.country.converter.api.CountryCodeConverter
Service to convert county codes into various formats by performing a local lookup. This works by loading in a static properties file containing the FIPS 10-4 to ISO 3166-1 alpha 3 country code mappings and builds multi maps of the mappings in order to perform the conversions. The country code mappings file is provided by default and can be configured if the country code mappings would ever change. For more information on how the country code mappings are formatted, refer to this feature's README file.
  • Constructor Details

    • LocalCountryCodeConverter

      public LocalCountryCodeConverter()
  • Method Details

    • convertFipsToIso3

      public List<String> convertFipsToIso3(@Nullable String fipsCountryCode)
      Specified by:
      convertFipsToIso3 in interface org.codice.ddf.internal.country.converter.api.CountryCodeConverter
    • convertIso3ToFips

      public List<String> convertIso3ToFips(@Nullable String iso3alphaCountryCode)
      Specified by:
      convertIso3ToFips in interface org.codice.ddf.internal.country.converter.api.CountryCodeConverter
    • setCountryCodeMappingsFile

      public void setCountryCodeMappingsFile(String countryCodeMappingFile)