1 package eu
.etaxonomy
.cdm
.api
.service
;
3 import java
.util
.Collection
;
9 import eu
.etaxonomy
.cdm
.api
.service
.dto
.RowWrapperDTO
;
10 import eu
.etaxonomy
.cdm
.common
.monitor
.IProgressMonitor
;
11 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionBase
;
12 import eu
.etaxonomy
.cdm
.model
.description
.DescriptionElementBase
;
13 import eu
.etaxonomy
.cdm
.model
.description
.DescriptiveDataSet
;
14 import eu
.etaxonomy
.cdm
.model
.description
.DescriptiveSystemRole
;
15 import eu
.etaxonomy
.cdm
.model
.description
.Feature
;
16 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
17 import eu
.etaxonomy
.cdm
.persistence
.dto
.SpecimenNodeWrapper
;
18 import eu
.etaxonomy
.cdm
.persistence
.dto
.UuidAndTitleCache
;
21 public interface IDescriptiveDataSetService
extends IIdentifiableEntityService
<DescriptiveDataSet
> {
23 * Returns a Map of descriptions each with the description elements that match
24 * the supplied features (or all description elements if no features are supplied)
26 * @param descriptiveDataSet the data set which the descriptions belong to
27 * @param features restrict the returned description elements to those which have features in this set
28 * @param pageSize The maximum number of descriptions returned (can be null for all descriptions that belong to the data set)
29 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based,
30 * can be null, equivalent of starting at the beginning of the recordset). Descriptions are sorted by titleCache
31 * @param propertyPaths properties to be initialized (applied to the descriptionElements)
34 public Map
<DescriptionBase
, Set
<DescriptionElementBase
>> getDescriptionElements(DescriptiveDataSet descriptiveDataSet
, Set
<Feature
> features
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
36 public <T
extends DescriptionElementBase
> Map
<UuidAndTitleCache
, Map
<UUID
, Set
<T
>>> getTaxonFeatureDescriptionElementMap(Class
<T
> clazz
, UUID descriptiveDataSetUuid
, DescriptiveSystemRole role
);
39 * Returns a list of {@link UuidAndTitleCache} elements for all {@link DescriptiveDataSet}s in the data base
40 * @param limitOfInitialElements
42 * @return a list of UuidAndTitleCache element
44 public List
<UuidAndTitleCache
<DescriptiveDataSet
>> getDescriptiveDataSetUuidAndTitleCache(Integer limitOfInitialElements
, String pattern
);
47 * Returns a collection of {@link RowWrapperDTO} objects for the given {@link DescriptiveDataSet}.<br>
48 * A RowWrapper represents on row in the character matrix.
49 * @param descriptiveDataSet the working set for which the row wrapper objects should be fetched
50 * @param the progress monitor
51 * @return a list of row wrapper objects
53 public Collection
<RowWrapperDTO
> getRowWrapper(DescriptiveDataSet descriptiveDataSet
, IProgressMonitor monitor
);
56 * Monitored invocation of {@link IDescriptiveDataSetService#getRowWrapper(DescriptiveDataSet, IProgressMonitor)}
57 * @param descriptiveDataSet the working set for which getRowWrapper() is invoked
58 * @return the uuid of the monitor
60 public UUID
monitGetRowWrapper(DescriptiveDataSet descriptiveDataSet
);
63 * Loads all avaliable specimens wrapped in a {@link SpecimenNodeWrapper} object for
64 * a given {@link DescriptiveDataSet} according to the filters set in the working set
65 * @param descriptiveDataSet the working set for which the specimens should be fetched
66 * @return a collection of wrapper objects
68 public Collection
<SpecimenNodeWrapper
> loadSpecimens(DescriptiveDataSet descriptiveDataSet
);
71 * Creates a row wrapper object for the given specimen
72 * @param specimen the specimen for which the wrapper should be created
73 * @param descriptiveDataSet the data set it should be used in
74 * @return the created row wrapper
76 public RowWrapperDTO
createRowWrapper(SpecimenOrObservationBase specimen
, DescriptiveDataSet descriptiveDataSet
);
79 * Creates a row wrapper object for the given description
80 * @param description the description for which the wrapper should be created
81 * @param descriptiveDataSet the data set it should be used in
82 * @return the created row wrapper
84 public RowWrapperDTO
createRowWrapper(DescriptionBase description
, DescriptiveDataSet descriptiveDataSet
);