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
.description
.SpecimenDescription
;
17 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
18 import eu
.etaxonomy
.cdm
.persistence
.dto
.SpecimenNodeWrapper
;
19 import eu
.etaxonomy
.cdm
.persistence
.dto
.UuidAndTitleCache
;
22 public interface IDescriptiveDataSetService
extends IIdentifiableEntityService
<DescriptiveDataSet
> {
24 * Returns a Map of descriptions each with the description elements that match
25 * the supplied features (or all description elements if no features are supplied)
27 * @param descriptiveDataSet the data set which the descriptions belong to
28 * @param features restrict the returned description elements to those which have features in this set
29 * @param pageSize The maximum number of descriptions returned (can be null for all descriptions that belong to the data set)
30 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based,
31 * can be null, equivalent of starting at the beginning of the recordset). Descriptions are sorted by titleCache
32 * @param propertyPaths properties to be initialized (applied to the descriptionElements)
35 public Map
<DescriptionBase
, Set
<DescriptionElementBase
>> getDescriptionElements(DescriptiveDataSet descriptiveDataSet
, Set
<Feature
> features
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
37 public <T
extends DescriptionElementBase
> Map
<UuidAndTitleCache
, Map
<UUID
, Set
<T
>>> getTaxonFeatureDescriptionElementMap(Class
<T
> clazz
, UUID descriptiveDataSetUuid
, DescriptiveSystemRole role
);
40 * Returns a list of {@link UuidAndTitleCache} elements for all {@link DescriptiveDataSet}s in the data base
41 * @param limitOfInitialElements
43 * @return a list of UuidAndTitleCache element
45 public List
<UuidAndTitleCache
<DescriptiveDataSet
>> getDescriptiveDataSetUuidAndTitleCache(Integer limitOfInitialElements
, String pattern
);
48 * Returns a collection of {@link RowWrapperDTO} objects for the given {@link DescriptiveDataSet}.<br>
49 * A RowWrapper represents on row in the character matrix.
50 * @param descriptiveDataSet the working set for which the row wrapper objects should be fetched
51 * @param the progress monitor
52 * @return a list of row wrapper objects
54 public Collection
<RowWrapperDTO
> getRowWrapper(DescriptiveDataSet descriptiveDataSet
, IProgressMonitor monitor
);
57 * Monitored invocation of {@link IDescriptiveDataSetService#getRowWrapper(DescriptiveDataSet, IProgressMonitor)}
58 * @param descriptiveDataSet the working set for which getRowWrapper() is invoked
59 * @return the uuid of the monitor
61 public UUID
monitGetRowWrapper(DescriptiveDataSet descriptiveDataSet
);
64 * Loads all avaliable specimens wrapped in a {@link SpecimenNodeWrapper} object for
65 * a given {@link DescriptiveDataSet} according to the filters set in the working set
66 * @param descriptiveDataSet the working set for which the specimens should be fetched
67 * @return a collection of wrapper objects
69 public Collection
<SpecimenNodeWrapper
> loadSpecimens(DescriptiveDataSet descriptiveDataSet
);
72 * Creates a row wrapper object for the given specimen
73 * @param specimen the specimen for which the wrapper should be created
74 * @param descriptiveDataSet the data set it should be used in
75 * @return the created row wrapper
77 public RowWrapperDTO
createRowWrapper(SpecimenOrObservationBase specimen
, DescriptiveDataSet descriptiveDataSet
);
80 * Creates a row wrapper object for the given description
81 * @param description the description for which the wrapper should be created
82 * @param descriptiveDataSet the data set it should be used in
83 * @return the created row wrapper
85 public RowWrapperDTO
createRowWrapper(DescriptionBase description
, DescriptiveDataSet descriptiveDataSet
);
88 * Returns a {@link SpecimenDescription} for a given specimen with corresponding
89 * features according to the {@link DescriptiveDataSet}.
90 * @param descriptiveDataSetUuid
94 public SpecimenDescription
findDescriptionForDescriptiveDataSet(UUID descriptiveDataSetUuid
, UUID specimenUuid
);