minor
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IDescriptionService.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.cdm.api.service;
12
13 import java.util.Collection;
14 import java.util.List;
15 import java.util.Map;
16 import java.util.Set;
17 import java.util.UUID;
18
19 import eu.etaxonomy.cdm.api.service.pager.Pager;
20 import eu.etaxonomy.cdm.api.utility.DescriptionUtility;
21 import eu.etaxonomy.cdm.model.common.Annotation;
22 import eu.etaxonomy.cdm.model.common.DefinedTerm;
23 import eu.etaxonomy.cdm.model.common.Language;
24 import eu.etaxonomy.cdm.model.common.Marker;
25 import eu.etaxonomy.cdm.model.common.MarkerType;
26 import eu.etaxonomy.cdm.model.common.TermVocabulary;
27 import eu.etaxonomy.cdm.model.description.DescriptionBase;
28 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
29 import eu.etaxonomy.cdm.model.description.Distribution;
30 import eu.etaxonomy.cdm.model.description.Feature;
31 import eu.etaxonomy.cdm.model.description.FeatureTree;
32 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
33 import eu.etaxonomy.cdm.model.description.TaxonDescription;
34 import eu.etaxonomy.cdm.model.description.TaxonNameDescription;
35 import eu.etaxonomy.cdm.model.location.NamedArea;
36 import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
37 import eu.etaxonomy.cdm.model.media.Media;
38 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
39 import eu.etaxonomy.cdm.model.taxon.Taxon;
40 import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
41 import eu.etaxonomy.cdm.persistence.dto.TermDto;
42 import eu.etaxonomy.cdm.persistence.query.OrderHint;
43
44 public interface IDescriptionService extends IIdentifiableEntityService<DescriptionBase> {
45
46 /**
47 *
48 * @return
49 * @deprecated use TermService#getVocabulary(VocabularyType) instead
50 */
51 @Deprecated
52 public TermVocabulary<Feature> getDefaultFeatureVocabulary();
53
54 /**
55 * @deprecated use TermService#getVocabulary(VocabularyType) instead
56 */
57 @Deprecated
58 public TermVocabulary<Feature> getFeatureVocabulary(UUID uuid);
59
60 /**
61 * Gets a DescriptionElementBase instance matching the supplied uuid
62 *
63 * @param uuid the uuid of the DescriptionElement of interest
64 * @return a DescriptionElement, or null if the DescriptionElement does not exist
65 */
66 public DescriptionElementBase getDescriptionElementByUuid(UUID uuid);
67
68 /**
69 * Loads and existing DescriptionElementBase instance matching the supplied uuid,
70 * and recursively initializes all bean properties given in the
71 * <code>propertyPaths</code> parameter.
72 * <p>
73 * For detailed description and examples <b>please refer to:</b>
74 * {@link IBeanInitializer#initialize(Object, List)}
75 *
76 * @param uuid the uuid of the DescriptionElement of interest
77 * @return a DescriptionElement, or null if the DescriptionElement does not exist
78 */
79 public DescriptionElementBase loadDescriptionElement(UUID uuid,List<String> propertyPaths);
80
81 /**
82 * Persists a <code>DescriptionElementBase</code>
83 * @param descriptionElement
84 * @return
85 */
86 public UUID saveDescriptionElement(DescriptionElementBase descriptionElement);
87
88 /**
89 * Persists a collection of <code>DescriptionElementBase</code>
90 * @param descriptionElements
91 * @return
92 */
93 public Map<UUID, DescriptionElementBase> saveDescriptionElement(Collection<DescriptionElementBase> descriptionElements);
94
95 /**
96 * Delete an existing description element
97 *
98 * @param descriptionElement the description element to be deleted
99 * @return the unique identifier of the deleted entity
100 */
101 public UUID deleteDescriptionElement(DescriptionElementBase descriptionElement);
102
103 /**
104 * List the descriptions of type <T>, filtered using the following parameters
105 *
106 * @param type The type of description returned (Taxon, TaxonName, or Specimen)
107 * @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)
108 * @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)
109 * @param feature Restrict the description to those <i>elements</i> which are scoped by one of the Features passed (can be null or empty)
110 * @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
111 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
112 * @param orderHints may be null
113 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
114 * @return a Pager containing DescriptionBase instances
115 */
116 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);
117
118 /**
119 * Count the descriptions of type <TYPE>, filtered using the following parameters
120 *
121 * @param type The type of description returned (Taxon, TaxonName, or Specimen)
122 * @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)
123 * @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)
124 * @param feature Restrict the description to those <i>elements</i> which are scoped by one of the Features passed (can be null or empty)
125 * @return a count of DescriptionBase instances
126 */
127 public int count(Class<? extends DescriptionBase> type, Boolean hasImages, Boolean hasText, Set<Feature> feature);
128
129 /**
130 * Returns description elements of type <TYPE>, belonging to a given
131 * description, optionally filtered by one or more features
132 *
133 * @param description
134 * The description which these description elements belong to
135 * (can be null to count all description elements)
136 * @param descriptionType
137 * A filter DescriptionElements which belong to of a specific
138 * class of Descriptions
139 * @param features
140 * Restrict the results to those description elements which are
141 * scoped by one of the Features passed (can be null or empty)
142 * @param type
143 * A filter for DescriptionElements of a specific class
144 * @param pageSize
145 * The maximum number of description elements returned (can be
146 * null for all description elements)
147 * @param pageNumber
148 * The offset (in pageSize chunks) from the start of the result
149 * set (0 - based)
150 * @param propertyPaths
151 * Properties to initialize in the returned entities, following
152 * the syntax described in
153 * {@link IBeanInitializer#initialize(Object, List)}
154 * @return a Pager containing DescriptionElementBase instances
155
156 * @deprecated use
157 * {@link #pageDescriptionElements(DescriptionBase, Set, Class, Integer, Integer, List)}
158 * instead
159 */
160 @Deprecated
161 public Pager<DescriptionElementBase> getDescriptionElements(DescriptionBase description,Set<Feature> features, Class<? extends DescriptionElementBase> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
162
163
164 /**
165 * Returns description elements of type <TYPE>, belonging to a given
166 * description, optionally filtered by one or more features
167 *
168 * @param description
169 * The description which these description elements belong to
170 * (can be null to count all description elements)
171 * @param descriptionType
172 * A filter DescriptionElements which belong to of a specific
173 * class of Descriptions
174 * @param features
175 * Restrict the results to those description elements which are
176 * scoped by one of the Features passed (can be null or empty)
177 * @param type
178 * A filter for DescriptionElements of a specific class
179 * @param pageSize
180 * The maximum number of description elements returned (can be
181 * null for all description elements)
182 * @param pageNumber
183 * The offset (in pageSize chunks) from the start of the result
184 * set (0 - based)
185 * @param propertyPaths
186 * Properties to initialize in the returned entities, following
187 * the syntax described in
188 * {@link IBeanInitializer#initialize(Object, List)}
189 *
190 * @return a Pager containing DescriptionElementBase instances
191 */
192 public Pager<DescriptionElementBase> pageDescriptionElements(DescriptionBase description, Class<? extends DescriptionBase> descriptionType, Set<Feature> features, Class<? extends DescriptionElementBase> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
193
194 /**
195 * Returns description elements of type <TYPE>, belonging to a given
196 * description, optionally filtered by one or more features
197 *
198 * @param description
199 * The description which these description elements belong to
200 * (can be null to count all description elements)
201 * @param features
202 * Restrict the results to those description elements which are
203 * scoped by one of the Features passed (can be null or empty)
204 * @param type
205 * A filter for DescriptionElements of a specific class
206 * @param pageSize
207 * The maximum number of description elements returned (can be
208 * null for all description elements)
209 * @param pageNumber
210 * The offset (in pageSize chunks) from the start of the result
211 * set (0 - based)
212 * @param propertyPaths
213 * Properties to initialize in the returned entities, following
214 * the syntax described in
215 * {@link IBeanInitializer#initialize(Object, List)}
216 * @return a List of DescriptionElementBase instances
217 * @deprecated use {@link #listDescriptionElements(DescriptionBase, Class, Set, Class, Integer, Integer, List)} instead
218 */
219 @Deprecated
220 public List<DescriptionElementBase> listDescriptionElements(DescriptionBase description,Set<Feature> features, Class<? extends DescriptionElementBase> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
221
222 /**
223 * Returns description elements of type <TYPE>, belonging to a given
224 * description, optionally filtered by one or more features
225 *
226 * @param description
227 * The description which these description elements belong to
228 * (can be null to count all description elements)
229 * @param features
230 * Restrict the results to those description elements which are
231 * scoped by one of the Features passed (can be null or empty)
232 * @param type
233 * A filter DescriptionElements of a for specific class
234 * @param pageSize
235 * The maximum number of description elements returned (can be
236 * null for all description elements)
237 * @param pageNumber
238 * The offset (in pageSize chunks) from the start of the result
239 * set (0 - based)
240 * @param propertyPaths
241 * Properties to initialize in the returned entities, following
242 * the syntax described in
243 * {@link IBeanInitializer#initialize(Object, List)}
244 * @return a List of DescriptionElementBase instances
245 */
246 public List<DescriptionElementBase> listDescriptionElements(DescriptionBase description, Class<? extends DescriptionBase> descriptionType, Set<Feature> features, Class<? extends DescriptionElementBase> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
247
248 /**
249 * Return a Pager containing Annotation entities belonging to the DescriptionElementBase instance supplied, optionally filtered by MarkerType
250 * @param annotatedObj The object that "owns" the annotations returned
251 * @param status Only return annotations which are marked with a Marker of this type (can be null to return all annotations)
252 * @param pageSize The maximum number of terms returned (can be null for all annotations)
253 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
254 * @param orderHints may be null
255 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
256 * @return a Pager of Annotation entities
257 */
258 public Pager<Annotation> getDescriptionElementAnnotations(DescriptionElementBase annotatedObj, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
259
260
261 /**
262 * Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method
263 *
264 * @param taxon The taxon which the description refers to (can be null for all TaxonDescription instances)
265 * @param scopes Restrict the results to those descriptions which are scoped by one of the Scope instances passed (can be null or empty)
266 * @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)
267 * @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
268 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
269 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
270 * @return a Pager containing TaxonDescription instances
271 *
272 * @see #pageMarkedTaxonDescriptions(Taxon, Set, Set, Set, Integer, Integer, List)
273 */
274 public Pager<TaxonDescription> pageTaxonDescriptions(Taxon taxon, Set<DefinedTerm> scopes, Set<NamedArea> geographicalScope, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
275
276 /**
277 * Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method
278 *
279 * @param taxon The taxon which the description refers to (can be null for all TaxonDescription instances)
280 * @param scopes Restrict the results to those descriptions which are scoped by one of the Scope instances passed (can be null or empty)
281 * @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)
282 * @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)
283 * @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
284 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
285 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
286 * @return a Pager containing TaxonDescription instances
287 */
288 public Pager<TaxonDescription> pageTaxonDescriptions(Taxon taxon, Set<DefinedTerm> scopes, Set<NamedArea> geographicalScope, Set<MarkerType> markerTypes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
289
290 /**
291 * @see {@link #pageTaxonDescriptions(Taxon, Set, Set, Integer, Integer, List)}
292 *
293 * @param taxon
294 * @param scopes
295 * @param geographicalScope
296 * @param pageSize
297 * @param pageNumber
298 * @param propertyPaths
299 * @return
300 */
301 public List<TaxonDescription> listTaxonDescriptions(Taxon taxon, Set<DefinedTerm> scopes, Set<NamedArea> geographicalScope, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
302
303
304
305 /**
306 * @see {@link #pageMarkedTaxonDescriptions(Taxon, Set, Set, Set, Integer, Integer, List)}
307 *
308 * @param taxon
309 * @param scopes
310 * @param geographicalScope
311 * @param pageSize
312 * @param pageNumber
313 * @param propertyPaths
314 * @return
315 */
316 public List<TaxonDescription> listTaxonDescriptions(Taxon taxon, Set<DefinedTerm> scopes, Set<NamedArea> geographicalScope, Set<MarkerType> markerTypes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
317
318 /**
319 * Returns all {@link Media} attached to a taxon via TaxonDescription.elements.media.
320 * @param taxonUuid the taxons uuid, if null media for all taxa are returned
321 * @param limitToGalleries if true only media in TaxonDescriptions with imageGallery flag=true are returned
322 * @param markerTypes only media for TaxonDescriptions with marker of type markerType and marker.flag=true are returned, one matching marker type is sufficient
323 * @param pageSize
324 * @param pageNumber
325 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
326 * @return
327 */
328 public List<Media> listTaxonDescriptionMedia(UUID taxonUuid, boolean limitToGalleries, Set<MarkerType> markerTypes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
329
330 /**
331 * Returns count for all {@link Media} attached to a taxon via TaxonDescription.elements.media.
332 * @param taxonUuid the taxons uuid, if null media for all taxa are returned
333 * @param limitToGalleries if true only media in TaxonDescriptions with imageGallery flag=true are returned
334 * @param markerTypes only media for TaxonDescriptions with marker of type markerType and marker.flag=true are returned, one matching marker type is sufficient
335 * @return
336 */
337 public int countTaxonDescriptionMedia(UUID taxonUuid, boolean limitToGalleries, Set<MarkerType> markerTypes);
338
339
340
341 /**
342 * Returns a List of TaxonNameDescription instances, optionally filtered by the name which they refer to
343 *
344 * @param name Restrict the results to those descriptions that refer to a specific name (can be null for all TaxonNameDescription instances)
345 * @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
346 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
347 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
348 * @return a Pager containing TaxonNameBase instances
349 *
350 * FIXME candidate for harmonization - rename to pageTaxonNameDescriptions
351 */
352 public Pager<TaxonNameDescription> getTaxonNameDescriptions(TaxonNameBase name, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
353
354
355 /**
356 * Returns a List of distinct TaxonDescription instances which have Distribution elements that refer to one of the NamedArea instances passed (optionally
357 * filtered by a type of PresenceAbsenceTerm e.g. PRESENT / ABSENT / NATIVE / CULTIVATED etc)
358 *
359 * @param namedAreas The set of NamedArea instances
360 * @param presence Restrict the descriptions to those which have Distribution elements are of this status (can be null)
361 * @param pageSize The maximum number of descriptions returned (can be null for all descriptions)
362 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
363 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
364 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
365 * @return a Pager containing TaxonDescription instances
366 */
367 public Pager<TaxonDescription> searchDescriptionByDistribution(Set<NamedArea> namedAreas, PresenceAbsenceTerm presence, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
368
369 /**
370 * Returns a Paged List of DescriptionElementBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
371 *
372 * @param clazz filter the results by class (or pass null to return all DescriptionElementBase instances)
373 * @param queryString
374 * @param pageSize The maximum number of descriptionElements returned (can be null for all matching descriptionElements)
375 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
376 * @param orderHints
377 * Supports path like <code>orderHints.propertyNames</code> which
378 * include *-to-one properties like createdBy.username or
379 * authorTeam.persistentTitleCache
380 * @param propertyPaths properties to be initialized
381 * @return a Pager DescriptionElementBase instances
382 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
383 */
384 public Pager<DescriptionElementBase> searchElements(Class<? extends DescriptionElementBase> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
385
386 /**
387 * Returns a List of Media that are associated with a given description element
388 *
389 * @param descriptionElement the description element associated with these media
390 * @param pageSize The maximum number of media returned (can be null for all related media)
391 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
392 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
393 * @return a Pager containing media instances
394 *
395 * FIXME candidate for harmonization - rename to pageMedia
396 */
397 public Pager<Media> getMedia(DescriptionElementBase descriptionElement, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
398
399 /**
400 * Provides access to all DescriptionElements associated with the given Taxon
401 * via a TaxonDescrition.
402 *
403 * @param taxon
404 * The Taxon to return Description elements for
405 * @param features
406 * Restrict the results to those description elements which are
407 * scoped by one of the Features passed (can be null or empty)
408 * @param type
409 * A filter for DescriptionElements of a specific class
410 * @param pageSize
411 * The maximum number of description elements returned (can be
412 * null for all description elements)
413 * @param pageNumber
414 * The offset (in pageSize chunks) from the start of the result
415 * set (0 - based)
416 * @param propertyPaths
417 * Properties to initialize in the returned entities, following
418 * the syntax described in
419 * {@link IBeanInitializer#initialize(Object, List)}
420 * @return a List containing all matching DescriptionElementBase instances
421 *
422 * @deprecated use {@link #listDescriptionElementsForTaxon(Taxon, Set, Class, Integer, Integer, List)} instead
423 */
424 @Deprecated
425 public <T extends DescriptionElementBase> List<T> getDescriptionElementsForTaxon(Taxon taxon, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
426
427 /**
428 * Provides access to all DescriptionElements associated with the given Taxon
429 * via a TaxonDescrition.
430 *
431 * @param taxon
432 * The Taxon to return Description elements for
433 * @param features
434 * Restrict the results to those description elements which are
435 * scoped by one of the Features passed (can be null or empty)
436 * @param type
437 * A filter for DescriptionElements of a specific class
438 * @param pageSize
439 * The maximum number of description elements returned (can be
440 * null for all description elements)
441 * @param pageNumber
442 * The offset (in pageSize chunks) from the start of the result
443 * set (0 - based)
444 * @param propertyPaths
445 * Properties to initialize in the returned entities, following
446 * the syntax described in
447 * {@link IBeanInitializer#initialize(Object, List)}
448 * @return a List containing all matching DescriptionElementBase instances
449 *
450 */
451 public <T extends DescriptionElementBase> List<T> listDescriptionElementsForTaxon(Taxon taxon, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
452
453 /**
454 * Provides access to all DescriptionElements associated with the given Taxon
455 * via a TaxonDescrition.
456 *
457 * @param taxon
458 * The Taxon to return Description elements for
459 * @param features
460 * Restrict the results to those description elements which are
461 * scoped by one of the Features passed (can be null or empty)
462 * @param type
463 * A filter for DescriptionElements of a specific class
464 * @param pageSize
465 * The maximum number of description elements returned
466 * @param pageNumber
467 * The offset (in pageSize chunks) from the start of the result
468 * set (0 - based)
469 * @param propertyPaths
470 * Properties to initialize in the returned entities, following
471 * the syntax described in
472 * {@link IBeanInitializer#initialize(Object, List)}
473 * @return a Pager for all matching DescriptionElementBase instances
474 *
475 */
476 public <T extends DescriptionElementBase> Pager<T> pageDescriptionElementsForTaxon(Taxon taxon, Set<Feature> features, Class<T> type, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
477
478
479 /**
480 * @param taxonDescriptions
481 * @param subAreaPreference
482 * enables the <b>Sub area preference rule</b> if set to true,
483 * see {@link DescriptionUtility#filterDistributions(Collection,
484 * boolean, boolean}
485
486 * @param statusOrderPreference
487 * enables the <b>Status order preference rule</b> if set to
488 * true, see {@link
489 * DescriptionUtility#filterDistributions(Collection, boolean,
490 * boolean}
491 * @param hideMarkedAreas
492 * distributions where the area has a {@link Marker} with one of
493 * the specified {@link MarkerType}s will be skipped, see
494 * {@link DescriptionUtility#filterDistributions(Collection, boolean, boolean, Set)}
495 * @param omitLevels
496 * A Set NamedArea levels to omit - optional
497 * @param propertyPaths
498 * the initialization strategy
499 *
500 * @return
501 * @deprecated use {@link IEditGeoService#composeDistributionInfoFor()} instead
502 */
503 @Deprecated
504 public DistributionTree getOrderedDistributions(
505 Set<TaxonDescription> taxonDescriptions,
506 boolean subAreaPreference,
507 boolean statusOrderPreference,
508 Set<MarkerType> hideMarkedAreas,
509 Set<NamedAreaLevel> omitLevels, List<String> propertyPaths);
510
511 /**
512 * Generate a string representation of the structured <code>description</code> supplied in natural language
513 * The <code>featureTree</code> will be used to structure the NaturalLanguageDescription.
514 * This method does not require a initialization strategy so there is no <code>propertyPaths</code> parameter.
515 * @param featureTree
516 * @param description
517 * @param preferredLanguages
518 * @param separator
519 * @return
520 */
521 public String generateNaturalLanguageDescription(FeatureTree featureTree,TaxonDescription description, List<Language> preferredLanguages, String separator);
522
523 /**
524 * Preliminary method to test whether a description contains structured data.
525 * @deprecated The means of determining this fact may change soon, so this method is
526 annotated as being deprecated.
527 * @param description
528 * @return
529 */
530 @Deprecated
531 public boolean hasStructuredData(DescriptionBase<?> description);
532
533 /**
534 * Add the collection of {@link DescriptionElementBase description elements} to the <code>targetDescription</code>.
535 * Remove the description elements from the description they are currently associated with.
536 *
537 * @param descriptionElements
538 * @param targetDescription
539 * @param isPaste if true, the elements are only copied (cloned) and not removed from the
540 * old description
541 */
542 public void moveDescriptionElementsToDescription(Collection<DescriptionElementBase> descriptionElements, DescriptionBase targetDescription, boolean isPaste);
543
544 /**
545 * Pager method to get all {@link NamedAreas} instances which are currently used
546 * by {@link Distribution} elements.
547 *
548 * @param pageSize
549 * The maximum number of description elements returned
550 * @param pageNumber
551 * The offset (in pageSize chunks) from the start of the result
552 * set (0 - based)
553 * @param propertyPaths
554 * Properties to initialize in the returned entities, following
555 * the syntax described in
556 * {@link IBeanInitializer#initialize(Object, List)}
557 * @return a Pager for all NamedAreas instances which are currently in use.
558 *
559 */
560 public Pager<TermDto> pageNamedAreasInUse(boolean includeAllParents, Integer pageSize,
561 Integer pageNumber);
562
563 UUID deleteDescription(DescriptionBase description);
564
565 }