You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cgendreau edited this page Apr 5, 2013
·
7 revisions
This processor allows you to find the continent name of a country. The processing is a simple match between the ISO 3166-1 alpha 2 country code and the continent. The continents are taken from the canadensys-core enumeration, a seven-continent model. The matching is made according to a compiled data file.
AbstractDataProcessorccProcessor = newCountryContinentProcessor("countryISOLetterCode", "continent");
//use mock objects for demo MockCountryCodeHoldermockRawModel = newMockCountryCodeHolder();
MockOccurrenceModelmockModel = newMockOccurrenceModel();
//set NO (Norway)mockRawModel.setCountryISOLetterCode("NO");
ccProcessor.processBean(mockRawModel, mockModel, null, null);
System.out.println(mockModel.getContinent());
//prints : Europe