//Gesamtliste
TaxonBase<?> taxonBase = state.getRelatedObject(RedListUtil.TAXON_GESAMTLISTE_NAMESPACE, String.valueOf(id), TaxonBase.class);
+ taxonBase.setSec(gesamtListeClassification.getReference());
Taxon parent = state.getRelatedObject(RedListUtil.TAXON_GESAMTLISTE_NAMESPACE, parentId, Taxon.class);
if(parent!=null && !parent.isInstanceOf(Taxon.class)){
RedListUtil.logMessage(id, parent+" is no taxon but is a parent of "+taxonBase+" (Gesamtliste)", logger);
Taxon family = (Taxon) state.getRelatedObject(RedListUtil.FAMILY_NAMESPACE_GESAMTLISTE, familieString);
gesamtListeClassification.addParentChild(family, HibernateProxyHelper.deproxy(taxonBase, Taxon.class), null, null);
//Buttler/Checklist taxon
- if(CdmUtils.isNotBlank(clTaxonString) && clTaxonString.equals("b")){
+ if(CdmUtils.isNotBlank(clTaxonString) && clTaxonString.equals(RedListUtil.CL_TAXON_B)){
checklistClassification.addParentChild(family, HibernateProxyHelper.deproxy(taxonBase, Taxon.class), null, null);
+ taxonBase.setSec(checklistClassification.getReference());
}
if(family.getTaxonNodes().isEmpty()){
gesamtListeClassification.addChildTaxon(family, null, null);
else{
createParentChildNodes(gesamtListeClassification, id, gueltString, taxZusatzString, taxonBase, parent);
//Buttler/Checklist taxon
- if(CdmUtils.isNotBlank(clTaxonString) && clTaxonString.equals("b")){
- if(taxonBase.isInstanceOf(Taxon.class)){
- createParentChildNodes(checklistClassification, id, gueltString, taxZusatzString, taxonBase, parent);
+ if(CdmUtils.isNotBlank(clTaxonString) && clTaxonString.equals(RedListUtil.CL_TAXON_B)){
+ if(!checklistClassification.isTaxonInTree(parent)){
+ RedListUtil.logInfoMessage(id, parent+" is parent taxon but is not in checklist. Skipping child "+taxonBase, logger);
}
- 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);
+ else{
+ 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);
+ }
}
}
}
+ taxonBase.setTitleCache(null, false);//refresh title cache
//add taxa for concept relationships to E, W, K, AW, AO, R, O, S
addTaxonToClassification(classificationE, RedListUtil.CLASSIFICATION_NAMESPACE_E, relationE, taxonBase, id, state);
}
//set sec reference
taxonBase.setSec(classification.getReference());
- taxonBase.setTitleCache(null, false);//refresh title cache
}
@Override
//---TAXON---
TaxonBase<?> taxonBase = importTaxon(rs, name, state);
if(taxonBase==null){
- RedListUtil.logMessage(id, "Taxon for name "+name+" could not be created.", logger);
+ RedListUtil.logMessage(id, "!SERIOUS ERROR! Taxon for name "+name+" could not be created!", logger);
return;
}
taxonBase = Synonym.NewInstance(name, null);
}
else{
+ RedListUtil.logMessage(id, "Taxon was not created!! Unknown value for "+RedListUtil.GUELT+"!", logger);
return null;
}
else if(rankStr.equals("KMB")){
return getRank(state, RedListUtil.uuidRankCombination, "Combination", "Combination", "", (OrderedTermVocabulary<Rank>) Rank.GENUS().getVocabulary(), null, RankClass.Infraspecific);
}
+ else if(rankStr.equals("'FO")){
+ return getRank(state, RedListUtil.uuidRankForme, "Forme'", "Forme'", "", (OrderedTermVocabulary<Rank>) Rank.GENUS().getVocabulary(), null, RankClass.Infraspecific);
+ }
else{
rank = state.getTransformer().getRankByKey(rankStr);
}
public static final UUID uuidRankLusus = UUID.fromString("4c8e12f6-2c16-4eda-a7d9-2fd247dcce789");
public static final UUID uuidRankSubspeciesPrincipes = UUID.fromString("b6b9351b-6beb-431d-8c7a-d30fe0cf3a90");
public static final UUID uuidRankCombination = UUID.fromString("ec2c580e-416a-4ecf-85df-d03641f3bd64");
+ public static final UUID uuidRankForme = UUID.fromString("05b4f66f-5559-4e44-bbb8-70744a5ea64a");
public static final String NAME_NAMESPACE = "name";
public static final String AUTHOR_NAMESPACE = "author";
public static final String GUELT_BASIONYM = "b";
public static final String GUELT_SYNONYM = "x";
public static final String GUELT_ACCEPTED_TAXON = "1";
+ public static final String CL_TAXON_B = "b";
+ public static final String CL_TAXON_K = "k";
public static final String HYB_X = "x";
public static final String HYB_XF = "xf";
public static final String HYB_XS = "xs";
public static final String NAMNR = "NAMNR";
public static final String SEQNUM = "SEQNUM";
public static final String GUELT = "GUELT";
- public static final String LOWER = "LOWER";
+ public static final String LOWER = "LOWER_G";
public static final String AUTOR_BASI = "AUTOR_BASI";
public static final String AUTOR_KOMB = "AUTOR_KOMB";
public static final String ZUSATZ = "ZUSATZ";
public static final String AO = "AO";
public static final String R = "R";
public static final String O = "O";
- public static final String S = "S";
+ public static final String S = "S1";
+ public static final String S2 = "S2";
public static void logMessage(long id, String message, Logger logger){
logger.error(NAMNR+": "+id+" "+message);