1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.api.service;
|
11
|
|
12
|
import java.util.List;
|
13
|
|
14
|
import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
|
15
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
16
|
import eu.etaxonomy.cdm.model.common.DefinedTerm;
|
17
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
18
|
import eu.etaxonomy.cdm.model.reference.ReferenceType;
|
19
|
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
|
20
|
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
|
21
|
import eu.etaxonomy.cdm.persistence.query.MatchMode;
|
22
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
23
|
|
24
|
|
25
|
public interface IReferenceService extends IIdentifiableEntityService<Reference> {
|
26
|
|
27
|
/**
|
28
|
* Returns a Paged List of Reference instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
|
29
|
*
|
30
|
* @param clazz filter the results by class (or pass null to return all Reference instances)
|
31
|
* @param queryString
|
32
|
* @param pageSize The maximum number of references returned (can be null for all matching references)
|
33
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
34
|
* @param orderHints
|
35
|
* Supports path like <code>orderHints.propertyNames</code> which
|
36
|
* include *-to-one properties like createdBy.username or
|
37
|
* authorTeam.persistentTitleCache
|
38
|
* @param propertyPaths properties to be initialized
|
39
|
* @return a Pager Reference instances
|
40
|
* @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
|
41
|
*/
|
42
|
@Override
|
43
|
public Pager<Reference> search(Class<? extends Reference> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
44
|
|
45
|
/**
|
46
|
* Returns a map that holds uuid, titleCache pairs of all references in the current database
|
47
|
*
|
48
|
* @return
|
49
|
* a <code>Map</code> containing uuid and titleCache of references
|
50
|
*/
|
51
|
public List<UuidAndTitleCache<Reference>> getUuidAndTitle();
|
52
|
|
53
|
/**
|
54
|
* TODO candidate for harmonization: rename to listForPublishing
|
55
|
* @return
|
56
|
*/
|
57
|
public List<Reference> getAllReferencesForPublishing();
|
58
|
|
59
|
/**
|
60
|
* TODO candidate for harmonization: rename to listNomenclaturalReferences
|
61
|
* @return
|
62
|
*/
|
63
|
public List<Reference> getAllNomenclaturalReferences();
|
64
|
|
65
|
/**
|
66
|
* returns
|
67
|
*
|
68
|
* <ol>
|
69
|
* <li>all taxa directly covered by this reference</li>
|
70
|
* <li>all taxa covered by the according in references of this reference</li>
|
71
|
* </ol>
|
72
|
*
|
73
|
* searches for taxa using the following relations:
|
74
|
* <ul>
|
75
|
* <li>taxon.name.nomenclaturalreference</li>
|
76
|
* <li>taxon.descriptions.descriptionElement.sources.citation</li>
|
77
|
* <li>taxon.descriptions.descriptionSources</li>
|
78
|
* <li>taxon.name.descriptions.descriptionElement.sources</li>
|
79
|
* <li>taxon.name.descriptions.descriptionSources</li>
|
80
|
* </ul>
|
81
|
*
|
82
|
* @param reference
|
83
|
* @param includeSubordinateReferences TODO
|
84
|
* @param propertyPaths
|
85
|
* @return
|
86
|
*/
|
87
|
public List<TaxonBase> listCoveredTaxa(Reference reference, boolean includeSubordinateReferences, List<String> propertyPaths);
|
88
|
|
89
|
|
90
|
public List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCache(Integer limit, String pattern);
|
91
|
|
92
|
/**
|
93
|
* @param limit
|
94
|
* @param pattern
|
95
|
* @param type
|
96
|
* @return
|
97
|
*/
|
98
|
public List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCache(Integer limit, String pattern, ReferenceType type);
|
99
|
/**
|
100
|
* @param limit
|
101
|
* @param pattern
|
102
|
* @param type
|
103
|
* @return
|
104
|
*/
|
105
|
public List<UuidAndTitleCache<Reference>> getUuidAndTitleCache(Integer limit, String pattern, ReferenceType type);
|
106
|
|
107
|
/**
|
108
|
* @param identifier
|
109
|
* @param identifierType
|
110
|
* @param matchmode
|
111
|
* @param limit
|
112
|
* @return
|
113
|
*/
|
114
|
public List<IdentifiedEntityDTO<Reference>> listByIdentifierAbbrev(String identifier, DefinedTerm identifierType,
|
115
|
MatchMode matchmode, Integer limit);
|
116
|
|
117
|
/**
|
118
|
* @param limit
|
119
|
* @param pattern
|
120
|
* @param type
|
121
|
* @return
|
122
|
*/
|
123
|
List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCacheForAuthor(Integer limit, String pattern,
|
124
|
ReferenceType type);
|
125
|
|
126
|
}
|