Factbook.Category.Field field = obf.createFactbookCategoryField();
String fldname = fld.getName();
String fldid = fld.getId();
field.setId(fldid);
field.setName(fldname);
ParsedFieldDescription flddesc = parse(dir, "fd-" + fldid + ".html", "fielddesc", lastupdate, ParsedFieldDescription.class);
if (!flddesc.getName().equals(fldname) ||
!flddesc.getId().equals(fldid))
throw new RuntimeException(flddesc.getName() + "/" + flddesc.getId());
field.setDescription(flddesc.getDescription());
String unit = flddesc.getUnit();
if (unit != null) {
field.setUnit(unit);
}
if (flddesc.getRank() != null) {
ParsedRankOrder ro = parse(dir, "ro-" + fldid + ".html", "rankorder", lastupdate, ParsedRankOrder.class);
if (!ro.getName().equals(fldname) ||
!ro.getId().equals(fld.getId()))
throw new RuntimeException(ro.getId() + "//" + ro.getName());
for (ParsedRankOrder.Rank r : ro.getRank()) {