Package org.dspace.statistics.util
Class LocationUtils
- java.lang.Object
-
- org.dspace.statistics.util.LocationUtils
-
public class LocationUtils extends Object
Mapping between Country codes, English Country names, Continent Codes, and English Continent names- Author:
- kevinvandevelde at atmire.com, ben at atmire.com
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringgetContinentCode(String countryCode)Map DSpace continent codes onto ISO country codes.static StringgetContinentName(String continentCode)Deprecated.static StringgetContinentName(String continentCode, Locale locale)Map DSpace continent codes onto localized continent names.static StringgetCountryName(String countryCode)Deprecated.static StringgetCountryName(String countryCode, Locale locale)Map ISO country codes onto localized country names.
-
-
-
Method Detail
-
getContinentCode
public static String getContinentCode(String countryCode)
Map DSpace continent codes onto ISO country codes.- Parameters:
countryCode- ISO 3166-1 alpha-2 country code.- Returns:
- DSpace 2-character code for continent containing that country, or an error message string.
-
getContinentName
@Deprecated public static String getContinentName(String continentCode)
Deprecated.Map DSpace continent codes onto default continent names.- Parameters:
continentCode- DSpace 2-character code for a continent.- Returns:
- Name of the continent in the default locale, or an error message string.
-
getContinentName
public static String getContinentName(String continentCode, Locale locale)
Map DSpace continent codes onto localized continent names.- Parameters:
continentCode- DSpace 2-character code for a continent.locale- The desired localization.- Returns:
- Localized name of the continent, or an error message string.
-
getCountryName
@Deprecated public static String getCountryName(String countryCode)
Deprecated.Map ISO country codes onto default country names.- Parameters:
countryCode- ISO 3166-1 alpha-2 country code.- Returns:
- Name of the country in the default locale, or an error message string.
-
-