}
ChangeLogger.setContext(file, modifiedDate);
for(Object next : senateData.getSenagendaOrSenagendavote()) {
if (next instanceof XMLSenagenda) {
Agenda agenda = handleXMLSenagenda(storage,(XMLSenagenda)next);
if (agenda != null) {
agenda.addDataSource(file.getName());
agenda.setModifiedDate(modifiedDate);
if (agenda.getPublishDate() == null) {
agenda.setPublishDate(modifiedDate);
}
storage.set(agenda);
ChangeLogger.record(storage.key(agenda), storage);
for (Addendum addendum : agenda.getAddendums()) {
for (Meeting meeting : addendum.getMeetings()) {
// TODO: We don't actually know if the meeting was modified or not
// This might be a false positive change
meeting.setModifiedDate(addendum.getPublishDate());
storage.set(meeting);
ChangeLogger.record(storage.key(meeting), storage);
}
}
}
} else if (next instanceof XMLSenagendavote) {
Agenda agenda = handleXMLSenagendavote(storage, (XMLSenagendavote)next);
if (agenda != null) {
agenda.addDataSource(file.getName());
agenda.setModifiedDate(modifiedDate);
if (agenda.getPublishDate() == null) {
agenda.setPublishDate(modifiedDate);
}
storage.set(agenda);
ChangeLogger.record(storage.key(agenda), storage);
for (Addendum addendum : agenda.getAddendums()) {
for (Meeting meeting : addendum.getMeetings()) {
storage.set(meeting);
ChangeLogger.record(storage.key(meeting), storage);
}
}