2 * Copyright (C) 2008 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
7 package eu
.etaxonomy
.cdm
.api
.service
;
11 import java
.util
.UUID
;
13 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
14 import eu
.etaxonomy
.cdm
.model
.location
.WaterbodyOrCountry
;
15 import eu
.etaxonomy
.cdm
.model
.media
.Media
;
16 import eu
.etaxonomy
.cdm
.model
.occurrence
.Collection
;
17 import eu
.etaxonomy
.cdm
.model
.occurrence
.DerivationEvent
;
18 import eu
.etaxonomy
.cdm
.model
.occurrence
.DeterminationEvent
;
19 import eu
.etaxonomy
.cdm
.model
.occurrence
.SpecimenOrObservationBase
;
22 * @author a.babadshanjan
25 public interface IOccurrenceService
extends IIdentifiableEntityService
<SpecimenOrObservationBase
> {
28 * FIXME candidate for harmonization?
29 * Computes all specimen or observation bases.
34 public abstract List
<SpecimenOrObservationBase
> getAllSpecimenOrObservationBases(int limit
, int start
);
37 * FIXME candidate for harmonization?
38 * Saves a collection of specimen or observation bases.
39 * @return Map with UUID as key and SpecimenOrObservationBase as value.
41 public abstract Map
<UUID
, ?
extends SpecimenOrObservationBase
>
42 saveSpecimenOrObservationBaseAll(java
.util
.Collection
<?
extends SpecimenOrObservationBase
> specimenOrObservationBaseCollection
);
45 * FIXME candidate for harmonizaion?
46 * save a specimen or observation and return its UUID
48 public abstract UUID
saveSpecimenOrObservationBase (SpecimenOrObservationBase specimenOrObservationBase
);
50 public WaterbodyOrCountry
getCountryByIso(String iso639
);
52 public List
<WaterbodyOrCountry
> getWaterbodyOrCountryByName(String name
);
55 public abstract List
<Collection
> searchCollectionByCode(String code
);
58 * Returns a List of Media that are associated with a given occurence
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
65 public Pager
<Media
> getMedia(SpecimenOrObservationBase occurence
, Integer pageSize
, Integer pageNumber
);
68 * Returns a List of determinations that have been made for a given occurence
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
75 public Pager
<DeterminationEvent
> getDeterminations(SpecimenOrObservationBase occurence
, Integer pageSize
, Integer pageNumber
);
78 * Returns a list of derivation events that have involved creating new DerivedUnits from this occurence
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
85 public Pager
<DerivationEvent
> getDerivationEvents(SpecimenOrObservationBase occurence
, Integer pageSize
, Integer pageNumber
);