Set sec reference for all taxa #5448
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 15 Jun 2016 16:50:30 +0000 (18:50 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 20 Jun 2016 08:48:53 +0000 (10:48 +0200)
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportClassification.java
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportNames.java

index 48f947a274054706392981f5dc5c4f8300aff1c8..c9b9aa0466c85bef10cd799c1a5369e9d012b6cc 100644 (file)
@@ -171,6 +171,7 @@ public class RedListGefaesspflanzenImportClassification extends DbImportBase<Red
 
     private void addTaxonToClassification(Classification classification, String classificationNamespace, long id, RedListGefaesspflanzenImportState state){
         Taxon taxon = HibernateProxyHelper.deproxy(state.getRelatedObject(classificationNamespace, String.valueOf(id), TaxonBase.class), Taxon.class);
+        taxon.setSec(classification.getReference());
         classification.addChildTaxon(taxon, null, null);
     }
 
index 9ef33583d795cbc898646f5e5c2d3e6b6106dcff..4cc873681ebb3df7418ea6c950e615d6ed735e62 100644 (file)
@@ -133,7 +133,6 @@ public class RedListGefaesspflanzenImportNames extends DbImportBase<RedListGefae
             RedListUtil.logMessage(id, "Taxon for name "+name+" could not be created.", logger);
             return;
         }
-        taxonBase.setSec(state.getConfig().getSourceReference());
 
         //---CONCEPT RELATIONSHIPS---
         /*check if taxon/synonym also exists in other classification
@@ -183,7 +182,6 @@ public class RedListGefaesspflanzenImportNames extends DbImportBase<RedListGefae
      */
     private void cloneTaxon(TaxonBase<?> taxonBase, TaxonNameBase<?, ?> name, TaxonRelationshipType relationFromCloneToTaxon, Set<TaxonBase<?>> taxaToSave, long id, String sourceNameSpace, boolean reverseRelation, boolean doubtful, RedListGefaesspflanzenImportState state){
         TaxonBase<?> clone = (TaxonBase<?>) taxonBase.clone();
-        clone.setName(name);
         if(taxonBase.isInstanceOf(Taxon.class)){
             TaxonRelationship taxonRelation;
             if(reverseRelation){