3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.cdm
.api
.service
;
13 import java
.io
.IOException
;
14 import java
.util
.Collection
;
15 import java
.util
.List
;
18 import java
.util
.UUID
;
20 import org
.apache
.lucene
.index
.CorruptIndexException
;
21 import org
.apache
.lucene
.queryparser
.classic
.ParseException
;
22 import org
.hibernate
.search
.spatial
.impl
.Rectangle
;
24 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacade
;
25 import eu
.etaxonomy
.cdm
.api
.facade
.DerivedUnitFacadeNotSupportedException
;
26 import eu
.etaxonomy
.cdm
.api
.service
.config
.IIdentifiableEntityServiceConfigurator
;
27 import eu
.etaxonomy
.cdm
.api
.service
.config
.SpecimenDeleteConfigurator
;
28 import eu
.etaxonomy
.cdm
.api
.service
.dto
.FieldUnitDTO
;
29 import eu
.etaxonomy
.cdm
.api
.service
.dto
.PreservedSpecimenDTO
;
30 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
31 import eu
.etaxonomy
.cdm
.api
.service
.search
.SearchResult
;
32 import eu
.etaxonomy
.cdm
.api
.service
.util
.TaxonRelationshipEdge
;
33 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
34 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
35 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionBase
;
36 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
37 import eu
.etaxonomy
.cdm
.model
.description
.IndividualsAssociation
;
38 import eu
.etaxonomy
.cdm
.model
.description
.TaxonDescription
;
39 import eu
.etaxonomy
.cdm
.model
.location
.Country
;
40 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
41 import eu
.etaxonomy
.cdm
.model
.molecular
.DnaSample
;
42 import eu
.etaxonomy
.cdm
.model
.molecular
.Sequence
;
43 import eu
.etaxonomy
.cdm
.model
.name
.HomotypicalGroup
;
44 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
45 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
46 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivationEvent
;
47 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivedUnit
;
48 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
49 import eu
.etaxonomy
.cdm
.model
.occurrence
.FieldUnit
;
50 import eu
.etaxonomy
.cdm
.model
.occurrence
.MediaSpecimen
;
51 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
52 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationType
;
53 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
54 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
55 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonRelationship
;
56 import eu
.etaxonomy
.cdm
.persistence
.dao
.initializer
.IBeanInitializer
;
57 import eu
.etaxonomy
.cdm
.persistence
.dto
.UuidAndTitleCache
;
58 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
61 * @author a.babadshanjan
64 public interface IOccurrenceService
extends IIdentifiableEntityService
<SpecimenOrObservationBase
> {
66 public Country
getCountryByIso(String iso639
);
68 public List
<Country
> getCountryByName(String name
);
71 * Returns a paged list of occurrences that have been determined to belong
72 * to the taxon concept determinedAs, optionally restricted to objects
73 * belonging to a class that that extends SpecimenOrObservationBase. This
74 * will also consider specimens that are determined as a taxon concept
75 * belonging to the synonymy of the given taxon concept.
77 * In contrast to {@link #listByAnyAssociation(Class, Taxon, List)} this
78 * method only takes SpecimenOrObservationBase instances into account which
79 * are actually determined as the taxon specified by
80 * <code>determinedAs</code>.
83 * The type of entities to return (can be null to count all
84 * entities of type <T>)
86 * the taxon concept that the occurrences have been determined to
89 * The maximum number of objects returned (can be null for all
92 * The offset (in pageSize chunks) from the start of the result
93 * set (0 - based, can be null, equivalent of starting at the
94 * beginning of the recordset)
96 * Supports path like <code>orderHints.propertyNames</code> which
97 * include *-to-one properties like createdBy.username or
98 * authorTeam.persistentTitleCache
99 * @param propertyPaths
100 * properties to be initialized
103 public Pager
<SpecimenOrObservationBase
> list(Class
<?
extends SpecimenOrObservationBase
> type
, TaxonBase determinedAs
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
106 * Returns a paged list of occurrences that have been determined to belong
107 * to the taxon name determinedAs, optionally restricted to objects
108 * belonging to a class that that extends SpecimenOrObservationBase.
110 * In contrast to {@link #listByAnyAssociation(Class, Taxon, List)} this
111 * method only takes SpecimenOrObservationBase instances into account which
112 * are actually determined as the taxon specified by
113 * <code>determinedAs</code>.
116 * The type of entities to return (can be null to count all
117 * entities of type <T>)
118 * @param determinedAs
119 * the taxon name that the occurrences have been determined to
122 * The maximum number of objects returned (can be null for all
125 * The offset (in pageSize chunks) from the start of the result
126 * set (0 - based, can be null, equivalent of starting at the
127 * beginning of the recordset)
129 * Supports path like <code>orderHints.propertyNames</code> which
130 * include *-to-one properties like createdBy.username or
131 * authorTeam.persistentTitleCache
132 * @param propertyPaths
133 * properties to be initialized
136 public Pager
<SpecimenOrObservationBase
> list(Class
<?
extends SpecimenOrObservationBase
> type
, TaxonNameBase determinedAs
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
139 * Returns a List of Media that are associated with a given occurence
141 * @param occurence the occurence associated with these media
142 * @param pageSize The maximum number of media returned (can be null for all related media)
143 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
144 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
145 * @return a Pager of media instances
147 public Pager
<Media
> getMedia(SpecimenOrObservationBase occurence
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
150 * Returns all media attached to this occurence and its children. Also takes
151 * {@link MediaSpecimen} and molecular images into account.
153 * @param occurence the occurence and its children from which the media to get
154 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
155 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
156 * @return a Pager of media instances
158 public Pager
<Media
> getMediainHierarchy(SpecimenOrObservationBase rootOccurence
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
161 * Returns a count of determinations that have been made for a given occurence and for a given taxon concept
163 * @param occurence the occurence associated with these determinations (can be null for all occurrences)
164 * @param taxonbase the taxon concept associated with these determinations (can be null for all taxon concepts)
165 * @return a count of determination events
167 public int countDeterminations(SpecimenOrObservationBase occurence
,TaxonBase taxonbase
);
170 * Returns a List of determinations that have been made for a given occurence
172 * @param occurence the occurence associated with these determinations (can be null for all occurrences)
173 * @param taxonbase the taxon concept associated with these determinations (can be null for all taxon concepts)
174 * @param pageSize The maximum number of determinations returned (can be null for all related determinations)
175 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
176 * @return a Pager of determination instances
178 public Pager
<DeterminationEvent
> getDeterminations(SpecimenOrObservationBase occurence
, TaxonBase taxonBase
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
181 * Returns a list of derivation events that have involved creating new DerivedUnits from this occurence
183 * @param occurence the occurence that was a source of these derivation events
184 * @param pageSize The maximum number of derivation events returned (can be null for all related derivation events)
185 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
186 * @return a Pager of derivation events
188 public Pager
<DerivationEvent
> getDerivationEvents(SpecimenOrObservationBase occurence
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
191 * Returns a Paged List of SpecimenOrObservationBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
193 * @param clazz filter the results by class (or pass null to return all SpecimenOrObservationBase instances)
195 * @param pageSize The maximum number of occurrences returned (can be null for all matching occurrences)
196 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
198 * Supports path like <code>orderHints.propertyNames</code> which
199 * include *-to-one properties like createdBy.username or
200 * authorTeam.persistentTitleCache
201 * @param propertyPaths properties to be initialized
202 * @return a Pager SpecimenOrObservationBase instances
203 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
206 public Pager
<SpecimenOrObservationBase
> search(Class
<?
extends SpecimenOrObservationBase
> clazz
, String query
, Integer pageSize
,Integer pageNumber
, List
<OrderHint
> orderHints
,List
<String
> propertyPaths
);
209 * Retrieves the {@link UUID} and the string representation (title cache) of all
210 * {@link FieldUnit}s found in the data base.
211 * @return a list of {@link UuidAndTitleCache}
213 public List
<UuidAndTitleCache
<FieldUnit
>> getFieldUnitUuidAndTitleCache();
216 * Retrieves the {@link UUID} and the string representation (title cache) of all
217 * {@link DerivedUnit}s found in the data base.
218 * @return a list of {@link UuidAndTitleCache}
220 public List
<UuidAndTitleCache
<DerivedUnit
>> getDerivedUnitUuidAndTitleCache();
222 public DerivedUnitFacade
getDerivedUnitFacade(DerivedUnit derivedUnit
, List
<String
> propertyPaths
) throws DerivedUnitFacadeNotSupportedException
;
224 public List
<DerivedUnitFacade
> listDerivedUnitFacades(DescriptionBase description
, List
<String
> propertyPaths
);
227 * Lists all instances of {@link SpecimenOrObservationBase} which are
228 * associated with the <code>taxon</code> specified as parameter.
229 * SpecimenOrObservationBase instances can be associated to taxa in multiple
230 * ways, all these possible relations are taken into account:
232 * <li>The {@link IndividualsAssociation} elements in a
233 * {@link TaxonDescription} contain {@link DerivedUnit}s</li>
234 * <li>{@link SpecimenTypeDesignation}s may be associated with any
235 * {@link HomotypicalGroup} related to the specific {@link Taxon}.</li>
236 * <li>A {@link Taxon} may be referenced by the {@link DeterminationEvent}
237 * of the {@link SpecimenOrObservationBase}</li>
239 * Further more there also can be taxa which are associated with the taxon
240 * in question (parameter associatedTaxon) by {@link TaxonRelationship}s. If
241 * the parameter <code>includeRelationships</code> is containing elements,
242 * these according {@TaxonRelationshipType}s and
243 * directional information will be used to collect further
244 * {@link SpecimenOrObservationBase} instances found this way.
248 * @param associatedTaxon
249 * @param Set<TaxonRelationshipVector> includeRelationships. TaxonRelationships will not be taken into account if this is <code>NULL</code>.
250 * @param maxDepth TODO
254 * @param propertyPaths
257 public <T
extends SpecimenOrObservationBase
> List
<T
> listByAssociatedTaxon(Class
<T
> type
, Set
<TaxonRelationshipEdge
> includeRelationships
,
258 Taxon associatedTaxon
, Integer maxDepth
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
261 * Lists all instances of {@link FieldUnit} which are
262 * associated <b>directly or indirectly</b>with the <code>taxon</code> specified
263 * as parameter. "Indirectly" means that a sub derivate of the FieldUnit is
264 * directly associated with the given taxon.
265 * SpecimenOrObservationBase instances can be associated to taxa in multiple
266 * ways, all these possible relations are taken into account:
268 * <li>The {@link IndividualsAssociation} elements in a
269 * {@link TaxonDescription} contain {@link DerivedUnit}s</li>
270 * <li>{@link SpecimenTypeDesignation}s may be associated with any
271 * {@link HomotypicalGroup} related to the specific {@link Taxon}.</li>
272 * <li>A {@link Taxon} may be referenced by the {@link DeterminationEvent}
273 * of the {@link SpecimenOrObservationBase}</li>
275 * Further more there also can be taxa which are associated with the taxon
276 * in question (parameter associatedTaxon) by {@link TaxonRelationship}s. If
277 * the parameter <code>includeRelationships</code> is containing elements,
278 * these according {@TaxonRelationshipType}s and
279 * directional information will be used to collect further
280 * {@link SpecimenOrObservationBase} instances found this way.
284 * @param associatedTaxon
285 * @param Set<TaxonRelationshipVector> includeRelationships. TaxonRelationships will not be taken into account if this is <code>NULL</code>.
286 * @param maxDepth TODO
290 * @param propertyPaths
293 public Collection
<SpecimenOrObservationBase
> listFieldUnitsByAssociatedTaxon(Taxon associatedTaxon
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
296 * See {@link #listFieldUnitsByAssociatedTaxon(Set, Taxon, Integer, Integer, Integer, List, List)}
298 public Pager
<SpecimenOrObservationBase
> pageFieldUnitsByAssociatedTaxon(Set
<TaxonRelationshipEdge
> includeRelationships
,
299 Taxon associatedTaxon
, Integer maxDepth
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
302 * See {@link #listByAssociatedTaxon(Class, Set, Taxon, Integer, Integer, Integer, List, List)}
305 * @param includeRelationships
306 * @param associatedTaxon
311 * @param propertyPaths
314 public <T
extends SpecimenOrObservationBase
> Pager
<T
> pageByAssociatedTaxon(Class
<T
> type
, Set
<TaxonRelationshipEdge
> includeRelationships
,
315 Taxon associatedTaxon
, Integer maxDepth
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
318 * Retrieves all {@link FieldUnit}s for the {@link SpecimenOrObservationBase} with the given {@link UUID}.<br>
319 * @param specimenUuid the UUID of the specimen
320 * @return either a collection of FieldUnits this specimen was derived from, the FieldUnit itself
321 * if this was a FieldUnit or an empty collection if no FieldUnits were found
323 public Collection
<FieldUnit
> getFieldUnits(UUID specimenUuid
);
329 * @param highlightFragments
333 * @param propertyPaths
335 * @throws CorruptIndexException
336 * @throws IOException
337 * @throws ParseException
339 Pager
<SearchResult
<SpecimenOrObservationBase
>> findByFullText(Class
<?
extends SpecimenOrObservationBase
> clazz
,
340 String queryString
, Rectangle boundingBox
, List
<Language
> languages
, boolean highlightFragments
, Integer pageSize
,
341 Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
) throws CorruptIndexException
,
342 IOException
, ParseException
;
344 * See {@link #listByAssociatedTaxon(Class, Set, String, Integer, Integer, Integer, List, List)}
347 * @param includeRelationships
348 * @param associatedTaxon
353 * @param propertyPaths
356 public <T
extends SpecimenOrObservationBase
> Pager
<T
> pageByAssociatedTaxon(Class
<T
> type
, Set
<TaxonRelationshipEdge
> includeRelationships
,
357 String taxonUUID
, Integer maxDepth
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
360 * Moves the given {@link Sequence} from one {@link DnaSample} to another
361 * @param from the DnaSample from which the sequence will be removed
362 * @param to the DnaSample which to which the sequence will be added
363 * @param sequence the Sequence to move
364 * @return <code>true</code> if successfully moved, <code>false</code> otherwise
366 public UpdateResult
moveSequence(DnaSample from
, DnaSample to
, Sequence sequence
);
372 * @param sequenceUuid
375 public UpdateResult
moveSequence(UUID fromUuid
, UUID toUuid
, UUID sequenceUuid
);
378 * Moves the given {@link DerivedUnit} from one {@link SpecimenOrObservationBase} to another.
379 * @param from the SpecimenOrObservationBase from which the DerivedUnit will be removed
380 * @param to the SpecimenOrObservationBase to which the DerivedUnit will be added
381 * @param derivate the DerivedUnit to move
382 * @return <code>true</code> if successfully moved, <code>false</code> otherwise
384 public UpdateResult
moveDerivate(UUID specimenFromUuid
, UUID specimenToUuid
, UUID derivateUuid
);
392 public boolean moveDerivate(SpecimenOrObservationBase
<?
> from
, SpecimenOrObservationBase
<?
> to
, DerivedUnit derivate
);
395 * Assembles a {@link FieldUnitDTO} for the given field unit uuid which is associated to the {@link Taxon}.<br>
397 * For the meaning of "associated" see also {@link #listFieldUnitsByAssociatedTaxon(Set, Taxon, Integer, Integer, Integer, List, List)}
399 * @param associatedTaxonUuid
400 * @return a DTO with all the assembled information
402 public FieldUnitDTO
assembleFieldUnitDTO(FieldUnit fieldUnit
, UUID associatedTaxonUuid
);
405 * Assembles a {@link PreservedSpecimenDTO} for the given derived unit.
407 * @return a DTO with all the assembled information
409 public PreservedSpecimenDTO
assemblePreservedSpecimenDTO(DerivedUnit derivedUnit
);
412 * Returns a collection of {@link ICdmBase}s that are not persisted via cascading when saving the given specimen (mostly DefinedTerms).
413 * @param specimen the specimen that is checked for non-cascaded elements.
414 * @return collection of non-cascaded element associated with the specimen
416 public Collection
<ICdmBase
> getNonCascadedAssociatedElements(SpecimenOrObservationBase
<?
> specimen
);
419 * Deletes the specified specimen according to the setting in the {@link SpecimenDeleteConfigurator}.<br>
420 * @param specimen the specimen which shoul be deleted
421 * @param config specifies options if and how the specimen should be deleted like e.g. including all
423 * @return the {@link DeleteResult} which holds information about the outcome of this operation
425 public DeleteResult
delete(SpecimenOrObservationBase
<?
> specimen
, SpecimenDeleteConfigurator config
);
428 * Deletes the specified specimen belonging to the given {@link UUID}
429 * according to the setting in the {@link SpecimenDeleteConfigurator}.
432 * the specimen which shoul be deleted
434 * specifies options if and how the specimen should be deleted
435 * like e.g. including all of its children
436 * @return the {@link DeleteResult} which holds information about the
437 * outcome of this operation
439 public DeleteResult
delete(UUID specimenUuid
, SpecimenDeleteConfigurator config
);
442 * Retrieves all {@link IndividualsAssociation} with the given specimen.<br>
443 * @param specimen the specimen for which the associations are retrieved
447 * @param propertyPaths
448 * @return collection of all associations
450 public Collection
<IndividualsAssociation
> listIndividualsAssociations(SpecimenOrObservationBase
<?
> specimen
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
454 * Retrieves all taxa linked via {@link IndividualsAssociation} with the given specimen.<br>
455 * @param specimen the specimen which is linked to the taxa
459 * @param propertyPaths
460 * @return a collection of associated taxa
462 public Collection
<TaxonBase
<?
>> listIndividualsAssociationTaxa(SpecimenOrObservationBase
<?
> specimen
, Integer limit
,
463 Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
466 * Retrieves all associated taxa for the given specimen (via type designations, determination, individuals associations)
471 * @param propertyPaths
474 public Collection
<TaxonBase
<?
>> listAssociatedTaxa(SpecimenOrObservationBase
<?
> specimen
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
477 * Retrieves all taxa that the given specimen is determined as
482 * @param propertyPaths
483 * @return collection of all taxa the given specimen is determined as
485 public Collection
<TaxonBase
<?
>> listDeterminedTaxa(SpecimenOrObservationBase
<?
> specimen
, Integer limit
, Integer start
,
486 List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
489 * Retrieves all {@link DeterminationEvent}s which have the given specimen set as identified unit.
494 * @param propertyPaths
495 * @return collection of all determination events with the given specimen
497 public Collection
<DeterminationEvent
> listDeterminationEvents(SpecimenOrObservationBase
<?
> specimen
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
500 * Retrieves all taxa with a {@link SpecimenTypeDesignation} with the given specimen as a type specimen.
501 * @param specimen the type specimen
506 * @param propertyPaths
507 * @return a collection of all taxa where the given specimen is the type specimen
509 public Collection
<TaxonBase
<?
>> listTypeDesignationTaxa(DerivedUnit specimen
, Integer limit
,
510 Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
513 * Retrieves all {@link SpecimenTypeDesignation}s which have the given specimens as a type specimen.
514 * @param specimens the type specimens
518 * @param propertyPaths
519 * @return map of all designations with the given type specimens
521 public Map
<DerivedUnit
, Collection
<SpecimenTypeDesignation
>> listTypeDesignations(Collection
<DerivedUnit
> specimens
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
524 * Retrieves all {@link SpecimenTypeDesignation}s which have the given specimen as a type specimen.
525 * @param specimen the type specimen
529 * @param propertyPaths
530 * @return collection of all designations with the given type specimen
532 public Collection
<SpecimenTypeDesignation
> listTypeDesignations(DerivedUnit specimen
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
535 * Retrieves all {@link DescriptionBase}s that have the given specimen set as described specimen.
536 * @param specimen the described specimen
540 * @param propertyPaths
541 * @return collection of all descriptions with the given described specimen
543 public Collection
<DescriptionBase
<?
>> listDescriptionsWithDescriptionSpecimen(SpecimenOrObservationBase
<?
> specimen
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
546 * Gets all description elements that are used for describing the character
547 * states of the given specimen
550 * the specimen for which the character state description
551 * elements should be retrieved
552 * @return a collection of all character state description elements for this
555 public Collection
<DescriptionElementBase
> getCharacterDataForSpecimen(SpecimenOrObservationBase
<?
> specimen
);
558 * Gets all description elements that are used for describing the character
559 * states of the given specimen
561 * @param specimenUuid
562 * the specimen {@link UUID} for which the character state description
563 * elements should be retrieved
564 * @return a collection of all character state description elements for this
567 public Collection
<DescriptionElementBase
> getCharacterDataForSpecimen(UUID specimenUuid
);
570 * Returns the most significant identifier for the given {@link DerivedUnit}.
571 * @param derivedUnit the derived unit to check
572 * @return the identifier string
574 public String
getMostSignificantIdentifier(DerivedUnit derivedUnit
);
577 * Returns the number of specimens that match the given parameters
578 * @param clazz the class to match
579 * @param queryString the queryString to match
580 * @param type the {@link SpecimenOrObservationType} to match
581 * @param associatedTaxon the taxon these specimens are in any way associated to via
582 * determination, type designations, individuals associations, etc.
583 * @param matchmode determines how the query string should be matched
585 * the maximum number of entities returned (can be null to return
589 * Supports path like <code>orderHints.propertyNames</code> which
590 * include *-to-one properties like createdBy.username or
591 * authorTeam.persistentTitleCache
592 * @return the number of found specimens
594 public int countOccurrences(IIdentifiableEntityServiceConfigurator
<SpecimenOrObservationBase
> config
);
597 * Return the all {@link SpecimenOrObservationBase}s of the complete
598 * derivative hierarchy i.e. all parent and child derivatives and the given
602 * a specimen or observation
603 * @return the derivative hierarchy as an unordered list of all specimens or observation
605 public List
<SpecimenOrObservationBase
<?
>> getAllHierarchyDerivatives(SpecimenOrObservationBase
<?
> specimen
);
608 * Returns all child derivatives of the given specimen.
609 * @param specimen a specimen or observation
610 * @return an unordered list of all child derivatives
612 public List
<DerivedUnit
> getAllChildDerivatives(SpecimenOrObservationBase
<?
> specimen
);
615 * Returns all child derivatives of the given specimen.
616 * @param specimen the UUID of a specimen or observation
617 * @return an unordered list of all child derivatives
619 public List
<DerivedUnit
> getAllChildDerivatives(UUID specimenUuid
);