new CurricularYear(Integer.valueOf(4), 2);
new CurricularYear(Integer.valueOf(5), 2);
}
private static Country createCountries(SchoolSetupSection schoolSection) {
Country defaultCountry = null;
for (pt.ist.standards.geographic.Country metaData : Planet.getEarth().getPlaces()) {
String localizedNamePT = null;
try {
localizedNamePT = metaData.getLocalizedName(PT);
} catch (MissingResourceException e) {
}
String localizedNameEN = null;
try {
localizedNameEN = metaData.getLocalizedName(EN);
} catch (MissingResourceException e) {
}
if (localizedNameEN == null && localizedNamePT == null) {
continue;
}
if (localizedNamePT == null) {
localizedNamePT = localizedNameEN;
}
if (localizedNameEN == null) {
localizedNameEN = localizedNamePT;
}
String nationalityPT = null;
try {
nationalityPT = metaData.getNationality(PT);
} catch (MissingResourceException e) {
}
String nationalityEN = null;
try {
nationalityEN = metaData.getNationality(EN);
} catch (MissingResourceException e) {
}
if (nationalityPT == null) {
if (nationalityEN == null) {
nationalityPT = localizedNamePT;
} else {
nationalityPT = nationalityEN;
}
}
if (nationalityEN == null) {
if (nationalityPT == null) {
nationalityEN = localizedNameEN;
} else {
nationalityEN = nationalityPT;
}
}
final MultiLanguageString countryName = new MultiLanguageString(MultiLanguageString.pt, localizedNamePT);
countryName.append(new MultiLanguageString(MultiLanguageString.en, localizedNameEN));
final String code = metaData.alpha2;
final String threeLetterCode = metaData.alpha3;
final Country country =
new Country(countryName,
new MultiLanguageString(MultiLanguageString.pt, nationalityPT).append(new MultiLanguageString(
MultiLanguageString.en, nationalityEN)), code, threeLetterCode);
if (StringUtils.equals(threeLetterCode, schoolSection.getCountryCode().toUpperCase())) {
defaultCountry = country;
}