tree.addChildTaxon(taxon, null, null);\r
}\r
} else if (thisRank.isHigher(lastRank)) {\r
- doTaxonRelation(state, taxon, lastNode.getParent().getTaxon(), dataLocation);\r
+ TaxonNode parent = lastNode.getParent();\r
+ if (parent != null){\r
+ doTaxonRelation(state, taxon, parent.getTaxon(), dataLocation);\r
+ }else{\r
+ String warning = "No parent available for lastNode. Classification can not be build correctly. Maybe the rank was missing for the lastNode";\r
+ fireWarningEvent(warning, makeLocationStr(dataLocation), 16);\r
+ //TODO what to do in this case (haven't spend time to think about yet\r
+ }\r
// TaxonNode parentNode = handleTaxonRelation(state, taxon,\r
// lastNode.getParent().getTaxon());\r
// parentNode.addChildTaxon(taxon, null, null, null);\r