Project

General

Profile

« Previous | Next » 

Revision 786696e3

Added by Andreas Müller over 10 years ago

merge trunk into cdm3.3 branch

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/INameService.java
23 23
import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
24 24
import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
25 25
import eu.etaxonomy.cdm.api.service.pager.Pager;
26
import eu.etaxonomy.cdm.api.service.search.DocumentSearchResult;
26 27
import eu.etaxonomy.cdm.api.service.search.SearchResult;
27 28
import eu.etaxonomy.cdm.model.common.CdmBase;
28 29
import eu.etaxonomy.cdm.model.common.Language;
......
179 180
            boolean highlightFragments, 
180 181
            List<String> propertyPaths,
181 182
            int maxNoOfResults) throws CorruptIndexException, IOException, ParseException;
183
	
184
	/**
185
	 * Fuzzy matching for the taxon name elements using only the lucene index. 
186
	 * 
187
	 * The input name is first atomised using the {@link NonViralNameParserImpl}
188
	 * into its separate parts (genusOrUninomial,infraGenericEpithet,specificEpithet,infraGenericEpithet,authorshipCache).
189
	 * Each field is then matched separately with the same accuracy parameter.
190
	 *  
191
	 * @param name taxon name to fuzzy match
192
	 * @param accuracy value > 0.0 and < 1.0 which determines the accuracy of the result.
193
	 * @param languages list of languages to consider when matching (currently not used)
194
	 * @param highlightFragments
195
	 * @param maxNoOfResults 
196
	 * @return
197
	 * @throws CorruptIndexException
198
	 * @throws IOException
199
	 * @throws ParseException
200
	 */
201
    public List<DocumentSearchResult> findByNameFuzzySearch(
202
            String name,
203
            float accuracy,
204
            List<Language> languages,
205
            boolean highlightFragments, 
206
            int maxNoOfResults) throws CorruptIndexException, IOException, ParseException;
207
    
208
	/**
209
	 * Fuzzy matching against the name cache using only the lucene index. 
210
	 * 
211
	 *  
212
	 * @param name taxon name to fuzzy match
213
	 * @param accuracy value > 0.0 and < 1.0 which determines the accuracy of the result.
214
	 * @param languages list of languages to consider when matching (currently not used)
215
	 * @param highlightFragments
216
	 * @param maxNoOfResults 
217
	 * @return
218
	 * @throws CorruptIndexException
219
	 * @throws IOException
220
	 * @throws ParseException
221
	 */
222
    public List<DocumentSearchResult> findByFuzzyNameCacheSearch(
223
            String name,
224
            float accuracy,
225
            List<Language> languages,
226
            boolean highlightFragments, 
227
            int maxNoOfResults) throws CorruptIndexException, IOException, ParseException;
228
    
229
	/**
230
	 * Exact matching for the taxon name elements using only the lucene index.
231
	 * 
232
	 * The input name is first atomised using the {@link NonViralNameParserImpl}
233
	 * into its separate parts (genusOrUninomial,infraGenericEpithet,specificEpithet,infraGenericEpithet,authorshipCache).
234
	 * Each field is then matched separately with the same accuracy parameter.
235
	 *  
236
	 * @param name taxon name to fuzzy match
237
	 * @param wildcard boolean flag to indicate whether a wildcard '*' should be added at the end of the query
238
	 * @param languages list of languages to consider when matching (currently not used)
239
	 * @param highlightFragments
240
	 * @param maxNoOfResults 
241
	 * @return
242
	 * @throws CorruptIndexException
243
	 * @throws IOException
244
	 * @throws ParseException
245
	 */
246
    
247
    public List<DocumentSearchResult> findByNameExactSearch(
248
            String name,      
249
            boolean wildcard,
250
            List<Language> languages,
251
            boolean highlightFragments, 
252
            int maxNoOfResults) throws CorruptIndexException, IOException, ParseException;
182 253

  
183 254
	// TODO: Remove getNamesByName() methods. Use findNamesByTitle() instead.
184 255

  

Also available in: Unified diff