org.dspace.statistics.util
Class LocationUtils

java.lang.Object
  extended by 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

Constructor Summary
LocationUtils()
           
 
Method Summary
static String getContinentCode(String countryCode)
          Map DSpace continent codes onto ISO country codes.
static String getContinentName(String continentCode)
          Deprecated. 
static String getContinentName(String continentCode, Locale locale)
          Map DSpace continent codes onto localized continent names.
static String getCountryName(String countryCode)
          Deprecated. 
static String getCountryName(String countryCode, Locale locale)
          Map ISO country codes onto localized country names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationUtils

public LocationUtils()
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.

getCountryName

public static String getCountryName(String countryCode,
                                    Locale locale)
Map ISO country codes onto localized country names.

Parameters:
countryCode - ISO 3166-1 alpha-2 country code.
locale - Desired localization.
Returns:
Localized name of the country, or an error message string.


Copyright © 2012 DuraSpace. All Rights Reserved.