Package factbookxml.converter.pda.schema

Examples of factbookxml.converter.pda.schema.ParsedRankOrder


        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()) {
            Factbook.Category.Field.Rank rank = obf.createFactbookCategoryFieldRank();
            rank.setCountry(countryids.get(r.getCountry()));
            if (r.getDateEarliest() != null)
              rank.setDateEarliest(XMLGregorianCalendarImpl.parse(r.getDateEarliest()));
            if (r.getDateLatest() != null)
              rank.setDateLatest(XMLGregorianCalendarImpl.parse(r.getDateLatest()));
            rank.setDateText(r.getDate());
            rank.setDateEstimated(r.isDateEstimated());
            String vl = r.getValue();
            if (vl.startsWith("$ ")) {
              vl = vl.substring(2);
              field.setDollars(true);
            }
            rank.setNumber(new BigDecimal(vl));
            field.getRank().add(rank);
          }
          field.setRankorder(ro.getReversed() != null ? -1 : 1);
        }
        category.getField().add(field);
      }
    }
    ParsedRegions regions = parse(dir, "regions.html", "regions", lastupdate, ParsedRegions.class);
View Full Code Here

TOP

Related Classes of factbookxml.converter.pda.schema.ParsedRankOrder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.