Factbook.Region.Country country = obf.createFactbookRegionCountry();
country.setId(id);
country.setName(name);
country.getAlias().addAll(countryAliases.get(id));
ParsedCountry ctry = parse(dir, id + ".html", "country", lastupdate, ParsedCountry.class, "countryid", id, "country", name);
if (ctry.getFlag() != null)
country.setFlag(1);
if (ctry.getAffiliation() != null)
country.setAffiliation(ctry.getAffiliation());
country.setLocator(ctry.getLocator());
country.setAnthem(ctry.getAnthem());
region.getCountry().add(country);
country.setLastupdate(toXMLDate(ctry.getLastupdate()));
country.setPhotocount(ctry.getPhotocount());
List<FieldContentType> fields = new ArrayList<FieldContentType>();
for (FieldContentType fld : ctry.getField()) {
fields.add(fld);
}
Collections.sort(fields, new Comparator<FieldContentType>() {
public int compare(FieldContentType o1, FieldContentType o2) {
return o1.getRef().compareTo(o2.getRef());