Project

General

Profile

« Previous | Next » 

Revision e47983d4

Added by Andreas Müller almost 3 years ago

minor cleanup

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/description/DistributionAggregation.java
223 223
        if (getConfig().isDoClearExistingDescription()){
224 224
            clearDescription(targetDescription);
225 225
        }else{
226
            toDelete = new HashSet<>(getDistributions(targetDescription));
226
            toDelete = new HashSet<>();
227 227
        }
228 228
        for (NamedArea area : accumulatedStatusMap.keySet()) {
229 229
            PresenceAbsenceTerm status = accumulatedStatusMap.get(area).status;
......
247 247
        }
248 248
    }
249 249

  
250
    private Set<Distribution> getDistributions(TaxonDescription aggregationDescription) {
251
        Set<Distribution> result = new HashSet<>();
252
        for (DescriptionElementBase deb: aggregationDescription.getElements()){
253
            if (deb.isInstanceOf(Distribution.class)){
254
                result.add(CdmBase.deproxy(deb,Distribution.class));
255
            }
256
        }
257
        return result;
258
    }
259

  
260 250
    /**
261 251
     * Removes all description elements of type {@link Distribution} from the
262 252
     * (aggregation) description.

Also available in: Unified diff