ref #9515 rename state in SpecimenImportBase to individualsAssociationDescriptionPerT...
authorAndreas Müller <a.mueller@bgbm.org>
Fri, 19 Mar 2021 11:55:34 +0000 (12:55 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Fri, 19 Mar 2021 13:05:18 +0000 (14:05 +0100)
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/SpecimenImportBase.java
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/SpecimenImportStateBase.java

index da60cb951d4700a8a9ee86c6fa6eae65edfd76e8..00d0d94d3d2543f0e1eff774eec008bedd40aefe 100755 (executable)
@@ -1205,8 +1205,8 @@ public abstract class SpecimenImportBase<CONFIG extends IImportConfigurator, STA
 
                TaxonDescription taxonDescription = null;
                Set<TaxonDescription> descriptions= taxon.getDescriptions();
-               if (state.getDescriptionPerTaxon(taxon.getUuid()) != null){
-                   taxonDescription = state.getDescriptionPerTaxon(taxon.getUuid());
+               if (state.getIndividualsAssociationDescriptionPerTaxon(taxon.getUuid()) != null){
+                   taxonDescription = state.getIndividualsAssociationDescriptionPerTaxon(taxon.getUuid());
                }
               if (taxonDescription == null && !descriptions.isEmpty() && state.getConfig().isReuseExistingDescriptiveGroups()){
                   for (TaxonDescription desc: descriptions){
@@ -1223,7 +1223,7 @@ public abstract class SpecimenImportBase<CONFIG extends IImportConfigurator, STA
                    if(sourceNotLinkedToElement(taxonDescription,state.getRef(),null)) {
                        taxonDescription.addSource(OriginalSourceType.Import, null, null, state.getRef(), null);
                    }
-                   state.setDescriptionGroup(taxonDescription);
+                   state.setIndividualsAssociationDescriptionPerTaxon(taxonDescription);
                    taxon.addDescription(taxonDescription);
                }
 
@@ -1234,7 +1234,7 @@ public abstract class SpecimenImportBase<CONFIG extends IImportConfigurator, STA
                List<IdentifiableSource> issTmp = new ArrayList<>();//getCommonService().list(IdentifiableSource.class, null, null, null, null);
                List<DescriptionElementSource> issTmp2 = new ArrayList<>();//getCommonService().list(DescriptionElementSource.class, null, null, null, null);
 
-               Set<OriginalSourceBase> osbSet = new HashSet<OriginalSourceBase>();
+               Set<OriginalSourceBase> osbSet = new HashSet<>();
                if(issTmp2!=null) {
                    osbSet.addAll(issTmp2);
                }
@@ -1250,7 +1250,7 @@ public abstract class SpecimenImportBase<CONFIG extends IImportConfigurator, STA
                 taxonDescription.addSource(OriginalSourceType.Import,null, null, state.getRef(), null);
             }
 
-               state.setDescriptionGroup(taxonDescription);
+               state.setIndividualsAssociationDescriptionPerTaxon(taxonDescription);
 
                IndividualsAssociation indAssociation = IndividualsAssociation.NewInstance();
                Feature feature = makeFeature(state.getDerivedUnitBase());
index 7f3997fe7ce572cae23f6e441408c9db6d7d0841..4d2953e6a7512925a1a056a1d45498facfb8a030 100644 (file)
@@ -54,7 +54,7 @@ public class SpecimenImportStateBase<CONFIG extends SpecimenImportConfiguratorBa
     private Classification defaultClassification = null;
     private Reference ref = null;
 
-    private HashMap<UUID, TaxonDescription> descriptionsPerTaxon = new HashMap<>();
+    private HashMap<UUID, TaxonDescription> individualsAssociationDescriptionPerTaxon = new HashMap<>();
     private DerivedUnit derivedUnitBase;
 
     private SpecimenImportReport report;
@@ -204,23 +204,21 @@ public class SpecimenImportStateBase<CONFIG extends SpecimenImportConfiguratorBa
     public Reference getRef() {
         return ref;
     }
-
     public void setRef(Reference ref) {
         this.ref = ref;
     }
 
-    public TaxonDescription getDescriptionPerTaxon(UUID taxonUUID) {
-        return descriptionsPerTaxon.get(taxonUUID);
+    public TaxonDescription getIndividualsAssociationDescriptionPerTaxon(UUID taxonUUID) {
+        return individualsAssociationDescriptionPerTaxon.get(taxonUUID);
     }
 
-    public void setDescriptionGroup(TaxonDescription description) {
-        this.descriptionsPerTaxon.put(description.getTaxon().getUuid(), description);
+    public void setIndividualsAssociationDescriptionPerTaxon(TaxonDescription description) {
+        this.individualsAssociationDescriptionPerTaxon.put(description.getTaxon().getUuid(), description);
     }
 
     public DerivedUnit getDerivedUnitBase() {
         return derivedUnitBase;
     }
-
     public void setDerivedUnitBase(DerivedUnit derivedUnitBase) {
         this.derivedUnitBase = derivedUnitBase;
     }