2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.api
.service
.config
;
11 import java
.util
.EnumSet
;
12 import java
.util
.UUID
;
14 import eu
.etaxonomy
.cdm
.api
.filter
.TaxonOccurrenceRelationType
;
15 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
16 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationType
;
17 import eu
.etaxonomy
.cdm
.persistence
.query
.AssignmentStatus
;
23 public class FindOccurrencesConfigurator
24 extends IdentifiableServiceConfiguratorImpl
<SpecimenOrObservationBase
>{
26 private static final long serialVersionUID
= -3225141895711379298L;
28 //TODO unify parameters or split configurator into use-cases
30 private SpecimenOrObservationType specimenType
;
31 private UUID associatedTaxonUuid
;
32 private UUID associatedTaxonNameUuid
;
33 private String significantIdentifier
;
34 private boolean retrieveIndirectlyAssociatedSpecimens
;
35 //used, if occurrences related to a taxon are retrieved
36 private EnumSet
<TaxonOccurrenceRelationType
> taxonOccurrenceRelTypes
= TaxonOccurrenceRelationType
.All();
38 private AssignmentStatus assignmentStatus
= AssignmentStatus
.ALL_SPECIMENS
;
40 public void setAssignmentStatus(AssignmentStatus assignmentStatus
) {
41 this.assignmentStatus
= assignmentStatus
;
43 public AssignmentStatus
getAssignmentStatus() {
44 return assignmentStatus
;
47 public String
getSignificantIdentifier() {
48 return significantIdentifier
;
50 public void setSignificantIdentifier(String significantIdentifier
) {
51 this.significantIdentifier
= significantIdentifier
;
53 public SpecimenOrObservationType
getSpecimenType() {
56 public void setSpecimenType(SpecimenOrObservationType specimenType
) {
57 this.specimenType
= specimenType
;
59 public UUID
getAssociatedTaxonUuid() {
60 return associatedTaxonUuid
;
62 public void setAssociatedTaxonUuid(UUID associatedTaxonUuid
) {
63 this.associatedTaxonUuid
= associatedTaxonUuid
;
65 public UUID
getAssociatedTaxonNameUuid() {
66 return associatedTaxonNameUuid
;
68 public void setAssociatedTaxonNameUuid(UUID associatedTaxonNameUuid
) {
69 this.associatedTaxonNameUuid
= associatedTaxonNameUuid
;
73 * if set to <code>true</code> the complete derivative hierarchy including
74 * all parent and child derivatives is returned of the associated specimen
76 * @return the value of this flag
78 public boolean isRetrieveIndirectlyAssociatedSpecimens() {
79 return retrieveIndirectlyAssociatedSpecimens
;
82 * if set to <code>true</code> the complete derivative hierarchy including
83 * all parent and child derivatives is returned of the associated specimen
85 * @param retrieveIndirectlyAssociatedSpecimens the value of this flag
87 public void setRetrieveIndirectlyAssociatedSpecimens(boolean retrieveIndirectlyAssociatedSpecimens
) {
88 this.retrieveIndirectlyAssociatedSpecimens
= retrieveIndirectlyAssociatedSpecimens
;
91 public EnumSet
<TaxonOccurrenceRelationType
> getTaxonOccurrenceRelTypes() {
92 return taxonOccurrenceRelTypes
;
94 public void setTaxonOccurrenceRelTypes(EnumSet
<TaxonOccurrenceRelationType
> taxonOccurrenceRelTypes
) {
95 this.taxonOccurrenceRelTypes
= taxonOccurrenceRelTypes
;