Package gov.nysenate.openleg.model

Examples of gov.nysenate.openleg.model.Action


                    for(Action event : actions) {
                        if(event.getDate().equals(c.getTime())) {
                            c.set(Calendar.SECOND, c.get(Calendar.SECOND) + 1);
                        }
                    }
                    Action action = new Action(c.getTime(), eventText, bill);
                    action.setBill(null); // This is terribad.
                    actions.add(action);

                    eventText = eventText.toUpperCase();

                    Matcher committeeEventText = committeeEventTextPattern.matcher(eventText);
View Full Code Here


                    fields.put("location", meeting.getLocation());
                    fields.put("chair", meeting.getCommitteeChair());
                    fields.put("committee", meeting.getCommitteeName());

                } else if (type.equals("action")) {
                    Action billEvent = (Action) resultObj;
                    String billId = billEvent.getBill().getBillId();

                    title = billEvent.getText();

                    fields.put("date", DATE_FORMAT_MED.format(billEvent
                            .getDate()));
                    fields.put("billno", billId);
                } else if (type.equals("vote")) {
                    Vote vote = (Vote) resultObj;
View Full Code Here

                if(m.group(1) != null) {
                    continue;
                }

                try {
                    billEvents.add(new Action(bill.getSenateBillNo(), sdf.parse(m.group(2)), m.group(3)));
                } catch (ParseException e) {
                    e.printStackTrace();
                }
            }
View Full Code Here

    {
        if (node.isNull()) {
            return null;
        }
        else {
            Action action = new Action();
            action.setOid(node.get("id").asText());
            action.setDate(new Date(node.get("date").asLong()));
            action.setText(node.get("text").asText());
            action.setSession(node.get("year").asInt());
            action.setActive(node.get("active").asBoolean());
            action.setModifiedDate(makeDate(node.get("modified")));
            action.setPublishDate(makeDate(node.get("published")));
            action.setDataSources(new HashSet<String>((List<String>)makeList(String.class, node.get("dataSources"))));
            return action;
        }
    }
View Full Code Here

        bill.setTitle(title);

        SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yy");
        for(int i = 7; i < strings.length;) {
            if(strings[i].matches("\\d{2}/\\d{2}/\\d{2}")) {
                Action be = new Action();
                try {

                    be.setDate(sdf.parse(strings[i]));
                    i++;
                    be.setText(strings[i]);

                    bill.addAction(be);
                } catch (ParseException e) {
                    logger.error(e);
                }
View Full Code Here

            Element resultNode = new Element("result");
            resultNode.setAttribute("type", result.getOtype());
            resultNode.setAttribute("id", result.getOid());
            resultNode.setAttribute("title", result.getTitle());
            if (result.getOtype().equals("action")) {
                Action action = (Action)result.getObject();
                resultNode.setAttribute("billno", action.getBill().getBillId());
            }
            else if (result.getOtype().equals("vote")) {
                Vote vote = (Vote)result.getObject();
                resultNode.setAttribute("billno", vote.getBill().getBillId());
                resultNode.setAttribute("sponsor", vote.getBill().getSponsor().getFullname());
View Full Code Here

       }
       catch (ParseException e) {
        e.printStackTrace();
      }
       // Create Action and add to list
       actionList.add(new Action(date, actions.get(i)[1], bill));
     }
     return actionList;
   }
View Full Code Here

TOP

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

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.