if (inRevision) {
if (localName.equals("revision")) {
inRevision = false;
if (!skipRevisions) {
currentRevision.endRevision(uri, localName, qName);
Revision curRev = currentRevision.getRevision();
// check rev not too new:
if (maxTime == null ||
!Revision.stringToCalendar(curRev.getTimestamp()).after(maxTime)) {
// check rev not too old:
if (minTime != null &&
Revision.stringToCalendar(curRev.getTimestamp()).compareTo(minTime) <= 0) {
// keep only the newest (old) revision
revisions.clear();
}
if (maxRevisions != (-1) && revisions.size() >= maxRevisions) {
revisions.remove(revisions.firstKey());
}
if (!revisions.isEmpty()) {
revisions.lastEntry().getValue().setUnpackedText(lastRevText);
}
revisions.put(curRev.getId(), curRev);
lastRevText = currentRevision.getText();
}
}
} else {
if (!skipRevisions) {