+
+ //--- AUTHORS ---
+ //combination author
+ if(authorKombString.contains(RedListUtil.EX)){
+ //TODO: what happens with multiple ex authors??
+ String[] kombSplit = authorKombString.split(RedListUtil.EX);
+ if(kombSplit.length!=2){
+ RedListUtil.logMessage(id, "Multiple ex combination authors found", logger);
+ }
+ for (int i = 0; i < kombSplit.length; i++) {
+ if(i==0){
+ //first author is ex author
+ TeamOrPersonBase authorKomb = (TeamOrPersonBase) state.getRelatedObject(RedListUtil.AUTHOR_NAMESPACE, kombSplit[i]);
+ name.setExCombinationAuthorship(authorKomb);
+ }
+ else{
+ TeamOrPersonBase authorKomb = (TeamOrPersonBase) state.getRelatedObject(RedListUtil.AUTHOR_NAMESPACE, kombSplit[i]);
+ name.setCombinationAuthorship(authorKomb);
+ }
+ }
+ }
+ else if(authorKombString.trim().equals(RedListUtil.AUCT)){
+ RedListUtil.logMessage(id, "AUCT information in "+RedListUtil.AUTOR_KOMB+" column", logger);
+ }
+ else if(!CdmUtils.isBlank(authorKombString)){
+ TeamOrPersonBase authorKomb = (TeamOrPersonBase) state.getRelatedObject(RedListUtil.AUTHOR_NAMESPACE, authorKombString);
+ name.setCombinationAuthorship(authorKomb);
+ }
+ //basionym author
+ if(authorBasiString.contains(RedListUtil.EX)){
+ String[] basiSplit = authorBasiString.split(RedListUtil.EX);
+ for (int i = 0; i < basiSplit.length; i++) {
+ if(basiSplit.length!=2){
+ RedListUtil.logMessage(id, "Multiple ex basionymn authors found", logger);
+ }
+ if(i==0){
+ TeamOrPersonBase authorBasi= (TeamOrPersonBase) state.getRelatedObject(RedListUtil.AUTHOR_NAMESPACE, basiSplit[i]);
+ if(CdmUtils.isBlank(authorKombString)){
+ name.setExCombinationAuthorship(authorBasi);
+ }
+ else{
+ name.setExBasionymAuthorship(authorBasi);
+ }
+ }
+ else{
+ TeamOrPersonBase authorBasi= (TeamOrPersonBase) state.getRelatedObject(RedListUtil.AUTHOR_NAMESPACE, basiSplit[i]);
+ if(CdmUtils.isBlank(authorKombString)){
+ name.setCombinationAuthorship(authorBasi);
+ }
+ else{
+ name.setBasionymAuthorship(authorBasi);
+ }
+ }
+ }
+ }
+ else if(authorBasiString.trim().equals(RedListUtil.AUCT)){
+ name.setAppendedPhrase(authorBasiString);
+ }
+ else if(!CdmUtils.isBlank(authorBasiString)){
+ //this seems to be a convention in the source database: When there is only a single author then only the "AUTOR_BASI" column is used
+ TeamOrPersonBase authorBasi= (TeamOrPersonBase) state.getRelatedObject(RedListUtil.AUTHOR_NAMESPACE, authorBasiString);
+ if(CdmUtils.isBlank(authorKombString)){
+ name.setCombinationAuthorship(authorBasi);
+ }
+ else{
+ name.setBasionymAuthorship(authorBasi);
+ }
+ }