Package gov.nysenate.openleg.model

Examples of gov.nysenate.openleg.model.Meeting


                if (otype.equals("calendar")) {
                    Calendar calendar = (Calendar)storage.get(key, Calendar.class);
                    oid = calendar.getOid();
                }
                else if (otype.equals("meeting")) {
                    Meeting meeting = (Meeting)storage.get(key, Meeting.class);
                    oid = meeting.getOid();
                }

                purgeUri("doc:"+oid);
            }
        }
View Full Code Here


            } catch (ParseException e) {
                logger.error("Could not parse meeting date", e);
                continue;
            }

            Meeting meeting = new Meeting(commName, meetDateTime);
            meeting.setPublishDate(modifiedDate);
            String key = storage.key(meeting);
            Meeting oldMeeting = (Meeting)storage.get(key, Meeting.class);

            if (oldMeeting != null) {
                // If we have an old meeting, either use it or delete it if we are replacing.
                // This is wrong just like the rest of the meeting stuff. The replace is for
                // the addendum entry, you don't know how much to replace.
                if (action != null && action.equals("replace")) {
                    // If we are replacing votes it'll be handled in handleXmlBill
                    if (!isVote) {
                        logger.info("removing meeting: " + oldMeeting.getOid());
                        storage.del(key);
                        agenda.removeCommitteeMeeting(oldMeeting);
                    }
                }
                else {
View Full Code Here

                    summary = TextFormatter.append(transcript.getType(), ": ", transcript.getLocation());

                    fields.put("location", transcript.getLocation());

                } else if (type.equals("meeting")) {
                    Meeting meeting = (Meeting) resultObj;
                    title = TextFormatter.append(meeting.getCommitteeName(), " (",
                            new SimpleDateFormat("MMM d, yyyy - h:mm a").format(meeting.getMeetingDateTime()), ")");

                    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();
View Full Code Here

    }

    public Meeting readMeeting(Reader reader) throws JsonProcessingException, IOException
    {
        JsonNode node = objectMapper.readTree(reader);
        Meeting meeting = new Meeting(node.get("committeeName").asText(), makeDate(node.get("meetingDateTime")));
        meeting.setMeetday(node.get("meetday").asText());
        meeting.setLocation(node.get("location").asText());
        meeting.setCommitteeChair(node.get("committeeChair").asText());
        meeting.setBills((List<Bill>)makeList(Bill.class, node.get("bills")));
        meeting.setNotes(node.get("notes").asText());
        meeting.setActive(node.get("active").asBoolean());
        meeting.setModifiedDate(makeDate(node.get("modified")));
        meeting.setPublishDate(makeDate(node.get("published")));
        meeting.setDataSources(new HashSet<String>((HashSet<String>)makeSet(String.class, node.get("dataSources"))));
        return meeting;
    }
View Full Code Here

                Element committeeNode = new Element("committee");
                committeeNode.addContent(bill.getCurrentCommittee());
                resultNode.addContent(committeeNode);
            }
            else if (result.getOtype().equals("meeting")) {
                Meeting meeting = (Meeting)result.getObject();
                resultNode.setAttribute("committee", meeting.getCommitteeName());
                resultNode.setAttribute("location", meeting.getLocation());
                resultNode.setAttribute("chair", meeting.getCommitteeChair());
            }
            else if (result.getOtype().equals("transcript")) {
                Transcript transcript = (Transcript)result.getObject();
                resultNode.setAttribute("location", transcript.getLocation());
            }
View Full Code Here

  public static void testCommitteeVotes(Environment env, File sobiDirectory, Storage storage,
      String meetingKey, String billName, String committeeVoteSobi, Vote expected)
  {
    File[] voteSobiFile = TestHelper.getFilesByName(sobiDirectory, committeeVoteSobi);
    TestHelper.processFile(env, voteSobiFile);
    Meeting meeting = TestHelper.getMeeting(storage, meetingKey);
    List<Bill> bills = meeting.getBills();
    Bill bill = TestHelper.getBillByName(bills, billName);
    Vote testVote = bill.getVotes().get(0);
    assertThat(testVote.getAyes(), is(expected.getAyes()));
    assertThat(testVote.getAyeswr(), is(expected.getAyeswr()));
    assertThat(testVote.getAbsent(), is(expected.getAbsent()));
View Full Code Here

    return bill;
  }

  public static Meeting getMeeting(Storage storage, String meetingKey)
  {
    Meeting meeting = (Meeting)storage.get(meetingKey, Meeting.class);
    return meeting;
  }
View Full Code Here

TOP

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

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.