Project

General

Profile

Download (3.89 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.cdm.api.service;
2

    
3
import java.util.Collection;
4
import java.util.List;
5
import java.util.Map;
6
import java.util.Set;
7
import java.util.UUID;
8

    
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.DescriptiveSystemRole;
14
import eu.etaxonomy.cdm.model.description.Feature;
15
import eu.etaxonomy.cdm.model.description.WorkingSet;
16
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
17
import eu.etaxonomy.cdm.persistence.dto.SpecimenNodeWrapper;
18
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
19

    
20

    
21
public interface IWorkingSetService extends IAnnotatableService<WorkingSet> {
22
	/**
23
	 * Returns a Map of descriptions each with the descriptionelements that match the supplied features (or all description elements if no features are supplied)
24
	 *
25
	 * @param workingSet the working set which the descriptions belong to
26
	 * @param features restrict the returned description elements to those which have features in this set
27
	 * @param pageSize The maximum number of descriptions returned (can be null for all descriptions that belong to the working set)
28
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based,
29
	 *                   can be null, equivalent of starting at the beginning of the recordset). Descriptions are sorted by titleCache
30
	 * @param propertyPaths properties to be initialized (applied to the descriptionElements)
31
	 * @return
32
	 */
33
	public Map<DescriptionBase, Set<DescriptionElementBase>> getDescriptionElements(WorkingSet workingSet, Set<Feature> features, Integer pageSize,	Integer pageNumber,	List<String> propertyPaths);
34

    
35
	public <T extends DescriptionElementBase> Map<UuidAndTitleCache, Map<UUID, Set<T>>> getTaxonFeatureDescriptionElementMap(Class<T> clazz, UUID workingSetUuid, DescriptiveSystemRole role);
36

    
37
    /**
38
     * @param limitOfInitialElements
39
     * @param pattern
40
     * @return
41
     */
42
    public List<UuidAndTitleCache<WorkingSet>> getWorkingSetUuidAndTitleCache(Integer limitOfInitialElements, String pattern);
43

    
44
    /**
45
     * Returns a collection of {@link RowWrapperDTO} objects for the given {@link WorkingSet}.<br>
46
     * A RowWrapper represents on row in the character matrix.
47
     * @param workingSet the working set for which the row wrapper objects should be fetched
48
     * @param the progress monitor
49
     * @return a list of row wrapper objects
50
     */
51
    public Collection<RowWrapperDTO> getRowWrapper(WorkingSet workingSet, IProgressMonitor monitor);
52

    
53
    /**
54
     * Monitored invocation of {@link IWorkingSetService#getRowWrapper(WorkingSet, IProgressMonitor)}
55
     * @param workingSet the working set for which getRowWrapper() is invoked
56
     * @return the uuid of the monitor
57
     */
58
    public UUID monitGetRowWrapper(WorkingSet workingSet);
59

    
60
    /**
61
     * Loads all avaliable specimens wrapped in a {@link SpecimenNodeWrapper} object for
62
     * a given {@link WorkingSet} according to the filters set in the working set
63
     * @param workingSet the working set for which the specimens should be fetched
64
     * @return a collection of wrapper objects
65
     */
66
    public Collection<SpecimenNodeWrapper> loadSpecimens(WorkingSet workingSet);
67

    
68
    /**
69
     * Creates a row wrapper object for the given specimen
70
     * @param specimen
71
     * @param workingSet
72
     * @return
73
     */
74
    public RowWrapperDTO createRowWrapper(SpecimenOrObservationBase specimen, WorkingSet workingSet);
75

    
76
    /**
77
     * Creates a row wrapper object for the given description
78
     * @param specimen
79
     * @param description
80
     * @param workingSet
81
     * @return
82
     */
83
    public RowWrapperDTO createRowWrapper(DescriptionBase description, WorkingSet workingSet);
84

    
85
}
(68-68/105)