Revision 3889d783
Added by Katja Luther almost 2 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java | ||
---|---|---|
256 | 256 |
for (SpecimenRowWrapperDTO wrapper : wrappers) { |
257 | 257 |
Optional<TaxonBase> findAny = taxa.stream().filter(taxon->taxon.getUuid().equals(wrapper.getTaxonNode().getTaxonUuid())).findAny(); |
258 | 258 |
if(!findAny.isPresent()){ |
259 |
result.addException(new IllegalArgumentException("Could not create wrapper for "+ wrapper.getSpecimen().getLabel())); |
|
259 |
result.addException(new IllegalArgumentException("Could not create wrapper for "+ wrapper.getSpecimenDto().getLabel()));
|
|
260 | 260 |
continue; |
261 | 261 |
} |
262 | 262 |
Taxon taxon = (Taxon) findAny.get(); |
... | ... | |
265 | 265 |
// if(taxonDescriptionUuid!=null){ |
266 | 266 |
// taxonDescription = (TaxonDescription) descriptionService.load(taxonDescriptionUuid); |
267 | 267 |
// } |
268 |
SpecimenOrObservationBase<?> specimen = occurrenceService.load(wrapper.getSpecimen().getUuid()); |
|
268 |
SpecimenOrObservationBase<?> specimen = occurrenceService.load(wrapper.getSpecimenDto().getUuid());
|
|
269 | 269 |
if(taxonDescription==null){ |
270 | 270 |
Optional<TaxonDescription> associationDescriptionOptional = taxon.getDescriptions().stream() |
271 | 271 |
.filter(desc->desc.getTypes().contains(DescriptionType.INDIVIDUALS_ASSOCIATION)) |
Also available in: Unified diff
adaption to cleaned code