Merge branch 'release/5.45.0'
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / config / FindOccurrencesConfigurator.java
1 /**
2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9 package eu.etaxonomy.cdm.api.service.config;
10
11 import java.util.EnumSet;
12 import java.util.UUID;
13
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;
18
19 /**
20 * @author pplitzner
21 * @since Apr 13, 2015
22 */
23 public class FindOccurrencesConfigurator
24 extends IdentifiableServiceConfiguratorImpl<SpecimenOrObservationBase>{
25
26 private static final long serialVersionUID = -3225141895711379298L;
27
28 //TODO unify parameters or split configurator into use-cases
29
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();
37
38 private AssignmentStatus assignmentStatus = AssignmentStatus.ALL_SPECIMENS;
39
40 public void setAssignmentStatus(AssignmentStatus assignmentStatus) {
41 this.assignmentStatus = assignmentStatus;
42 }
43 public AssignmentStatus getAssignmentStatus() {
44 return assignmentStatus;
45 }
46
47 public String getSignificantIdentifier() {
48 return significantIdentifier;
49 }
50 public void setSignificantIdentifier(String significantIdentifier) {
51 this.significantIdentifier = significantIdentifier;
52 }
53 public SpecimenOrObservationType getSpecimenType() {
54 return specimenType;
55 }
56 public void setSpecimenType(SpecimenOrObservationType specimenType) {
57 this.specimenType = specimenType;
58 }
59 public UUID getAssociatedTaxonUuid() {
60 return associatedTaxonUuid;
61 }
62 public void setAssociatedTaxonUuid(UUID associatedTaxonUuid) {
63 this.associatedTaxonUuid = associatedTaxonUuid;
64 }
65 public UUID getAssociatedTaxonNameUuid() {
66 return associatedTaxonNameUuid;
67 }
68 public void setAssociatedTaxonNameUuid(UUID associatedTaxonNameUuid) {
69 this.associatedTaxonNameUuid = associatedTaxonNameUuid;
70 }
71
72 /**
73 * if set to <code>true</code> the complete derivative hierarchy including
74 * all parent and child derivatives is returned of the associated specimen
75 *
76 * @return the value of this flag
77 */
78 public boolean isRetrieveIndirectlyAssociatedSpecimens() {
79 return retrieveIndirectlyAssociatedSpecimens;
80 }
81 /**
82 * if set to <code>true</code> the complete derivative hierarchy including
83 * all parent and child derivatives is returned of the associated specimen
84 *
85 * @param retrieveIndirectlyAssociatedSpecimens the value of this flag
86 */
87 public void setRetrieveIndirectlyAssociatedSpecimens(boolean retrieveIndirectlyAssociatedSpecimens) {
88 this.retrieveIndirectlyAssociatedSpecimens = retrieveIndirectlyAssociatedSpecimens;
89 }
90
91 public EnumSet<TaxonOccurrenceRelationType> getTaxonOccurrenceRelTypes() {
92 return taxonOccurrenceRelTypes;
93 }
94 public void setTaxonOccurrenceRelTypes(EnumSet<TaxonOccurrenceRelationType> taxonOccurrenceRelTypes) {
95 this.taxonOccurrenceRelTypes = taxonOccurrenceRelTypes;
96 }
97 }