createParentChildNodes(gesamtListeClassification, id, gueltString, taxZusatzString, taxonBase, parent);
//Buttler/Checklist taxon
if(CdmUtils.isNotBlank(clTaxonString) && clTaxonString.equals("b")){
- createParentChildNodes(checklistClassification, id, gueltString, taxZusatzString, taxonBase, parent);
+ if(taxonBase.isInstanceOf(Taxon.class)){
+ createParentChildNodes(checklistClassification, id, gueltString, taxZusatzString, taxonBase, parent);
+ }
+ else if(taxonBase.isInstanceOf(Synonym.class)){
+ //if it is a synonym it is already added to the accepted taxon
+ //so we just change the sec reference
+ taxonBase.setSec(checklistClassification.getReference());
+ taxonBase.setTitleCache(null);
+ }
+
}
}
return;
}
parent.addMisappliedName((Taxon) taxonBase, null, null);
+ //return because misapplied names do not have sec references
+ return;
}
else{
classification.addParentChild(parent, (Taxon)taxonBase, null, null);
private void makeSingleNameAndTaxon(RedListGefaesspflanzenImportState state, ResultSet rs, Set<TaxonNameBase> namesToSave, Set<TaxonBase> taxaToSave)
throws SQLException {
long id = rs.getLong(RedListUtil.NAMNR);
- String clTaxonString = rs.getString(RedListUtil.CL_TAXON);
String relationE = rs.getString(RedListUtil.E);
String relationW = rs.getString(RedListUtil.W);
String relationK = rs.getString(RedListUtil.K);