Project

General

Profile

Revision 5bf13b75

ID5bf13b754f399bfbd84b0656b076cc9991968738
Parent 66889a42
Child 9f8cc8f0

Added by Katja Luther 3 months ago

ref #9710: missed adaption in StructuredAggregationConfigurationWizard

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/StructuredAggregationConfigurationWizard.java
17 17
import eu.etaxonomy.cdm.api.service.longrunningService.ILongRunningTasksService;
18 18
import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor;
19 19
import eu.etaxonomy.cdm.filter.TaxonNodeFilter;
20
import eu.etaxonomy.cdm.model.description.DescriptiveDataSet;
21
import eu.etaxonomy.cdm.model.location.NamedArea;
22 20
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
21
import eu.etaxonomy.cdm.persistence.dto.DescriptiveDataSetBaseDto;
23 22
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
23
import eu.etaxonomy.cdm.persistence.dto.TermDto;
24 24
import eu.etaxonomy.taxeditor.l10n.Messages;
25 25
import eu.etaxonomy.taxeditor.operation.IPostMoniteredOperationEnabled;
26 26

  
......
33 33
    private final StructuredDescriptionAggregationConfiguration configurator;
34 34
    private StructuredDescriptionAggregationConfigurationWizardPage page;
35 35
    private ILongRunningTasksService longRunningTaskService;
36
    private DescriptiveDataSet dataSet;
36
    private DescriptiveDataSetBaseDto dataSet;
37 37
    private List<TaxonNodeDto> selectedNodes;
38 38

  
39 39

  
40
    public StructuredAggregationConfigurationWizard(StructuredDescriptionAggregationConfiguration config, DescriptiveDataSet dataSet, List<TaxonNodeDto> nodes) {
40
    public StructuredAggregationConfigurationWizard(StructuredDescriptionAggregationConfiguration config, DescriptiveDataSetBaseDto dataSet, List<TaxonNodeDto> nodes) {
41 41
        super();
42 42
        this.configurator = config;
43 43
        this.dataSet = dataSet;
......
68 68
//        }
69 69
        TaxonNodeFilter filter = configurator.getTaxonNodeFilter();
70 70
        if (!page.useHigherLevel()) {
71
            filter.setRankMax(dataSet.getMaxRank());
72
            filter.setRankMin(dataSet.getMinRank());
71
            filter.setRankMax(dataSet.getMaxRank().getUuid());
72
            filter.setRankMin(dataSet.getMinRank().getUuid());
73 73

  
74
            for (NamedArea namedArea : dataSet.getGeoFilter()) {
74
            for (TermDto namedArea : dataSet.getGeoFilter()) {
75 75
                filter = filter.orArea(namedArea.getUuid());
76 76
            }
77 77
            //TODO: check whether this is correct!!!!
......
84 84
            }
85 85
            configurator.setTaxonNodeFilter(filter);
86 86
        }else{
87
            filter = TaxonNodeFilter.NewRankInstance(dataSet.getMinRank(),
88
                    dataSet.getMaxRank());
89
            for (NamedArea namedArea : dataSet.getGeoFilter()) {
87
            filter = TaxonNodeFilter.NewRankInstance(dataSet.getMinRank().getUuid(),
88
                    dataSet.getMaxRank().getUuid());
89
            for (TermDto namedArea : dataSet.getGeoFilter()) {
90 90
                filter = filter.orArea(namedArea.getUuid());
91 91
            }
92
            for (TaxonNode taxonNode : dataSet.getTaxonSubtreeFilter()) {
93
                filter = filter.orSubtree(taxonNode);
92
            for (TaxonNodeDto taxonNode : dataSet.getSubTreeFilter()) {
93
                filter = filter.orSubtree(taxonNode.getUuid());
94 94
            }
95 95
            configurator.setTaxonNodeFilter(filter);
96 96
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)