1
|
/**
|
2
|
* Copyright (C) 2009 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
|
|
10
|
|
11
|
package eu.etaxonomy.cdm.api.service.config;
|
12
|
|
13
|
import java.util.List;
|
14
|
import java.util.Set;
|
15
|
|
16
|
import eu.etaxonomy.cdm.model.location.NamedArea;
|
17
|
import eu.etaxonomy.cdm.model.taxon.Classification;
|
18
|
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
|
19
|
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
|
20
|
import eu.etaxonomy.cdm.persistence.query.MatchMode;
|
21
|
import eu.etaxonomy.cdm.persistence.query.NameSearchOrder;
|
22
|
|
23
|
/**
|
24
|
* @author a.babadshanjan
|
25
|
* @since 20.01.2009
|
26
|
*/
|
27
|
public class FindTaxaAndNamesConfiguratorImpl extends IdentifiableServiceConfiguratorImpl<TaxonBase>
|
28
|
implements IFindTaxaAndNamesConfigurator {
|
29
|
|
30
|
private static final long serialVersionUID = -8510776848175860267L;
|
31
|
|
32
|
private boolean includeUnpublished = true;
|
33
|
|
34
|
public static FindTaxaAndNamesConfiguratorImpl NewInstance() {
|
35
|
return new FindTaxaAndNamesConfiguratorImpl();
|
36
|
}
|
37
|
|
38
|
private FindTaxaAndNamesConfiguratorImpl(){}
|
39
|
|
40
|
private boolean doTaxa = true;
|
41
|
private boolean doSynonyms = false;
|
42
|
private boolean doTaxaByCommonNames = false;
|
43
|
private boolean doNamesWithoutTaxa = false;
|
44
|
private boolean doMisappliedNames = false;
|
45
|
private boolean doIncludeAuthors = false;
|
46
|
private Classification classification = null;
|
47
|
private TaxonNode subtree = null;
|
48
|
private List<String> taxonPropertyPath;
|
49
|
private List<String> synonymPropertyPath;
|
50
|
private List<String> taxonNamePropertyPath;
|
51
|
private List<String> commonNamePropertyPath;
|
52
|
private Set<NamedArea> namedAreas;
|
53
|
private NameSearchOrder order;
|
54
|
|
55
|
|
56
|
/**
|
57
|
* @return the taxonNamePropertyPath
|
58
|
*/
|
59
|
@Override
|
60
|
public List<String> getTaxonNamePropertyPath() {
|
61
|
return taxonNamePropertyPath;
|
62
|
}
|
63
|
|
64
|
/**
|
65
|
* @param taxonNamePropertyPath the taxonNamePropertyPath to set
|
66
|
*/
|
67
|
@Override
|
68
|
public void setTaxonNamePropertyPath(List<String> taxonNamePropertyPath) {
|
69
|
this.taxonNamePropertyPath = taxonNamePropertyPath;
|
70
|
}
|
71
|
|
72
|
@Override
|
73
|
public boolean isDoTaxa() {
|
74
|
return doTaxa;
|
75
|
}
|
76
|
|
77
|
@Override
|
78
|
public void setDoTaxa(boolean doTaxa) {
|
79
|
this.doTaxa = doTaxa;
|
80
|
}
|
81
|
|
82
|
@Override
|
83
|
public boolean isDoSynonyms() {
|
84
|
return doSynonyms;
|
85
|
}
|
86
|
|
87
|
@Override
|
88
|
public void setDoSynonyms(boolean doSynonyms) {
|
89
|
this.doSynonyms = doSynonyms;
|
90
|
}
|
91
|
|
92
|
/**
|
93
|
* @return doTaxaByCommonNames
|
94
|
*/
|
95
|
@Override
|
96
|
public boolean isDoTaxaByCommonNames() {
|
97
|
return doTaxaByCommonNames;
|
98
|
}
|
99
|
|
100
|
/**
|
101
|
* @param doTaxaByCommonNames
|
102
|
*/
|
103
|
@Override
|
104
|
public void setDoTaxaByCommonNames(boolean doTaxaByCommonNames) {
|
105
|
this.doTaxaByCommonNames = doTaxaByCommonNames;
|
106
|
}
|
107
|
|
108
|
/**
|
109
|
* @return doNamesWithoutTaxa
|
110
|
*/
|
111
|
@Override
|
112
|
public boolean isDoNamesWithoutTaxa() {
|
113
|
return doNamesWithoutTaxa;
|
114
|
}
|
115
|
|
116
|
/**
|
117
|
* @param doNamesWithoutTaxa
|
118
|
*/
|
119
|
@Override
|
120
|
public void setDoNamesWithoutTaxa(boolean doNamesWithoutTaxa) {
|
121
|
this.doNamesWithoutTaxa = doNamesWithoutTaxa;
|
122
|
}
|
123
|
|
124
|
@Override
|
125
|
public MatchMode getMatchMode() {
|
126
|
return matchMode;
|
127
|
}
|
128
|
|
129
|
@Override
|
130
|
public void setMatchMode(MatchMode matchMode) {
|
131
|
this.matchMode = matchMode;
|
132
|
}
|
133
|
|
134
|
@Override
|
135
|
public Classification getClassification() {
|
136
|
return classification;
|
137
|
}
|
138
|
|
139
|
@Override
|
140
|
public void setClassification(Classification classification) {
|
141
|
this.classification = classification;
|
142
|
}
|
143
|
|
144
|
@Override
|
145
|
public List<String> getTaxonPropertyPath() {
|
146
|
return taxonPropertyPath;
|
147
|
}
|
148
|
|
149
|
@Override
|
150
|
public void setTaxonPropertyPath(List<String> taxonPropertyPath) {
|
151
|
this.taxonPropertyPath = taxonPropertyPath;
|
152
|
}
|
153
|
|
154
|
@Override
|
155
|
public List<String> getCommonNamePropertyPath() {
|
156
|
return commonNamePropertyPath;
|
157
|
}
|
158
|
|
159
|
@Override
|
160
|
public void setCommonNamePropertyPath(List<String> commonNamePropertyPath) {
|
161
|
this.commonNamePropertyPath = commonNamePropertyPath;
|
162
|
}
|
163
|
|
164
|
@Override
|
165
|
public Set<NamedArea> getNamedAreas() {
|
166
|
return namedAreas;
|
167
|
}
|
168
|
|
169
|
@Override
|
170
|
public void setNamedAreas(Set<NamedArea> namedAreas) {
|
171
|
this.namedAreas = namedAreas;
|
172
|
}
|
173
|
|
174
|
@Override
|
175
|
public List<String> getSynonymPropertyPath() {
|
176
|
return synonymPropertyPath;
|
177
|
}
|
178
|
|
179
|
@Override
|
180
|
public void setSynonymPropertyPath(List<String> synonymPropertyPath){
|
181
|
this.synonymPropertyPath = synonymPropertyPath;
|
182
|
}
|
183
|
|
184
|
@Override
|
185
|
public boolean isDoMisappliedNames() {
|
186
|
return this.doMisappliedNames;
|
187
|
}
|
188
|
|
189
|
@Override
|
190
|
public void setDoMisappliedNames(boolean doMisappliedNames) {
|
191
|
this.doMisappliedNames = doMisappliedNames;
|
192
|
}
|
193
|
|
194
|
@Override
|
195
|
public boolean isDoIncludeAuthors() {
|
196
|
return doIncludeAuthors;
|
197
|
}
|
198
|
|
199
|
@Override
|
200
|
public void setDoIncludeAuthors(boolean doIncludeAuthors) {
|
201
|
this.doIncludeAuthors = doIncludeAuthors;
|
202
|
}
|
203
|
|
204
|
|
205
|
@Override
|
206
|
public NameSearchOrder getOrder() {
|
207
|
return order;
|
208
|
}
|
209
|
@Override
|
210
|
public void setOrder(NameSearchOrder order) {
|
211
|
this.order = order;
|
212
|
}
|
213
|
|
214
|
@Override
|
215
|
public boolean isIncludeUnpublished() {
|
216
|
return includeUnpublished;
|
217
|
}
|
218
|
@Override
|
219
|
public void setIncludeUnpublished(boolean includeUnpublished) {
|
220
|
this.includeUnpublished = includeUnpublished;
|
221
|
}
|
222
|
|
223
|
@Override
|
224
|
public TaxonNode getSubtree() {
|
225
|
return subtree;
|
226
|
}
|
227
|
@Override
|
228
|
public void setSubtree(TaxonNode subtree) {
|
229
|
this.subtree = subtree;
|
230
|
}
|
231
|
|
232
|
}
|