class LocationUtils {

    static public String getContinentCode(String countryCode)
    {
        if (null == countryCode)
        {
            logger.info("Null country code");
            return I18nUtil
                    .getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent");
        }

        if (countryToContinent.isEmpty())
            try
            {
                countryToContinent.load(LocationUtils.class
                        .getResourceAsStream("country-continent-codes.properties"));
            }
            catch (IOException e)
            {
                logger.error("Could not load country/continent map file", e);
            }

        String continent = countryToContinent.getProperty(countryCode);
        if (null == continent)
        {
            logger.info("Unknown country code " + countryCode);
            return I18nUtil
                    .getMessage("org.dspace.statistics.util.LocationUtils.unknown-continent");
        }
        else
            return continent;
    }

}