1 |
33e9f6a3
|
a.babadshanjan
|
/**
|
2 |
|
|
* Copyright (C) 2008 EDIT
|
3 |
|
|
* European Distributed Institute of Taxonomy
|
4 |
|
|
* http://www.e-taxonomy.eu
|
5 |
|
|
*/
|
6 |
|
|
|
7 |
|
|
package eu.etaxonomy.cdm.api.service;
|
8 |
|
|
|
9 |
|
|
import java.util.List;
|
10 |
|
|
import java.util.Map;
|
11 |
|
|
import java.util.UUID;
|
12 |
|
|
|
13 |
d57c0df0
|
ben.clark
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
14 |
fe8ce936
|
p.kelbert
|
import eu.etaxonomy.cdm.model.location.WaterbodyOrCountry;
|
15 |
d57c0df0
|
ben.clark
|
import eu.etaxonomy.cdm.model.media.Media;
|
16 |
fe8ce936
|
p.kelbert
|
import eu.etaxonomy.cdm.model.occurrence.Collection;
|
17 |
d57c0df0
|
ben.clark
|
import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
|
18 |
|
|
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
|
19 |
33e9f6a3
|
a.babadshanjan
|
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
|
20 |
|
|
|
21 |
|
|
/**
|
22 |
|
|
* @author a.babadshanjan
|
23 |
|
|
* @created 01.09.2008
|
24 |
|
|
*/
|
25 |
|
|
public interface IOccurrenceService extends IIdentifiableEntityService<SpecimenOrObservationBase> {
|
26 |
|
|
|
27 |
|
|
/**
|
28 |
d57c0df0
|
ben.clark
|
* FIXME candidate for harmonization?
|
29 |
33e9f6a3
|
a.babadshanjan
|
* Computes all specimen or observation bases.
|
30 |
|
|
* @param limit
|
31 |
|
|
* @param start
|
32 |
|
|
* @return
|
33 |
|
|
*/
|
34 |
|
|
public abstract List<SpecimenOrObservationBase> getAllSpecimenOrObservationBases(int limit, int start);
|
35 |
|
|
|
36 |
d57c0df0
|
ben.clark
|
/**
|
37 |
|
|
* FIXME candidate for harmonization?
|
38 |
|
|
* Saves a collection of specimen or observation bases.
|
39 |
33e9f6a3
|
a.babadshanjan
|
* @return Map with UUID as key and SpecimenOrObservationBase as value.
|
40 |
d57c0df0
|
ben.clark
|
*/
|
41 |
4b52424d
|
Andreas Müller
|
public abstract Map<UUID, ? extends SpecimenOrObservationBase>
|
42 |
|
|
saveSpecimenOrObservationBaseAll(java.util.Collection<? extends SpecimenOrObservationBase> specimenOrObservationBaseCollection);
|
43 |
33e9f6a3
|
a.babadshanjan
|
|
44 |
d57c0df0
|
ben.clark
|
/**
|
45 |
|
|
* FIXME candidate for harmonizaion?
|
46 |
|
|
* save a specimen or observation and return its UUID
|
47 |
|
|
*/
|
48 |
fcfc6582
|
p.kelbert
|
public abstract UUID saveSpecimenOrObservationBase (SpecimenOrObservationBase specimenOrObservationBase);
|
49 |
|
|
|
50 |
fe8ce936
|
p.kelbert
|
public WaterbodyOrCountry getCountryByIso(String iso639);
|
51 |
5bb4a4ce
|
p.kelbert
|
|
52 |
fe8ce936
|
p.kelbert
|
public List<WaterbodyOrCountry> getWaterbodyOrCountryByName(String name);
|
53 |
|
|
|
54 |
|
|
/** */
|
55 |
|
|
public abstract List<Collection> searchCollectionByCode(String code);
|
56 |
d57c0df0
|
ben.clark
|
|
57 |
|
|
/**
|
58 |
|
|
* Returns a List of Media that are associated with a given occurence
|
59 |
|
|
*
|
60 |
|
|
* @param occurence the occurence associated with these media
|
61 |
|
|
* @param pageSize The maximum number of media returned (can be null for all related media)
|
62 |
|
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
63 |
|
|
* @return a Pager of media instances
|
64 |
|
|
*/
|
65 |
|
|
public Pager<Media> getMedia(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber);
|
66 |
|
|
|
67 |
|
|
/**
|
68 |
|
|
* Returns a List of determinations that have been made for a given occurence
|
69 |
|
|
*
|
70 |
|
|
* @param occurence the occurence associated with these determinations
|
71 |
|
|
* @param pageSize The maximum number of determinations returned (can be null for all related determinations)
|
72 |
|
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
73 |
|
|
* @return a Pager of determination instances
|
74 |
|
|
*/
|
75 |
|
|
public Pager<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber);
|
76 |
|
|
|
77 |
|
|
/**
|
78 |
|
|
* Returns a list of derivation events that have involved creating new DerivedUnits from this occurence
|
79 |
|
|
*
|
80 |
|
|
* @param occurence the occurence that was a source of these derivation events
|
81 |
|
|
* @param pageSize The maximum number of derivation events returned (can be null for all related derivation events)
|
82 |
|
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
83 |
|
|
* @return a Pager of derivation events
|
84 |
|
|
*/
|
85 |
|
|
public Pager<DerivationEvent> getDerivationEvents(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber);
|
86 |
33e9f6a3
|
a.babadshanjan
|
}
|