ref #7981, ref #7980, ref #8871 explicitly defined source modes for aggregation confi...
authorAndreas Müller <a.mueller@bgbm.org>
Thu, 7 Oct 2021 13:56:31 +0000 (15:56 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Thu, 7 Oct 2021 13:56:31 +0000 (15:56 +0200)
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/description/DescriptionAggregationConfigurationBase.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/description/DistributionAggregationConfiguration.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/description/StructuredDescriptionAggregationConfiguration.java

index f1fc1b477c0dfa9b636ace9d70e761ff2af5817b..5989b4ce43191e68388dc69b029031ecca253c34 100644 (file)
@@ -30,8 +30,8 @@ public abstract class DescriptionAggregationConfigurationBase<TASK extends Descr
 
     private TaxonNodeFilter taxonNodeFilter;
 
-    private AggregationSourceMode toParentSourceMode = AggregationSourceMode.DESCRIPTION;
-    private AggregationSourceMode withinTaxonSourceMode = AggregationSourceMode.ALL_SAMEVALUE;
+    private AggregationSourceMode withinTaxonSourceMode = AggregationSourceMode.NONE; //to be defined by implementing class
+    private AggregationSourceMode toParentSourceMode = AggregationSourceMode.NONE; //to be defined by implementing class
 
     private List<AggregationMode> aggregationModes;
 
index bf86a6029f08e517fdaf6ec53f6098ab111fd27a..cde06014959199f746da2ef2b3ec7cb0b6f195d5 100644 (file)
@@ -69,6 +69,9 @@ public class DistributionAggregationConfiguration
     private DistributionAggregationConfiguration(List<AggregationMode> aggregationModes, List<UUID> superAreas,
             TaxonNodeFilter filter, IProgressMonitor monitor) {
         super(filter, monitor, aggregationModes);
+        setWithinTaxonSourceMode(AggregationSourceMode.ALL_SAMEVALUE);  //default mode for distribution descriptions
+        setToParentSourceMode(AggregationSourceMode.DESCRIPTION);  //default mode for structured descriptions
+
         this.superAreasUuids = superAreas;
     }
 
index 3cdb8a2df5af4b9bf52d4a40582a04813d11fc71..fef45b7ea0b56f58fa9d10d40cb43e5263771961 100644 (file)
@@ -50,6 +50,7 @@ public class StructuredDescriptionAggregationConfiguration
             List<AggregationMode> aggregationModes, IProgressMonitor monitor, Boolean includeDefault, Boolean includeLiterature) {
         super(filter, monitor, aggregationModes);
         setWithinTaxonSourceMode(AggregationSourceMode.DESCRIPTION);  //default mode for structured descriptions
+        setToParentSourceMode(AggregationSourceMode.TAXON);  //default mode for structured descriptions
         if (includeDefault != null){
             this.includeDefault = includeDefault;
         }