359 |
359 |
*/
|
360 |
360 |
@Transient
|
361 |
361 |
public Set<SpecimenDescription> getSpecimenDescriptions(boolean includeImageGallery) {
|
362 |
|
Set<SpecimenDescription> specimenDescriptions = new HashSet<SpecimenDescription>();
|
363 |
|
for (DescriptionBase descriptionBase : getDescriptions()){
|
|
362 |
Set<SpecimenDescription> specimenDescriptions = new HashSet<>();
|
|
363 |
for (DescriptionBase<?> descriptionBase : getDescriptions()){
|
364 |
364 |
if (descriptionBase.isInstanceOf(SpecimenDescription.class)){
|
365 |
365 |
if (includeImageGallery || descriptionBase.isImageGallery() == false){
|
366 |
366 |
specimenDescriptions.add(descriptionBase.deproxy(descriptionBase, SpecimenDescription.class));
|
... | ... | |
378 |
378 |
*/
|
379 |
379 |
@Transient
|
380 |
380 |
public Set<SpecimenDescription> getSpecimenDescriptionImageGallery() {
|
381 |
|
Set<SpecimenDescription> specimenDescriptions = new HashSet<SpecimenDescription>();
|
382 |
|
for (DescriptionBase descriptionBase : getDescriptions()){
|
|
381 |
Set<SpecimenDescription> specimenDescriptions = new HashSet<>();
|
|
382 |
for (DescriptionBase<?> descriptionBase : getDescriptions()){
|
383 |
383 |
if (descriptionBase.isInstanceOf(SpecimenDescription.class)){
|
384 |
384 |
if (descriptionBase.isImageGallery() == true){
|
385 |
385 |
specimenDescriptions.add(descriptionBase.deproxy(descriptionBase, SpecimenDescription.class));
|
... | ... | |
417 |
417 |
|
418 |
418 |
public Set<DerivationEvent> getDerivationEvents() {
|
419 |
419 |
if(derivationEvents == null) {
|
420 |
|
this.derivationEvents = new HashSet<DerivationEvent>();
|
|
420 |
this.derivationEvents = new HashSet<>();
|
421 |
421 |
}
|
422 |
422 |
return this.derivationEvents;
|
423 |
423 |
}
|
... | ... | |
438 |
438 |
|
439 |
439 |
public Set<DeterminationEvent> getDeterminations() {
|
440 |
440 |
if(determinations == null) {
|
441 |
|
this.determinations = new HashSet<DeterminationEvent>();
|
|
441 |
this.determinations = new HashSet<>();
|
442 |
442 |
}
|
443 |
443 |
return this.determinations;
|
444 |
444 |
}
|
... | ... | |
585 |
585 |
|
586 |
586 |
//******************** CLONE **********************************************/
|
587 |
587 |
|
588 |
|
/* (non-Javadoc)
|
589 |
|
* @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
|
590 |
|
* @see eu.etaxonomy.cdm.model.common.IdentifiableEntity#clone()
|
591 |
|
* @see java.lang.Object#clone()
|
592 |
|
*/
|
593 |
588 |
@Override
|
594 |
589 |
public Object clone() throws CloneNotSupportedException {
|
595 |
590 |
SpecimenOrObservationBase<S> result = (SpecimenOrObservationBase<S>)super.clone();
|
cleanup