Project

General

Profile

Revision 74ab8c12

ID74ab8c12e9283ca97969609df026ec62708aa9f5
Parent d9f9f1df
Child b9188a94

Added by Patrick Plitzner 11 months ago

fix #7776 Add descriptive data set sources to specimen descriptions

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java
443 443
    }
444 444

  
445 445
    @Override
446
    public SpecimenDescription findSpecimenDescription(UUID descriptiveDataSetUuid, UUID specimenUuid){
446
    public SpecimenDescription findSpecimenDescription(UUID descriptiveDataSetUuid, UUID specimenUuid, boolean addDatasetSource){
447 447
        DescriptiveDataSet dataSet = load(descriptiveDataSetUuid);
448 448
        SpecimenOrObservationBase specimen = occurrenceService.load(specimenUuid);
449 449

  
......
525 525
                    }
526 526
                });
527 527
            } catch (CloneNotSupportedException e) {
528
//                MessagingUtils.error(CharacterMatrix.class, e);
528
                //nothing
529 529
            }
530 530
        }
531 531

  
......
547 547
                }
548 548
            }
549 549
        }
550
        //add sources of data set
551
        if(addDatasetSource){
552
            dataSet.getSources().forEach(source->{
553
                try {
554
                    newDesription.addSource((IdentifiableSource) source.clone());
555
                } catch (CloneNotSupportedException e) {
556
                    //nothing
557
                }
558
            });
559
        }
550 560
        return newDesription;
551 561

  
552 562
    }
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IDescriptiveDataSetService.java
108 108
     * will be returned. A new one will be created otherwise.
109 109
     * @param descriptiveDataSetUuid the uuid of the dataset defining the features
110 110
     * @param specimenUuid the uuid of the specimen
111
     * @param addDatasetSource if <code>true</code> the source(s) of the descriptive dataset
112
     * will be added to the description <b>if</b> a new one is created
111 113
     * @return either the found specimen description or a newly created one
112 114
     */
113
    public SpecimenDescription findSpecimenDescription(UUID descriptiveDataSetUuid, UUID specimenUuid);
115
    public SpecimenDescription findSpecimenDescription(UUID descriptiveDataSetUuid, UUID specimenUuid, boolean addDatasetSource);
114 116

  
115 117
    /**
116 118
     * Returns a {@link TaxonDescription} for a given taxon node with corresponding

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)