Package gov.nysenate.openleg.qa.model

Examples of gov.nysenate.openleg.qa.model.LbdcFile


    }

    public void processFile(File file, ReportType reportType) {
        logger.info("Processing file: " + file.getAbsolutePath() + " of type " + reportType);

        LbdcFile lbdcFile = null;
        switch(reportType) {
        case BILL_HTML:
            lbdcFile = new LbdcFileHtml(file);
            break;
        case MEMO:
            lbdcFile = new LbdcFileMemo(file);
            break;
        case PAGING:
            lbdcFile = new LbdcFilePaging(file);
        }

        FieldName[] fieldNames = new FieldName[0];

        AssociatedFields associatedFields = lbdcFile.getClass().getAnnotation(AssociatedFields.class);
        if(associatedFields != null) {
            fieldNames = associatedFields.value();
        }

        ArrayList<ProblemBill> problemBills = lbdcFile.getProblemBills(fieldNames);

        logger.info("Found " + problemBills.size() + " problematic bills");

        pbr.createOrUpdateProblemBills(problemBills, true);
        pbr.deleteNonProblemBills();
View Full Code Here

TOP

Related Classes of gov.nysenate.openleg.qa.model.LbdcFile

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.