Project

General

Profile

Download (3.93 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2008 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
*/
7

    
8
package eu.etaxonomy.cdm.api.service;
9

    
10
import java.util.List;
11

    
12
import eu.etaxonomy.cdm.api.service.pager.Pager;
13
import eu.etaxonomy.cdm.model.location.WaterbodyOrCountry;
14
import eu.etaxonomy.cdm.model.media.Media;
15
import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
16
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
17
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
18
import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;
19
import eu.etaxonomy.cdm.persistence.query.OrderHint;
20

    
21
/**
22
 * @author a.babadshanjan
23
 * @created 01.09.2008
24
 */
25
public interface IOccurrenceService extends IIdentifiableEntityService<SpecimenOrObservationBase> {
26
	
27
	public WaterbodyOrCountry getCountryByIso(String iso639);
28
	
29
	public List<WaterbodyOrCountry> getWaterbodyOrCountryByName(String name);
30
	
31
	/**
32
     * Returns a List of Media that are associated with a given occurence
33
     * 
34
	 * @param occurence the occurence associated with these media
35
	 * @param pageSize The maximum number of media returned (can be null for all related media)
36
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
37
	 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
38
     * @return a Pager of media instances
39
     */
40
	public Pager<Media> getMedia(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
41
	
42
	/**
43
     * Returns a List of determinations that have been made for a given occurence
44
     * 
45
	 * @param occurence the occurence associated with these determinations
46
	 * @param pageSize The maximum number of determinations returned (can be null for all related determinations)
47
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
48
     * @return a Pager of determination instances
49
     */
50
	public Pager<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
51
	
52
	/**
53
     * Returns a list of derivation events that have involved creating new DerivedUnits from this occurence
54
     * 
55
	 * @param occurence the occurence that was a source of these derivation events
56
	 * @param pageSize The maximum number of derivation events returned (can be null for all related derivation events)
57
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
58
     * @return a Pager of derivation events
59
     */
60
	public Pager<DerivationEvent> getDerivationEvents(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
61
	
62
	/**
63
	 * Returns a Paged List of SpecimenOrObservationBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
64
	 * 
65
	 * @param clazz filter the results by class (or pass null to return all SpecimenOrObservationBase instances)
66
	 * @param queryString
67
	 * @param pageSize The maximum number of occurrences returned (can be null for all matching occurrences)
68
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
69
	 * @param orderHints
70
	 *            Supports path like <code>orderHints.propertyNames</code> which
71
	 *            include *-to-one properties like createdBy.username or
72
	 *            authorTeam.persistentTitleCache
73
	 * @param propertyPaths properties to be initialized
74
	 * @return a Pager SpecimenOrObservationBase instances
75
	 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
76
	 */
77
	public Pager<SpecimenOrObservationBase> search(Class<? extends SpecimenOrObservationBase> clazz, String query, Integer pageSize,Integer pageNumber, List<OrderHint> orderHints,List<String> propertyPaths);
78
}
(24-24/48)