Skip to content
Snippets Groups Projects
Commit dcb8eb61 authored by Christopher Schankula's avatar Christopher Schankula :earth_africa:
Browse files

error handling for when nameToId doesn't work, fallback on fuzzy

parent 19583abd
No related branches found
No related tags found
No related merge requests found
......@@ -65,8 +65,11 @@ public class BioTree {
//reverse lookup based on name, try adding the found taxonId.
TaxonNode res = strNodes.get(scientificName);
Integer taxonId;
if (res == null)
if (res == null) {
taxonId = WormsAPI.nameToID(scientificName);
if (taxonId == -999)
taxonId = WormsAPI.fuzzyNameToID(scientificName);
}
else
taxonId = res.getTaxonId();
if (taxonId == null) return null;
......
......@@ -55,7 +55,7 @@ public class FileProcessor {
br.readLine(); // Reads Past Field Names
int i = 0;
while ((currentLine = br.readLine()) != null && i < 100) {
while ((currentLine = br.readLine()) != null) {
//System.out.println(currentLine); //Testing ONLY for checking one line at a time
i++;
System.out.println("Processed line " + i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment