Package gov.nysenate.openleg.model.admin

Examples of gov.nysenate.openleg.model.admin.SpotCheckBill


        logger.info("Reading " + prefix+".assembly.high.html");
        bills.putAll(readDaybreak(new File(directory, prefix+".assembly.high.html")));
        logger.info("Reading " + prefix+".page_file.txt");
        loadPageFile(new File(directory, prefix+".page_file.txt"), bills);

        SpotCheckBill testbill = bills.get("S1743A");

        runner.update("insert ignore into report(time) values(?)", date);
        Report report = runner.query("select * from report where time = ?", new BeanHandler<Report>(Report.class), date);
        runner.update("delete from report_observation where reportId = ?", report.getId());

View Full Code Here


            bills.get(bill_id).pages = pages;
        }
        else {
            // Look for
            //logger.error("Unknown bill '"+asm_id+"'");
            SpotCheckBill bill = new SpotCheckBill();
            bill.id = bill_id;
            bill.pages = pages;
            bills.put(bill_id, bill);
        }
    }
View Full Code Here

        HashMap<String, SpotCheckBill> bills = new HashMap<String, SpotCheckBill>();
        while(billDataMatcher.find()) {
            String rawBillHtml = billDataMatcher.group(1);
            String billParts[] = stripHtmlTags.matcher(rawBillHtml).replaceAll("").replace("</td>", "<br>").split("<br>");

            SpotCheckBill bill = extractBill(billParts);
            bills.put(bill.id, bill);
        }

        return bills;
    }
View Full Code Here

        return bills;
    }

    private SpotCheckBill extractBill(String[] billParts) {
        SpotCheckBill bill = new SpotCheckBill();

        bill.setCurrentAmendment(true);
        bill.id = billParts[0].trim();
        bill.setTitle(billParts[2].trim());
        bill.law = billParts[3].trim();
        bill.setSummary(billParts[4].trim());
        bill.setActions(extractBillActions(billParts));
        bill.setSponsor(extractSponsor(billParts[1]));
        bill.setAmendments(extractAmendments(bill));

        if (isSenateBill(bill)) {
            bill.setCosponsors(extractSenateCosponsors(billParts[1]));
        } else { // is assembly bill
            bill.setCosponsors(extractAssemblyCosponsors(billParts[1]));
            bill.setMultisponsors(extractMultisponsors(billParts[1]));
        }

        return bill;
    }
View Full Code Here

TOP

Related Classes of gov.nysenate.openleg.model.admin.SpotCheckBill

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.