1 |
25663b56
|
Andreas Müller
|
/**
|
2 |
|
|
* Copyright (C) 2007 EDIT
|
3 |
d26d6619
|
Andreas M��ller
|
* European Distributed Institute of Taxonomy
|
4 |
25663b56
|
Andreas Müller
|
* http://www.e-taxonomy.eu
|
5 |
d26d6619
|
Andreas M��ller
|
*
|
6 |
25663b56
|
Andreas Müller
|
* 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 |
2d993c6e
|
Andreas Müller
|
package eu.etaxonomy.cdm.api.service;
|
11 |
|
|
|
12 |
685d3720
|
Andreas Müller
|
import java.util.List;
|
13 |
4a1dd92c
|
Katja Luther
|
import java.util.Set;
|
14 |
|
|
import java.util.UUID;
|
15 |
685d3720
|
Andreas Müller
|
|
16 |
bdde6137
|
Katja Luther
|
import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
|
17 |
c781c97b
|
Katja Luther
|
import eu.etaxonomy.cdm.api.service.dto.IdentifiedEntityDTO;
|
18 |
b3b25f0a
|
Andreas Kohlbecker
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
19 |
f270c866
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.name.TaxonName;
|
20 |
1d36aa54
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
21 |
3d654cd3
|
Katja Luther
|
import eu.etaxonomy.cdm.model.reference.ReferenceType;
|
22 |
55055695
|
Andreas Kohlbecker
|
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
|
23 |
1c39686b
|
Andreas Müller
|
import eu.etaxonomy.cdm.model.term.DefinedTerm;
|
24 |
d26d6619
|
Andreas M��ller
|
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
|
25 |
c781c97b
|
Katja Luther
|
import eu.etaxonomy.cdm.persistence.query.MatchMode;
|
26 |
7a1d87e3
|
a.babadshanjan
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
27 |
2d993c6e
|
Andreas Müller
|
|
28 |
|
|
|
29 |
1d36aa54
|
Andreas Müller
|
public interface IReferenceService extends IIdentifiableEntityService<Reference> {
|
30 |
d26d6619
|
Andreas M��ller
|
|
31 |
aba8d6ad
|
ben.clark
|
/**
|
32 |
1d36aa54
|
Andreas Müller
|
* Returns a Paged List of Reference instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
|
33 |
d26d6619
|
Andreas M��ller
|
*
|
34 |
1d36aa54
|
Andreas Müller
|
* @param clazz filter the results by class (or pass null to return all Reference instances)
|
35 |
aba8d6ad
|
ben.clark
|
* @param queryString
|
36 |
|
|
* @param pageSize The maximum number of references returned (can be null for all matching references)
|
37 |
|
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
38 |
|
|
* @param orderHints
|
39 |
|
|
* Supports path like <code>orderHints.propertyNames</code> which
|
40 |
|
|
* include *-to-one properties like createdBy.username or
|
41 |
|
|
* authorTeam.persistentTitleCache
|
42 |
|
|
* @param propertyPaths properties to be initialized
|
43 |
1d36aa54
|
Andreas Müller
|
* @return a Pager Reference instances
|
44 |
aba8d6ad
|
ben.clark
|
* @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
|
45 |
|
|
*/
|
46 |
d26d6619
|
Andreas M��ller
|
@Override
|
47 |
|
|
public Pager<Reference> search(Class<? extends Reference> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
48 |
|
|
|
49 |
adadf4fa
|
n.hoffmann
|
/**
|
50 |
|
|
* Returns a map that holds uuid, titleCache pairs of all references in the current database
|
51 |
d26d6619
|
Andreas M��ller
|
*
|
52 |
|
|
* @return
|
53 |
adadf4fa
|
n.hoffmann
|
* a <code>Map</code> containing uuid and titleCache of references
|
54 |
|
|
*/
|
55 |
1d36aa54
|
Andreas Müller
|
public List<UuidAndTitleCache<Reference>> getUuidAndTitle();
|
56 |
d26d6619
|
Andreas M��ller
|
|
57 |
55055695
|
Andreas Kohlbecker
|
/**
|
58 |
f270c866
|
Andreas Müller
|
* lists all references marked as "publish" and not used as nomenclatural references
|
59 |
55055695
|
Andreas Kohlbecker
|
*/
|
60 |
f270c866
|
Andreas Müller
|
public List<Reference> listReferencesForPublishing();
|
61 |
d26d6619
|
Andreas M��ller
|
|
62 |
55055695
|
Andreas Kohlbecker
|
/**
|
63 |
f270c866
|
Andreas Müller
|
* Lists all references used as nomenclatural references in at least 1 {@link TaxonName}
|
64 |
55055695
|
Andreas Kohlbecker
|
*/
|
65 |
f270c866
|
Andreas Müller
|
public List<Reference> listNomenclaturalReferences();
|
66 |
55055695
|
Andreas Kohlbecker
|
|
67 |
|
|
/**
|
68 |
|
|
* returns
|
69 |
d26d6619
|
Andreas M��ller
|
*
|
70 |
55055695
|
Andreas Kohlbecker
|
* <ol>
|
71 |
|
|
* <li>all taxa directly covered by this reference</li>
|
72 |
|
|
* <li>all taxa covered by the according in references of this reference</li>
|
73 |
|
|
* </ol>
|
74 |
d26d6619
|
Andreas M��ller
|
*
|
75 |
55055695
|
Andreas Kohlbecker
|
* searches for taxa using the following relations:
|
76 |
|
|
* <ul>
|
77 |
eae56a30
|
Andreas Müller
|
* <li>taxon.name.nomenclaturalSource.citation</li>
|
78 |
55055695
|
Andreas Kohlbecker
|
* <li>taxon.descriptions.descriptionElement.sources.citation</li>
|
79 |
|
|
* <li>taxon.descriptions.descriptionSources</li>
|
80 |
|
|
* <li>taxon.name.descriptions.descriptionElement.sources</li>
|
81 |
|
|
* <li>taxon.name.descriptions.descriptionSources</li>
|
82 |
|
|
* </ul>
|
83 |
d26d6619
|
Andreas M��ller
|
*
|
84 |
1d36aa54
|
Andreas Müller
|
* @param reference
|
85 |
55055695
|
Andreas Kohlbecker
|
* @param includeSubordinateReferences TODO
|
86 |
|
|
* @param propertyPaths
|
87 |
|
|
* @return
|
88 |
|
|
*/
|
89 |
1d36aa54
|
Andreas Müller
|
public List<TaxonBase> listCoveredTaxa(Reference reference, boolean includeSubordinateReferences, List<String> propertyPaths);
|
90 |
2efa2b50
|
Katja Luther
|
|
91 |
|
|
|
92 |
|
|
public List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCache(Integer limit, String pattern);
|
93 |
|
|
|
94 |
3d654cd3
|
Katja Luther
|
/**
|
95 |
|
|
* @param limit
|
96 |
|
|
* @param pattern
|
97 |
|
|
* @param type
|
98 |
|
|
* @return
|
99 |
|
|
*/
|
100 |
71bfbee0
|
Katja Luther
|
public List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCache(Integer limit, String pattern, ReferenceType type);
|
101 |
|
|
/**
|
102 |
|
|
* @param limit
|
103 |
|
|
* @param pattern
|
104 |
|
|
* @param type
|
105 |
|
|
* @return
|
106 |
|
|
*/
|
107 |
|
|
public List<UuidAndTitleCache<Reference>> getUuidAndTitleCache(Integer limit, String pattern, ReferenceType type);
|
108 |
2efa2b50
|
Katja Luther
|
|
109 |
c781c97b
|
Katja Luther
|
/**
|
110 |
|
|
* @param identifier
|
111 |
|
|
* @param identifierType
|
112 |
|
|
* @param matchmode
|
113 |
|
|
* @param limit
|
114 |
|
|
* @return
|
115 |
|
|
*/
|
116 |
|
|
public List<IdentifiedEntityDTO<Reference>> listByIdentifierAbbrev(String identifier, DefinedTerm identifierType,
|
117 |
|
|
MatchMode matchmode, Integer limit);
|
118 |
|
|
|
119 |
7a47f7c8
|
Katja Luther
|
/**
|
120 |
|
|
* @param limit
|
121 |
|
|
* @param pattern
|
122 |
|
|
* @param type
|
123 |
|
|
* @return
|
124 |
|
|
*/
|
125 |
|
|
List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCacheForAuthor(Integer limit, String pattern,
|
126 |
|
|
ReferenceType type);
|
127 |
|
|
|
128 |
4a1dd92c
|
Katja Luther
|
/**
|
129 |
|
|
* @param uuids
|
130 |
|
|
*
|
131 |
|
|
* @return
|
132 |
|
|
*/
|
133 |
|
|
List<UuidAndTitleCache<Reference>> getUuidAndTitleCacheForUUIDS(Set<UUID> uuids);
|
134 |
|
|
|
135 |
c459863f
|
Katja Luther
|
/**
|
136 |
|
|
* @param identifier
|
137 |
|
|
* @param identifierType
|
138 |
|
|
* @param matchmode
|
139 |
|
|
* @param limit
|
140 |
|
|
* @return
|
141 |
|
|
*/
|
142 |
|
|
List<IdentifiedEntityDTO<Reference>> listByIdentifierAndTitleCacheAbbrev(String identifier,
|
143 |
|
|
DefinedTerm identifierType, MatchMode matchmode, Integer limit);
|
144 |
|
|
|
145 |
6af26c13
|
Katja Luther
|
/**
|
146 |
|
|
* @param uuids
|
147 |
|
|
* @param refType
|
148 |
|
|
* @return
|
149 |
|
|
*/
|
150 |
|
|
List<UuidAndTitleCache<Reference>> getUuidAndTitleCacheForUUIDS(Set<UUID> uuids, ReferenceType refType);
|
151 |
|
|
|
152 |
bdde6137
|
Katja Luther
|
/**
|
153 |
|
|
* @param config
|
154 |
|
|
* @return
|
155 |
|
|
*/
|
156 |
|
|
List<Reference> findByTitleAndAbbrevTitle(IIdentifiableEntityServiceConfigurator<Reference> config);
|
157 |
|
|
|
158 |
2d993c6e
|
Andreas Müller
|
}
|