Project

General

Profile

Revision d4aefb3a

IDd4aefb3a4305ff0d7c55bd1f39ccc9b088c90b9e
Parent 61473b5a
Child 1cc08dc4

Added by Patrick Plitzner almost 2 years ago

ref #7674 Do not aggregate taxon descriptions

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/AggregationConfiguration.java
13 13

  
14 14
import org.apache.commons.lang.StringUtils;
15 15
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
16
import org.eclipse.nebula.widgets.nattable.data.ListDataProvider;
16 17
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
17 18
import org.eclipse.nebula.widgets.nattable.summaryrow.DefaultSummaryRowConfiguration;
18 19
import org.eclipse.nebula.widgets.nattable.summaryrow.ISummaryProvider;
19 20
import org.eclipse.nebula.widgets.nattable.summaryrow.SummaryRowConfigAttributes;
20 21
import org.eclipse.nebula.widgets.nattable.summaryrow.SummaryRowLayer;
21 22

  
23
import eu.etaxonomy.cdm.api.service.dto.TaxonRowWrapperDTO;
22 24
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
23 25
import eu.etaxonomy.cdm.model.description.CategoricalData;
24 26
import eu.etaxonomy.cdm.model.description.Feature;
......
75 77
        public Object summarize(int columnIndex) {
76 78
            Float minTotal = null;
77 79
            Float maxTotal = null;
78
            int rowCount = AggregationConfiguration.this.matrix.getBodyDataProvider().getRowCount();
80
            ListDataProvider<Object> bodyDataProvider = AggregationConfiguration.this.matrix.getBodyDataProvider();
81
            int rowCount = bodyDataProvider.getRowCount();
79 82

  
80 83
            for (int rowIndex = 0; rowIndex < rowCount; rowIndex++) {
81
                Object dataValue = AggregationConfiguration.this.matrix.getBodyDataProvider().getDataValue(columnIndex,
84
                Object rowObject = bodyDataProvider.getRowObject(rowIndex);
85
                if(rowObject instanceof TaxonRowWrapperDTO){
86
                    // do not aggregate taxon descriptions
87
                    continue;
88
                }
89
                Object dataValue = bodyDataProvider.getDataValue(columnIndex,
82 90
                        rowIndex);
83 91
                if(HibernateProxyHelper.isInstanceOf(dataValue, QuantitativeData.class)){
84 92
                    QuantitativeData quantitativeData = HibernateProxyHelper.deproxy(dataValue, QuantitativeData.class);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)