CategoryTree

This commit is contained in:
gexce
2017-09-28 19:09:11 +02:00
parent 22dc51df7a
commit 37ed0f291e
9 changed files with 236 additions and 109 deletions
@@ -38,6 +38,13 @@ public class EntryProcessor {
while (iter.hasNext()) {
String line = iter.next();
String status = line.substring(19, line.indexOf(fieldSeparator, 20));
if (status.equals("10") || status.equals("7") || status.equals("8")) {
count++;
continue;
}
line = line.substring(line.lastIndexOf(fieldSeparator) + fieldSeparator.length());
Entry entry = jsonMapper.readValue(line, Entry.class);
@@ -88,39 +95,6 @@ public class EntryProcessor {
aggregatedFilesize += download.size;
}
/*
HashSet<String> filenames = new HashSet<String>();
HashSet<String> hrefs = new HashSet<String>();
for (Download download : downloadSelection) {
String filenameToUse;
if (download.fileNameOnDisc != null)
filenameToUse = download.fileNameOnDisc;
else
filenameToUse = download.fileName;
if (filenameToUse == null) {
log.error("ARGH " + entry.id);
System.exit(1);
}
if (filenames.add(filenameToUse)) {
aggregatedFilesize += download.size;
}
hrefs.add(download.href);
}
if (filenames.size() < hrefs.size()) {
log.error("Problem with " + entry.id + " filenames.size=" + filenames.size() + ", hrefs.size=" + hrefs.size());
for (String s : filenames)
log.error(s);
for (String s : hrefs)
log.error(s);
}
*/
}
log.info("Count: " + count);