Package gov.nysenate.openleg.model

Examples of gov.nysenate.openleg.model.Person


    {
        logger.info("SAVING "+bill.getBillId());
        // Until LBDC starts sending coPrime information for real we need overrides
        // for the following set of bills and resolutions
        if (bill.getBillId().equals("R314-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN")));
        }
        else if (bill.getBillId().equals("J375-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("SKELOS"), new Person("KLEIN")));
        }
        else if (bill.getBillId().equals("R633-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN")));
        }
        else if (bill.getBillId().equals("J694-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN")));
        }
        else if (bill.getBillId().equals("J758-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("SKELOS")));
        }
        else if (bill.getBillId().equals("R818-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN")));
        }
        else if (bill.getBillId().equals("J844-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN")));
        }
        else if (bill.getBillId().equals("J860-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("SKELOS")));
        }
        else if (bill.getBillId().equals("J1608-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN"), new Person("STEWART-COUSINS")));
        }
        else if (bill.getBillId().equals("J1938-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN"), new Person("STEWART-COUSINS")));
        }
        else if (bill.getBillId().equals("J3100-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("HANNON")));
        }
        else if (bill.getBillId().equals("S2107-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN")));
        }
        else if (bill.getBillId().equals("S3953-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("ESPAILLAT")));
        }
        else if (bill.getBillId().equals("S5441-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("GRISANTI"), new Person("RANZENHOFER"), new Person("GALLIVAN")));
        }
        else if (bill.getBillId().equals("S5656-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("FUSCHILLO")));
        }
        else if (bill.getBillId().equals("S5657-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("MARCHIONE"), new Person("CARLUCCI")));
        }
        else if (bill.getBillId().equals("S5683-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("VALESKY")));
        }
        else if (bill.getBillId().equals("J2885-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN"), new Person("STEWART-COUSINS")));
        }
        else if (bill.getBillId().equals("J3307-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN"), new Person("SKELOS")));
        }
        else if (bill.getBillId().equals("J3743-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN"), new Person("STEWART-COUSINS")));
        }
        else if (bill.getBillId().equals("J3908-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN"), new Person("STEWART-COUSINS")));
        }
        else if (bill.getBillId().equals("R4036-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN")));
        }
        else if (bill.getBillId().equals("S6966-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("GRIFFO")));
        }
        else if (bill.getBillId().equals("J4904-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN"), new Person("STEWART-COUSINS")));
        }
        else if (bill.getBillId().equals("J5165-2013")) {
            bill.setOtherSponsors(Arrays.asList(new Person("KLEIN")));
        }

        // Check if the bill is on the unpublished list
        if (unpublishListManager.getUnpublishedBills().contains(bill.getBillId())){
            // If so set the publish date to null
View Full Code Here


                    else if (!sponsorName.matches(sponsorReplacementMatch)) {
                        bill.getSponsor().setFullname("RULES");
                    }
                }
                else {
                    bill.setSponsor(new Person(line.trim()));
                }
            }
        }
    }
View Full Code Here

     */
    public void applyCosponsors(String data, Bill bill, Date date) throws ParseError
    {
        ArrayList<Person> coSponsors = new ArrayList<Person>();
        for(String coSponsor : data.replace("\n", " ").split(",")) {
            coSponsors.add(new Person(coSponsor.trim()));
        }
        bill.setCoSponsors(coSponsors);
    }
View Full Code Here

     */
    public void applyMultisponsors(String data, Bill bill, Date date) throws ParseError
    {
        ArrayList<Person> multiSponsors = new ArrayList<Person>();
        for(String multiSponsor : data.replace("\n", " ").split(",")) {
            multiSponsors.add(new Person(multiSponsor.trim()));
        }
        bill.setMultiSponsors(multiSponsors);
    }
View Full Code Here

            String sponsor = billData.group(1).trim();
            String oldbill = billData.group(4).trim().replaceAll("[0-9`-]$", "");
            String oldYear = billData.group(6).trim();

            if (!sponsor.isEmpty() && (bill.getSponsor() == null || bill.getSponsor().getFullname().isEmpty())) {
                bill.setSponsor(new Person(sponsor));
            }
            if (!oldbill.trim().startsWith("0")) {
                bill.setPreviousVersions(Arrays.asList(oldbill + "-" + oldYear));
            }
        } else {
View Full Code Here

            else if (vote!=null){
                //Otherwise, build the existing vote
                Matcher voteLine = votePattern.matcher(line);
                while(voteLine.find()) {
                    String type = voteLine.group(1).trim();
                    Person voter = new Person(voteLine.group(2).trim());

                    if (type.equals("Aye")) {
                        vote.addAye(voter);
                    }
                    else if (type.equals("Nay")) {
View Full Code Here

        SOBIBlock mockBlock = new SOBIBlock(year+billId+(billId.matches("[A-Z]$") ? "" : " ")+1+"     ");
        Bill bill = processor.getOrCreateBill(mockBlock, modifiedDate, storage);

        if (sponsorName != null) {
            String[] sponsors = sponsorName.trim().split(",");
            bill.setSponsor(new Person(sponsors[0].trim()));

            // Other sponsors are removed when a calendar/agenda is resent without
            // The other sponsor included in the sponsors list.
            ArrayList<Person> otherSponsors = new ArrayList<Person>();
            for (int i = 1; i < sponsors.length; i++) {
                otherSponsors.add(new Person(sponsors[i].trim()));
            }

            if (!bill.getOtherSponsors().equals(otherSponsors)) {
                bill.setOtherSponsors(otherSponsors);
                processor.saveBill(bill, storage);
View Full Code Here

            bill.removeVote(vote);

            vote.setVoteType(Vote.VOTE_TYPE_COMMITTEE);
            vote.setDescription(meeting.getCommitteeName());
            for( XMLMember member : xmlBill.getVotes().getMember()) {
                Person person = new Person(member.getName().getContent());
                String voteType = member.getVote().getContent().toLowerCase();

                if (voteType.startsWith("abstain"))
                    vote.addAbstain(person);
                else if (voteType.startsWith("aye w/r"))
View Full Code Here

        SOBIBlock mockBlock = new SOBIBlock(year+billId+(billId.matches("[A-Z]$") ? "" : " ")+1+"     ");
        Bill bill = processor.getOrCreateBill(mockBlock, modifiedDate, storage);

        if (sponsorName != null) {
            String[] sponsors = sponsorName.trim().split(",");
            bill.setSponsor(new Person(sponsors[0].trim()));

            // Other sponsors are removed when a calendar/agenda is resent without
            // The other sponsor included in the sponsors list.
            ArrayList<Person> otherSponsors = new ArrayList<Person>();
            for (int i = 1; i < sponsors.length; i++) {
                otherSponsors.add(new Person(sponsors[i].trim()));
            }

            if (!bill.getOtherSponsors().equals(otherSponsors)) {
                bill.setOtherSponsors(otherSponsors);
                new BillProcessor().saveBill(bill, storage);
View Full Code Here

            text = text.substring(m.end());

            m.usePattern(sponsorP).reset(sponsorString);
            if(m.find()) {

                bill.setSponsor(new Person(m.group(1)));

                if(m.group(2) != null) {
                    String[] coSpons = sponsorString.trim().split(", ");

                    ArrayList<Person> cosponsors = new ArrayList<Person>();
                    for(String coSpon:coSpons) {
                        cosponsors.add(new Person(coSpon));
                    }

                    bill.setCoSponsors(cosponsors);
                }
            }
View Full Code Here

TOP

Related Classes of gov.nysenate.openleg.model.Person

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.