HashMap<CountryCode,Integer> countryCounts = FocusUtils.getCountryCounts(resolvedLocations);
if(countryCounts.size()==0){
return results;
}
// find the most mentioned
CountryCode primaryCountry = null;
for(CountryCode countryCode: countryCounts.keySet()){
if( (primaryCountry==null) || (countryCounts.get(countryCode) > countryCounts.get(primaryCountry)) ){
primaryCountry = countryCode;
}
}
logger.info("Found primary country "+primaryCountry);
// return results
if(primaryCountry!=null) {
results.add( new FocusLocation(
CountryGeoNameLookup.lookup( primaryCountry.name()),countryCounts.get(primaryCountry) )
);
for(CountryCode countryCode: countryCounts.keySet()){
if( countryCode != primaryCountry && countryCounts.get(countryCode) == countryCounts.get(primaryCountry) ){
results.add( new FocusLocation(
CountryGeoNameLookup.lookup( countryCode.name()),countryCounts.get(countryCode) )