1
|
/**
|
2
|
* Copyright (C) 2007 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;
|
10
|
|
11
|
import java.util.Collection;
|
12
|
import java.util.List;
|
13
|
import java.util.Set;
|
14
|
import java.util.UUID;
|
15
|
|
16
|
import eu.etaxonomy.cdm.api.service.dto.DescriptionBaseDto;
|
17
|
import eu.etaxonomy.cdm.api.service.dto.TaxonDistributionDTO;
|
18
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
19
|
import eu.etaxonomy.cdm.model.common.Language;
|
20
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
21
|
import eu.etaxonomy.cdm.model.description.DescriptionBase;
|
22
|
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
|
23
|
import eu.etaxonomy.cdm.model.description.DescriptionType;
|
24
|
import eu.etaxonomy.cdm.model.description.Distribution;
|
25
|
import eu.etaxonomy.cdm.model.description.Feature;
|
26
|
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
|
27
|
import eu.etaxonomy.cdm.model.description.TaxonDescription;
|
28
|
import eu.etaxonomy.cdm.model.description.TaxonNameDescription;
|
29
|
import eu.etaxonomy.cdm.model.location.NamedArea;
|
30
|
import eu.etaxonomy.cdm.model.media.Media;
|
31
|
import eu.etaxonomy.cdm.model.name.TaxonName;
|
32
|
import eu.etaxonomy.cdm.model.taxon.Taxon;
|
33
|
import eu.etaxonomy.cdm.model.term.DefinedTerm;
|
34
|
import eu.etaxonomy.cdm.model.term.TermTree;
|
35
|
import eu.etaxonomy.cdm.model.term.TermVocabulary;
|
36
|
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
|
37
|
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
|
38
|
import eu.etaxonomy.cdm.persistence.dto.TermDto;
|
39
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
40
|
|
41
|
public interface IDescriptionService extends IIdentifiableEntityService<DescriptionBase> {
|
42
|
|
43
|
/**
|
44
|
* @return
|
45
|
* @deprecated use TermService#getVocabulary(VocabularyType) instead
|
46
|
*/
|
47
|
@Deprecated
|
48
|
public TermVocabulary<Feature> getDefaultFeatureVocabulary();
|
49
|
|
50
|
/**
|
51
|
* List the descriptions of type <T>, filtered using the following parameters
|
52
|
*
|
53
|
* @param type The type of description returned (Taxon, TaxonName, or Specimen)
|
54
|
* @param hasMedia Restrict the description to those that do (true) or don't (false) contain <i>elements</i> that have one or more media (can be null)
|
55
|
* @param hasText Restrict the description to those that do (true) or don't (false) contain TextData <i>elements</i> that have some textual content (can be null)
|
56
|
* @param feature Restrict the description to those <i>elements</i> which are scoped by one of the Features passed (can be null or empty)
|
57
|
* @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
|
58
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
59
|
* @param orderHints may be null
|
60
|
* @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
|
61
|
* @return a Pager containing DescriptionBase instances
|
62
|
*/
|
63
|
public Pager<DescriptionBase> page(Class<? extends DescriptionBase> type, Boolean hasMedia, Boolean hasText, Set<Feature> feature, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
64
|
|
65
|
/**
|
66
|
* Count the descriptions of type <TYPE>, filtered using the following parameters
|
67
|
*
|
68
|
* @param type The type of description returned (Taxon, TaxonName, or Specimen)
|
69
|
* @param hasMedia Restrict the description to those that do (true) or don't (false) contain <i>elements</i> that have one or more media (can be null)
|
70
|
* @param hasText Restrict the description to those that do (true) or don't (false) contain TextData <i>elements</i> that have some textual content (can be null)
|
71
|
* @param feature Restrict the description to those <i>elements</i> which are scoped by one of the Features passed (can be null or empty)
|
72
|
* @return a count of DescriptionBase instances
|
73
|
*/
|
74
|
public long count(Class<? extends DescriptionBase> type, Boolean hasImages, Boolean hasText, Set<Feature> feature);
|
75
|
|
76
|
/**
|
77
|
* Returns description elements of type <TYPE>, belonging to a given
|
78
|
* description, optionally filtered by one or more features
|
79
|
*
|
80
|
* @param description
|
81
|
* The description which these description elements belong to
|
82
|
* (can be null to count all description elements)
|
83
|
* @param descriptionType
|
84
|
* A filter DescriptionElements which belong to of a specific
|
85
|
* class of Descriptions
|
86
|
* @param features
|
87
|
* Restrict the results to those description elements which are
|
88
|
* scoped by one of the Features passed (can be null or empty)
|
89
|
* @param type
|
90
|
* A filter for DescriptionElements of a specific class
|
91
|
* @param pageSize
|
92
|
* The maximum number of description elements returned (can be
|
93
|
* null for all description elements)
|
94
|
* @param pageNumber
|
95
|
* The offset (in pageSize chunks) from the start of the result
|
96
|
* set (0 - based)
|
97
|
* @param propertyPaths
|
98
|
* Properties to initialize in the returned entities, following
|
99
|
* the syntax described in
|
100
|
* {@link IBeanInitializer#initialize(Object, List)}
|
101
|
* @return a Pager containing DescriptionElementBase instances
|
102
|
|
103
|
* @deprecated use
|
104
|
* {@link #pageDescriptionElements(DescriptionBase, Set, Class, Integer, Integer, List)}
|
105
|
* instead
|
106
|
*/
|
107
|
@Deprecated
|
108
|
public <T extends DescriptionElementBase> Pager<T> getDescriptionElements(DescriptionBase description,Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
109
|
|
110
|
|
111
|
/**
|
112
|
* Returns description elements of type <TYPE>, belonging to a given
|
113
|
* description, optionally filtered by one or more features
|
114
|
*
|
115
|
* @param description
|
116
|
* The description which these description elements belong to
|
117
|
* (can be null to count all description elements)
|
118
|
* @param descriptionType
|
119
|
* A filter DescriptionElements which belong to of a specific
|
120
|
* class of Descriptions
|
121
|
* @param features
|
122
|
* Restrict the results to those description elements which are
|
123
|
* scoped by one of the Features passed (can be null or empty)
|
124
|
* @param type
|
125
|
* A filter for DescriptionElements of a specific class
|
126
|
* @param pageSize
|
127
|
* The maximum number of description elements returned (can be
|
128
|
* null for all description elements)
|
129
|
* @param pageNumber
|
130
|
* The offset (in pageSize chunks) from the start of the result
|
131
|
* set (0 - based)
|
132
|
* @param propertyPaths
|
133
|
* Properties to initialize in the returned entities, following
|
134
|
* the syntax described in
|
135
|
* {@link IBeanInitializer#initialize(Object, List)}
|
136
|
*
|
137
|
* @return a Pager containing DescriptionElementBase instances
|
138
|
*/
|
139
|
public <T extends DescriptionElementBase> Pager<T> pageDescriptionElements(DescriptionBase description, Class<? extends DescriptionBase> descriptionType, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
140
|
|
141
|
/**
|
142
|
* Returns description elements of type <TYPE>, belonging to a given
|
143
|
* description, optionally filtered by one or more features
|
144
|
*
|
145
|
* @param description
|
146
|
* The description which these description elements belong to
|
147
|
* (can be null to count all description elements)
|
148
|
* @param features
|
149
|
* Restrict the results to those description elements which are
|
150
|
* scoped by one of the Features passed (can be null or empty)
|
151
|
* @param type
|
152
|
* A filter for DescriptionElements of a specific class
|
153
|
* @param pageSize
|
154
|
* The maximum number of description elements returned (can be
|
155
|
* null for all description elements)
|
156
|
* @param pageNumber
|
157
|
* The offset (in pageSize chunks) from the start of the result
|
158
|
* set (0 - based)
|
159
|
* @param propertyPaths
|
160
|
* Properties to initialize in the returned entities, following
|
161
|
* the syntax described in
|
162
|
* {@link IBeanInitializer#initialize(Object, List)}
|
163
|
* @return a List of DescriptionElementBase instances
|
164
|
* @deprecated use {@link #listDescriptionElements(DescriptionBase, Class, Set, Class, Integer, Integer, List)} instead
|
165
|
*/
|
166
|
@Deprecated
|
167
|
public <T extends DescriptionElementBase> List<T> listDescriptionElements(DescriptionBase description,Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
168
|
|
169
|
/**
|
170
|
* Returns description elements of type <TYPE>, belonging to a given
|
171
|
* description, optionally filtered by one or more features
|
172
|
*
|
173
|
* @param description
|
174
|
* The description which these description elements belong to
|
175
|
* (can be null to count all description elements)
|
176
|
* @param features
|
177
|
* Restrict the results to those description elements which are
|
178
|
* scoped by one of the Features passed (can be null or empty)
|
179
|
* @param type
|
180
|
* A filter DescriptionElements of a for specific class
|
181
|
* @param pageSize
|
182
|
* The maximum number of description elements returned (can be
|
183
|
* null for all description elements)
|
184
|
* @param pageNumber
|
185
|
* The offset (in pageSize chunks) from the start of the result
|
186
|
* set (0 - based)
|
187
|
* @param propertyPaths
|
188
|
* Properties to initialize in the returned entities, following
|
189
|
* the syntax described in
|
190
|
* {@link IBeanInitializer#initialize(Object, List)}
|
191
|
* @return a List of DescriptionElementBase instances
|
192
|
*/
|
193
|
public <T extends DescriptionElementBase> List<T> listDescriptionElements(DescriptionBase description, Class<? extends DescriptionBase> descriptionType, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
194
|
|
195
|
|
196
|
/**
|
197
|
* Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method
|
198
|
*
|
199
|
* @param taxon The taxon which the description refers to (can be null for all TaxonDescription instances)
|
200
|
* @param scopes Restrict the results to those descriptions which are scoped by one of the Scope instances passed (can be null or empty)
|
201
|
* @param geographicalScope Restrict the results to those descriptions which have a geographical scope that overlaps with the NamedArea instances passed (can be null or empty)
|
202
|
* @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
|
203
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
204
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
205
|
* @return a Pager containing TaxonDescription instances
|
206
|
*
|
207
|
* @see #pageMarkedTaxonDescriptions(Taxon, Set, Set, Set, Integer, Integer, List)
|
208
|
*/
|
209
|
public Pager<TaxonDescription> pageTaxonDescriptions(Taxon taxon, Set<DefinedTerm> scopes, Set<NamedArea> geographicalScope, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
210
|
|
211
|
/**
|
212
|
* Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method
|
213
|
*
|
214
|
* @param taxon The taxon which the description refers to (can be null for all TaxonDescription instances)
|
215
|
* @param scopes Restrict the results to those descriptions which are scoped by one of the Scope instances passed (can be null or empty)
|
216
|
* @param geographicalScope Restrict the results to those descriptions which have a geographical scope that overlaps with the NamedArea instances passed (can be null or empty)
|
217
|
* @param markerType Restrict the results to those descriptions which are marked as true by one of the given marker types (can be null or empty)
|
218
|
* @param descriptionTypes Restrict the results to those descriptions of the given types (can be null or empty)
|
219
|
* @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
|
220
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
221
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
222
|
* @return a Pager containing TaxonDescription instances
|
223
|
*/
|
224
|
public Pager<TaxonDescription> pageTaxonDescriptions(Taxon taxon, Set<DefinedTerm> scopes, Set<NamedArea> geographicalScope, Set<MarkerType> markerTypes, Set<DescriptionType> descriptionTypes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
225
|
|
226
|
|
227
|
/**
|
228
|
* @see {@link #pageTaxonDescriptions(Taxon, Set, Set, Integer, Integer, List)}
|
229
|
*
|
230
|
* @param taxon
|
231
|
* @param scopes
|
232
|
* @param geographicalScope
|
233
|
* @param pageSize
|
234
|
* @param pageNumber
|
235
|
* @param propertyPaths
|
236
|
* @return
|
237
|
*/
|
238
|
public List<TaxonDescription> listTaxonDescriptions(Taxon taxon, Set<DefinedTerm> scopes, Set<NamedArea> geographicalScope, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
239
|
|
240
|
|
241
|
|
242
|
/**
|
243
|
* @see {@link #pageMarkedTaxonDescriptions(Taxon, Set, Set, Set, Integer, Integer, List)}
|
244
|
*
|
245
|
* @param taxon
|
246
|
* @param scopes
|
247
|
* @param geographicalScope
|
248
|
* @param pageSize
|
249
|
* @param pageNumber
|
250
|
* @param propertyPaths
|
251
|
* @return
|
252
|
*/
|
253
|
public List<TaxonDescription> listTaxonDescriptions(Taxon taxon, Set<DefinedTerm> scopes, Set<NamedArea> geographicalScope, Set<MarkerType> markerTypes, Set<DescriptionType> descriptionTypes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
254
|
|
255
|
/**
|
256
|
* Returns all {@link Media} attached to a taxon via TaxonDescription.elements.media.
|
257
|
* @param taxonUuid the taxons uuid, if null media for all taxa are returned
|
258
|
* @param limitToGalleries if true only media in TaxonDescriptions with imageGallery flag=true are returned
|
259
|
* @param markerTypes only media for TaxonDescriptions with marker of type markerType and marker.flag=true are returned, one matching marker type is sufficient
|
260
|
* @param pageSize
|
261
|
* @param pageNumber
|
262
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
263
|
* @return
|
264
|
*/
|
265
|
public List<Media> listTaxonDescriptionMedia(UUID taxonUuid, boolean limitToGalleries, Set<MarkerType> markerTypes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
266
|
|
267
|
/**
|
268
|
* Returns count for all {@link Media} attached to a taxon via TaxonDescription.elements.media.
|
269
|
* @param taxonUuid the taxons uuid, if null media for all taxa are returned
|
270
|
* @param limitToGalleries if true only media in TaxonDescriptions with imageGallery flag=true are returned
|
271
|
* @param markerTypes only media for TaxonDescriptions with marker of type markerType and marker.flag=true are returned, one matching marker type is sufficient
|
272
|
* @return
|
273
|
*/
|
274
|
public int countTaxonDescriptionMedia(UUID taxonUuid, boolean limitToGalleries, Set<MarkerType> markerTypes);
|
275
|
|
276
|
|
277
|
|
278
|
/**
|
279
|
* Returns a List of TaxonNameDescription instances, optionally filtered by the name which they refer to
|
280
|
*
|
281
|
* @param name Restrict the results to those descriptions that refer to a specific name (can be null for all TaxonNameDescription instances)
|
282
|
* @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
|
283
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
284
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
285
|
* @return a Pager containing TaxonName instances
|
286
|
*
|
287
|
* FIXME candidate for harmonization - rename to pageTaxonNameDescriptions
|
288
|
*/
|
289
|
public Pager<TaxonNameDescription> getTaxonNameDescriptions(TaxonName name, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
290
|
|
291
|
|
292
|
/**
|
293
|
* Returns a List of distinct TaxonDescription instances which have Distribution elements that refer to one of the NamedArea instances passed (optionally
|
294
|
* filtered by a type of PresenceAbsenceTerm e.g. PRESENT / ABSENT / NATIVE / CULTIVATED etc)
|
295
|
*
|
296
|
* @param namedAreas The set of NamedArea instances
|
297
|
* @param presence Restrict the descriptions to those which have Distribution elements are of this status (can be null)
|
298
|
* @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
|
299
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
300
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
301
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
302
|
* @return a Pager containing TaxonDescription instances
|
303
|
*/
|
304
|
public Pager<TaxonDescription> searchDescriptionByDistribution(Set<NamedArea> namedAreas, PresenceAbsenceTerm presence, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
305
|
|
306
|
/**
|
307
|
* Returns a Paged List of DescriptionElementBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
|
308
|
*
|
309
|
* @param clazz filter the results by class (or pass null to return all DescriptionElementBase instances)
|
310
|
* @param queryString
|
311
|
* @param pageSize The maximum number of descriptionElements returned (can be null for all matching descriptionElements)
|
312
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
313
|
* @param orderHints
|
314
|
* Supports path like <code>orderHints.propertyNames</code> which
|
315
|
* include *-to-one properties like createdBy.username or
|
316
|
* authorTeam.persistentTitleCache
|
317
|
* @param propertyPaths properties to be initialized
|
318
|
* @return a Pager DescriptionElementBase instances
|
319
|
* @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
|
320
|
*/
|
321
|
public <S extends DescriptionElementBase> Pager<S> searchElements(Class<S> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
322
|
|
323
|
/**
|
324
|
* Returns a List of Media that are associated with a given description element
|
325
|
*
|
326
|
* @param descriptionElement the description element associated with these media
|
327
|
* @param pageSize The maximum number of media returned (can be null for all related media)
|
328
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
329
|
* @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
|
330
|
* @return a Pager containing media instances
|
331
|
*
|
332
|
* FIXME candidate for harmonization - rename to pageMedia
|
333
|
*/
|
334
|
public Pager<Media> getMedia(DescriptionElementBase descriptionElement, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
335
|
|
336
|
/**
|
337
|
* Provides access to all DescriptionElements associated with the given Taxon
|
338
|
* via a TaxonDescrition.
|
339
|
*
|
340
|
* @param taxon
|
341
|
* The Taxon to return Description elements for
|
342
|
* @param features
|
343
|
* Restrict the results to those description elements which are
|
344
|
* scoped by one of the Features passed (can be null or empty)
|
345
|
* @param type
|
346
|
* A filter for DescriptionElements of a specific class
|
347
|
* @param pageSize
|
348
|
* The maximum number of description elements returned (can be
|
349
|
* null for all description elements)
|
350
|
* @param pageNumber
|
351
|
* The offset (in pageSize chunks) from the start of the result
|
352
|
* set (0 - based)
|
353
|
* @param propertyPaths
|
354
|
* Properties to initialize in the returned entities, following
|
355
|
* the syntax described in
|
356
|
* {@link IBeanInitializer#initialize(Object, List)}
|
357
|
* @return a List containing all matching DescriptionElementBase instances
|
358
|
*
|
359
|
* @deprecated use {@link #listDescriptionElementsForTaxon(Taxon, Set, Class, Integer, Integer, List)} instead
|
360
|
*/
|
361
|
@Deprecated
|
362
|
public <T extends DescriptionElementBase> List<T> getDescriptionElementsForTaxon(Taxon taxon, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
363
|
|
364
|
/**
|
365
|
* Provides access to all DescriptionElements associated with the given Taxon
|
366
|
* via a TaxonDescrition.
|
367
|
*
|
368
|
* @param taxon
|
369
|
* The Taxon to return Description elements for
|
370
|
* @param features
|
371
|
* Restrict the results to those description elements which are
|
372
|
* scoped by one of the Features passed (can be null or empty)
|
373
|
* @param type
|
374
|
* A filter for DescriptionElements of a specific class
|
375
|
* @param pageSize
|
376
|
* The maximum number of description elements returned (can be
|
377
|
* null for all description elements)
|
378
|
* @param pageNumber
|
379
|
* The offset (in pageSize chunks) from the start of the result
|
380
|
* set (0 - based)
|
381
|
* @param propertyPaths
|
382
|
* Properties to initialize in the returned entities, following
|
383
|
* the syntax described in
|
384
|
* {@link IBeanInitializer#initialize(Object, List)}
|
385
|
* @return a List containing all matching DescriptionElementBase instances
|
386
|
*
|
387
|
*/
|
388
|
public <T extends DescriptionElementBase> List<T> listDescriptionElementsForTaxon(Taxon taxon, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
389
|
|
390
|
/**
|
391
|
* Provides access to all DescriptionElements associated with the given Taxon
|
392
|
* via a TaxonDescrition.
|
393
|
*
|
394
|
* @param taxon
|
395
|
* The Taxon to return Description elements for
|
396
|
* @param features
|
397
|
* Restrict the results to those description elements which are
|
398
|
* scoped by one of the Features passed (can be null or empty)
|
399
|
* @param type
|
400
|
* A filter for DescriptionElements of a specific class
|
401
|
* @param pageSize
|
402
|
* The maximum number of description elements returned
|
403
|
* @param pageNumber
|
404
|
* The offset (in pageSize chunks) from the start of the result
|
405
|
* set (0 - based)
|
406
|
* @param propertyPaths
|
407
|
* Properties to initialize in the returned entities, following
|
408
|
* the syntax described in
|
409
|
* {@link IBeanInitializer#initialize(Object, List)}
|
410
|
* @return a Pager for all matching DescriptionElementBase instances
|
411
|
*
|
412
|
*/
|
413
|
public <T extends DescriptionElementBase> Pager<T> pageDescriptionElementsForTaxon(Taxon taxon, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
414
|
|
415
|
/**
|
416
|
* Generate a string representation of the structured <code>description</code> supplied in natural language
|
417
|
* The <code>featureTree</code> will be used to structure the NaturalLanguageDescription.
|
418
|
* This method does not require a initialization strategy so there is no <code>propertyPaths</code> parameter.
|
419
|
* @param featureTree
|
420
|
* @param description
|
421
|
* @param preferredLanguages
|
422
|
* @param separator
|
423
|
* @return
|
424
|
*/
|
425
|
public String generateNaturalLanguageDescription(TermTree featureTree,TaxonDescription description, List<Language> preferredLanguages, String separator);
|
426
|
|
427
|
/**
|
428
|
* Preliminary method to test whether a description contains structured data.
|
429
|
* @deprecated The means of determining this fact may change soon, so this method is
|
430
|
annotated as being deprecated.
|
431
|
* @param description
|
432
|
* @return
|
433
|
*/
|
434
|
@Deprecated
|
435
|
public boolean hasStructuredData(DescriptionBase<?> description);
|
436
|
|
437
|
/**
|
438
|
* Add the collection of {@link DescriptionElementBase description elements} to the <code>targetDescription</code>.
|
439
|
* Remove the description elements from the description they are currently associated with.
|
440
|
*
|
441
|
* @param descriptionElements
|
442
|
* @param targetDescription
|
443
|
* @param isPaste if true, the elements are only copied (cloned) and not removed from the
|
444
|
* old description
|
445
|
* @return
|
446
|
*/
|
447
|
public UpdateResult moveDescriptionElementsToDescription(Collection<DescriptionElementBase> descriptionElements, DescriptionBase targetDescription, boolean isPaste, boolean setNameInSource);
|
448
|
|
449
|
/**
|
450
|
* Pager method to get all {@link NamedAreas} instances which are currently used
|
451
|
* by {@link Distribution} elements.
|
452
|
*
|
453
|
* @param pageSize
|
454
|
* The maximum number of description elements returned
|
455
|
* @param pageNumber
|
456
|
* The offset (in pageSize chunks) from the start of the result
|
457
|
* set (0 - based)
|
458
|
* @param propertyPaths
|
459
|
* Properties to initialize in the returned entities, following
|
460
|
* the syntax described in
|
461
|
* {@link IBeanInitializer#initialize(Object, List)}
|
462
|
* @return a Pager for all NamedAreas instances which are currently in use.
|
463
|
*
|
464
|
*/
|
465
|
public Pager<TermDto> pageNamedAreasInUse(boolean includeAllParents, Integer pageSize,
|
466
|
Integer pageNumber);
|
467
|
|
468
|
/**
|
469
|
* Deletes the description and prior removes it from taxon, specimen or descriptive dataset.
|
470
|
*/
|
471
|
public DeleteResult deleteDescription(DescriptionBase<?> description);
|
472
|
|
473
|
public DeleteResult deleteDescription(UUID descriptionUuid);
|
474
|
|
475
|
public UpdateResult moveTaxonDescriptions(Taxon sourceTaxon, Taxon targetTaxon, boolean setNameInSource);
|
476
|
|
477
|
public UpdateResult moveTaxonDescriptions(UUID sourceTaxonUuid, UUID targetTaxonUuid, boolean setNameInSource);
|
478
|
|
479
|
public UpdateResult moveDescriptionElementsToDescription(Set<UUID> descriptionElementUUIDs, UUID targetDescriptionUuid,
|
480
|
boolean isCopy, boolean setNameInSource);
|
481
|
|
482
|
public UpdateResult moveDescriptionElementsToDescription(Set<UUID> descriptionElementUUIDs, UUID targetTaxonUuid,
|
483
|
String moveMessage, boolean isCopy, boolean setNameInSource);
|
484
|
|
485
|
public UpdateResult moveTaxonDescription(UUID descriptionUuid, UUID targetTaxonUuid, boolean setNameInSource);
|
486
|
|
487
|
public List<MergeResult<DescriptionBase>> mergeDescriptionElements(Collection<TaxonDistributionDTO> descriptionElements,
|
488
|
boolean returnTransientEntity);
|
489
|
|
490
|
public UpdateResult mergeDescriptions(Collection<DescriptionBaseDto> descriptions, UUID descriptiveDataSetUuid);
|
491
|
|
492
|
public UpdateResult moveDescriptionElementsToDescription(Set<UUID> descriptionElementUUIDs,
|
493
|
DescriptionBase targetDescription, boolean isCopy, boolean setNameInSource);
|
494
|
|
495
|
public DeleteResult isDeletable(UUID descriptionUuid);
|
496
|
|
497
|
public DescriptionBaseDto loadDto(UUID descriptionUuid);
|
498
|
|
499
|
public List<DescriptionBaseDto> loadDtosForTaxon(UUID taxonUuid);
|
500
|
}
|