}
public Bill readBill(Reader reader) throws JsonProcessingException, IOException
{
JsonNode node = objectMapper.readTree(reader);
Bill bill = new Bill(node.get("senateBillNo").asText(),node.get("year").asInt());
bill.setActClause(node.get("actClause").asText());
bill.setAmendments((List<String>)makeList(String.class, node.get("amendments")));
bill.setCurrentCommittee(node.get("currentCommittee").asText());
bill.setFulltext(node.get("fulltext").asText());
bill.setLaw(node.get("law").asText());
bill.setLawSection(node.get("lawSection").asText());
bill.setMemo(node.get("memo").asText());
bill.setPastCommittees((List<String>)makeList(String.class, node.get("pastCommittees")));
bill.setPreviousVersions((List<String>)makeList(String.class, node.get("previousVersions")));
bill.setSameAs(node.get("sameAs").asText());
bill.setStricken(node.get("stricken").asBoolean());
bill.setSummary(node.get("summary").asText());
bill.setUniBill(node.get("uniBill").asBoolean());
bill.setTitle(node.get("title").asText());
bill.setActions((List<Action>)makeList(Action.class, node.get("actions")));
for(Action action : bill.getActions()) {
action.setBill(bill);
}
bill.setVotes((List<Vote>)makeList(Vote.class, node.get("votes")));
for(Vote vote : bill.getVotes()) {
vote.setBill(bill);
}
bill.setSponsor(makePerson(node.get("sponsor")));
bill.setOtherSponsors((List<Person>)makeList(Person.class, node.get("otherSponsors")));
bill.setCoSponsors((List<Person>)makeList(Person.class, node.get("coSponsors")));
bill.setMultiSponsors((List<Person>)makeList(Person.class, node.get("multiSponsors")));
bill.setActive(node.get("active").asBoolean());
bill.setModifiedDate(makeDate(node.get("modified")));
bill.setPublishDate(makeDate(node.get("published")));
bill.setDataSources(new HashSet<String>((HashSet<String>)makeSet(String.class, node.get("dataSources"))));
return bill;
}