2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.io
.IOException
;
13 import java
.util
.Collection
;
14 import java
.util
.HashMap
;
15 import java
.util
.List
;
17 import java
.util
.Optional
;
19 import java
.util
.UUID
;
21 import org
.hibernate
.criterion
.Criterion
;
23 import eu
.etaxonomy
.cdm
.api
.service
.config
.DeleteConfiguratorBase
;
24 import eu
.etaxonomy
.cdm
.api
.service
.config
.NameDeletionConfigurator
;
25 import eu
.etaxonomy
.cdm
.api
.service
.dto
.TypeDesignationStatusFilter
;
26 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
27 import eu
.etaxonomy
.cdm
.api
.service
.search
.DocumentSearchResult
;
28 import eu
.etaxonomy
.cdm
.api
.service
.search
.LuceneParseException
;
29 import eu
.etaxonomy
.cdm
.api
.service
.search
.SearchResult
;
30 import eu
.etaxonomy
.cdm
.api
.util
.TaxonNamePartsFilter
;
31 import eu
.etaxonomy
.cdm
.common
.URI
;
32 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
33 import eu
.etaxonomy
.cdm
.model
.name
.HomotypicalGroup
;
34 import eu
.etaxonomy
.cdm
.model
.name
.HybridRelationship
;
35 import eu
.etaxonomy
.cdm
.model
.name
.HybridRelationshipType
;
36 import eu
.etaxonomy
.cdm
.model
.name
.INonViralName
;
37 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
38 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationshipType
;
39 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalCode
;
40 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalSource
;
41 import eu
.etaxonomy
.cdm
.model
.name
.NomenclaturalStatus
;
42 import eu
.etaxonomy
.cdm
.model
.name
.Rank
;
43 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignation
;
44 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignationStatus
;
45 import eu
.etaxonomy
.cdm
.model
.name
.TaxonName
;
46 import eu
.etaxonomy
.cdm
.model
.name
.TypeDesignationBase
;
47 import eu
.etaxonomy
.cdm
.model
.name
.TypeDesignationStatusBase
;
48 import eu
.etaxonomy
.cdm
.model
.occurrence
.FieldUnit
;
49 import eu
.etaxonomy
.cdm
.persistence
.dao
.common
.Restriction
;
50 import eu
.etaxonomy
.cdm
.persistence
.dao
.initializer
.IBeanInitializer
;
51 import eu
.etaxonomy
.cdm
.persistence
.dto
.TaxonNameParts
;
52 import eu
.etaxonomy
.cdm
.persistence
.dto
.UuidAndTitleCache
;
53 import eu
.etaxonomy
.cdm
.persistence
.query
.MatchMode
;
54 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
55 import eu
.etaxonomy
.cdm
.strategy
.cache
.TaggedText
;
56 import eu
.etaxonomy
.cdm
.strategy
.parser
.NonViralNameParserImpl
;
58 public interface INameService
59 extends IIdentifiableEntityService
<TaxonName
> {
62 * Deletes a name. Depending on the configurator state links to the name will either be
63 * deleted or throw exceptions.<BR>
64 * If name is <code>null</code> this method has no effect.
69 public DeleteResult
delete(UUID nameUUID
, NameDeletionConfigurator config
);
72 * Creates specimen duplicate based on the given type specimen which will be assigned as a type
73 * of the given name.<br>
74 * The specimen will only differ in accession number, collection and type status and will be attached
75 * to the same {@link FieldUnit}
76 * @param name the name where this type designation will be added to
77 * @param baseDesignation the type specimen of this designation is cloned to create the new specimen
78 * @param accessionNumber the accession number of the cloned specimen
79 * @param barcode the barcode of the cloned specimen
80 * @param catalogNumber the catalog number of the cloned specimen
81 * @param collectionUuid the collection the cloned specimen belongs to
82 * @param typeStatus the type status of the cloned specimen
83 * @return an {@link UpdateResult}
85 public UpdateResult
cloneTypeDesignation(UUID nameUuid
, SpecimenTypeDesignation baseDesignation
,
86 String accessionNumber
, String barcode
, String catalogNumber
,
87 UUID collectionUuid
, SpecimenTypeDesignationStatus typeStatus
, URI preferredStableUri
);
90 * Removes the given type designation from the given taxon name and deletes it from
91 * the database if it is not connected to any other name.
92 * If <code>typeDesignation</code> is <code>null</code> all type designations are deleted
93 * from the given taxon name. If <code>name</code> is <code>null</code> all names are removed from
94 * the given type designation. If both are <code>null</code> nothing happens.
95 * @param typeDesignation
99 public DeleteResult
deleteTypeDesignation(TaxonName name
, TypeDesignationBase
<?
> typeDesignation
);
102 * Removes the given type designation from the given taxon name and deletes it from
103 * the database if it is not connected to any other name.
104 * If <code>typeDesignation</code> is <code>null</code> all type designations are deleted
105 * from the given taxon name. If <code>name</code> is <code>null</code> all names are removed from
106 * the given type designation. If both are <code>null</code> nothing happens.
107 * @param typeDesignation
111 public DeleteResult
deleteTypeDesignation(UUID nameUuid
, UUID typeDesignationUuid
);
115 * Saves the given type designations.
116 * @param typeDesignationCollection
119 public Map
<UUID
, TypeDesignationBase
<?
>> saveTypeDesignationAll(Collection
<TypeDesignationBase
<?
>> typeDesignationCollection
);
122 * Saves the given homotypical groups.
123 * @param homotypicalGroups
126 public Map
<UUID
, HomotypicalGroup
> saveAllHomotypicalGroups(Collection
<HomotypicalGroup
> homotypicalGroups
);
129 * Returns all nomenclatural status.
134 public List
<NomenclaturalStatus
> getAllNomenclaturalStatus(int limit
, int start
);
137 * Returns all type designations.
142 public List
<TypeDesignationBase
<?
>> getAllTypeDesignations(int limit
, int start
);
144 public TypeDesignationBase
<?
> loadTypeDesignation(int id
, List
<String
> propertyPaths
);
146 public TypeDesignationBase
<?
> loadTypeDesignation(UUID uuid
, List
<String
> propertyPaths
);
148 public List
<TypeDesignationBase
<?
>> loadTypeDesignations(List
<UUID
> uuids
, List
<String
> propertyPaths
);
151 * Returns all NonViralNames with a name cache that matches the given string
155 public List
<TaxonName
> getNamesByNameCache(String nameCache
);
158 * Returns all NonViralNames with a title cache that matches the given string
159 * using the given match mode and initialization strategy
162 * @param matchMode must not be <code>NULL</code>
163 * @param propertyPaths
166 public List
<TaxonName
> findNamesByTitleCache(String titleCache
, MatchMode matchMode
, List
<String
> propertyPaths
);
169 * Supports using wildcards in the query parameters.
170 * If a name part passed to the method contains the asterisk character ('*') it will be translated into '%' the related field is search with a LIKE clause.
172 * A query parameter which is passed as <code>NULL</code> value will be ignored. A parameter passed as {@link Optional} object containing a <code>NULL</code> value will be used
173 * to filter select taxon names where the according field is <code>null</code>.
176 * @param infraGenericEpithet
177 * @param specificEpithet
178 * @param infraSpecificEpithet
180 * Only names having the specified rank are taken into account.
181 * @param excludedNamesUuids
182 * Names to be excluded from the result set
185 public Pager
<TaxonNameParts
> findTaxonNameParts(Optional
<String
> genusOrUninomial
,
186 Optional
<String
> infraGenericEpithet
, Optional
<String
> specificEpithet
,
187 Optional
<String
> infraSpecificEpithet
, Rank rank
, Set
<UUID
> excludedNamesUuids
,
188 Integer pageSize
, Integer pageIndex
, List
<OrderHint
> orderHints
);
191 * <b>This method behaves differently compared to {@link #findTaxonNameParts(Optional, Optional, Optional, Optional, Rank, Integer, Integer, List)}!</b>
193 * The {@link TaxonNamePartsFilter} defines the rank and fixed name parts for the search process.
194 * For example: In case the <code>rank</code> is "genus", the <code>genusOrUninomial</code> will be used as search parameter which needs to match exactly.
195 * The <code>namePartQueryString</code> will be used to do a wildcard search on the specificEpithet.
197 * For name part lookup purposes the <code>TaxonNameParts</code> in the result list can be asked to return the relavant name part by
198 * calling {@link TaxonNameParts#nameRankSpecificNamePart(TaxonName)}
204 public Pager
<TaxonNameParts
> findTaxonNameParts(TaxonNamePartsFilter filter
, String namePartQueryString
, Integer pageSize
, Integer pageIndex
, List
<OrderHint
> orderHints
);
207 * Returns all NonViralNames with a name cache that matches the given string
208 * using the given match mode and initialization strategy
212 * @param propertyPaths
215 public List
<TaxonName
> findNamesByNameCache(String nameCache
, MatchMode matchMode
, List
<String
> propertyPaths
);
218 * Fuzzy matching for the taxon name elements. The input name is first atomised using the {@link NonViralNameParserImpl}
219 * into its separate parts (genusOrUninomial,infraGenericEpithet,specificEpithet,infraGenericEpithet,authorshipCache).
220 * Each field is then matched separately with the same accuracy parameter.
222 * @param name taxon name to fuzzy match
223 * @param accuracy value > 0.0 and < 1.0 which determines the accuracy of the result.
224 * @param languages list of languages to consider when matching (currently not used)
225 * @param highlightFragments
226 * @param propertyPaths
227 * @param maxNoOfResults
229 * @throws IOException
230 * @throws LuceneParseException
232 public List
<SearchResult
<TaxonName
>> findByNameFuzzySearch(
235 List
<Language
> languages
,
236 boolean highlightFragments
,
237 List
<String
> propertyPaths
,
238 int maxNoOfResults
) throws IOException
, LuceneParseException
;
241 * Fuzzy matching for the taxon name elements using only the lucene index.
243 * The input name is first atomised using the {@link NonViralNameParserImpl}
244 * into its separate parts (genusOrUninomial,infraGenericEpithet,specificEpithet,infraGenericEpithet,authorshipCache).
245 * Each field is then matched separately with the same accuracy parameter.
247 * @param name taxon name to fuzzy match
248 * @param accuracy value > 0.0 and < 1.0 which determines the accuracy of the result.
249 * @param languages list of languages to consider when matching (currently not used)
250 * @param highlightFragments
251 * @param maxNoOfResults
253 * @throws IOException
254 * @throws LuceneParseException
256 public List
<DocumentSearchResult
> findByNameFuzzySearch(
259 List
<Language
> languages
,
260 boolean highlightFragments
,
261 int maxNoOfResults
) throws IOException
, LuceneParseException
;
264 * Fuzzy matching against the name cache using only the lucene index.
267 * @param name taxon name to fuzzy match
268 * @param accuracy value > 0.0 and < 1.0 which determines the accuracy of the result.
269 * @param languages list of languages to consider when matching (currently not used)
270 * @param highlightFragments
271 * @param maxNoOfResults
273 * @throws IOException
274 * @throws LuceneParseException
276 public List
<DocumentSearchResult
> findByFuzzyNameCacheSearch(
279 List
<Language
> languages
,
280 boolean highlightFragments
,
281 int maxNoOfResults
) throws IOException
, LuceneParseException
;
284 * Exact matching for the taxon name elements using only the lucene index.
286 * The input name is first atomised using the {@link NonViralNameParserImpl}
287 * into its separate parts (genusOrUninomial,infraGenericEpithet,specificEpithet,infraGenericEpithet,authorshipCache).
288 * Each field is then matched separately with the same accuracy parameter.
290 * @param name taxon name to fuzzy match
291 * @param wildcard boolean flag to indicate whether a wildcard '*' should be added at the end of the query
292 * @param languages list of languages to consider when matching (currently not used)
293 * @param highlightFragments
294 * @param maxNoOfResults
296 * @throws IOException
297 * @throws LuceneParseException
300 public List
<DocumentSearchResult
> findByNameExactSearch(
303 List
<Language
> languages
,
304 boolean highlightFragments
,
305 int maxNoOfResults
) throws IOException
, LuceneParseException
;
307 // TODO: Remove getNamesByName() methods. Use findNamesByTitle() instead.
309 public List
<HomotypicalGroup
> getAllHomotypicalGroups(int limit
, int start
);
312 * Returns all or a page of all original spellings in the database.
313 * As original spellings are
315 * @param pageSize the page size
316 * @param pageStart the number of the page
317 * @param orderHints the order hints
318 * @param propertyPaths the property path to initialize the resulting objects
319 * @return list of nomenclatural the filter criteria
321 public List
<NomenclaturalSource
> listOriginalSpellings(Integer pageSize
,
322 Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
325 * Returns all or a page of all taxon name relationships in the database.
326 * The result can be filtered by relationship types.
327 * It does NOT contain hybrid relationships
328 * (see {@link #listHybridRelationships(Set, Integer, Integer, List, List)})
330 * @param types The name relationship type filter, if <code>null</code> no filter is set, if empty the result will also be empty
331 * @param pageSize the page size
332 * @param pageStart the number of the page
333 * @param orderHints the order hints
334 * @param propertyPaths the property path to initialize the resulting objects
335 * @return list of name relationships matching the filter criteria
337 public List
<NameRelationship
> listNameRelationships(Set
<NameRelationshipType
> types
,
338 Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
341 * Returns all or a page of all hybrid relationships in the database.
342 * The result can be filtered by relationship types.
343 * It does NOT contain ordinary name relationships
344 * (see {@link #listNameRelationships(Set, Integer, Integer, List, List)})
346 * @param types The hybrid relationship type filter, if <code>null</code> no filter is set, if empty the result will also be empty
347 * @param pageSize the page size
348 * @param pageStart the number of the page
349 * @param orderHints the order hints
350 * @param propertyPaths the property path to initialize the resulting objects
351 * @return list of hybrid relationships matching the filter criteria
353 public List
<HybridRelationship
> listHybridRelationships(Set
<HybridRelationshipType
> types
,
354 Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
357 * Return a List of name relationships in which this name is related to
358 * another name, optionally filtered by relationship type
361 * the name on either the <i>"from side"</i> or on the
362 * <i>"to side"</i> of the relationship, depending on the
363 * <code>direction</code> of the relationship.
365 * the direction of the NameRelationship, may be null to return all relationships
367 * the relationship type (or null to return all relationships)
369 * The maximum number of relationships returned (can be null for
372 * The offset (in pageSize chunks) from the start of the result
376 * @param propertyPaths
377 * properties to initialize - see
378 * {@link IBeanInitializer#initialize(Object, List)}
379 * @return a Pager of NameRelationship instances
381 public List
<NameRelationship
> listNameRelationships(TaxonName name
, NameRelationship
.Direction direction
, NameRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
384 * Return a List of name relationships in which this name is related to another name, optionally filtered
385 * by relationship type
387 * @param name the name on the <i>"from side"</i> of the relationship
388 * @param direction the direction of the NameRelationship
389 * @param type the relationship type (or null to return all relationships)
390 * @param pageSize The maximum number of relationships returned (can be null for all relationships)
391 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
392 * @param orderHints may be null
393 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
394 * @return a Pager of NameRelationship instances
396 public Pager
<NameRelationship
> pageNameRelationships(TaxonName name
, NameRelationship
.Direction direction
, NameRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
399 * Return a List of relationships in which this name is related to another name, optionally filtered
400 * by relationship type
402 * @param name the name on the <i>"from side"</i> of the relationship
403 * @param type the relationship type (or null to return all relationships)
404 * @param pageSize The maximum number of relationships returned (can be null for all relationships)
405 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
406 * @param orderHints may be null
407 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
408 * @return a Pager of NameRelationship instances
409 * @deprecated use {@link #listNameRelationships(TaxonName, eu.etaxonomy.cdm.model.common.RelationshipBase.Direction, NameRelationshipType, Integer, Integer, List, List)} instead
412 public List
<NameRelationship
> listFromNameRelationships(TaxonName name
, NameRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
415 * Return a List of relationships in which this name is related to another name, optionally filtered
416 * by relationship type
418 * @param name the name on the <i>"from side"</i> of the relationship
419 * @param type the relationship type (or null to return all relationships)
420 * @param pageSize The maximum number of relationships returned (can be null for all relationships)
421 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
422 * @param orderHints may be null
423 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
424 * @return a Pager of NameRelationship instances
425 * @deprecated use {@link #pageNameRelationships(TaxonName, eu.etaxonomy.cdm.model.common.RelationshipBase.Direction, NameRelationshipType, Integer, Integer, List, List)} instead
428 public Pager
<NameRelationship
> pageFromNameRelationships(TaxonName name
, NameRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
431 * Return a List of relationships in which another name is related to this name, optionally filtered
432 * by relationship type
434 * @param name the name on the <i>"to side"</i> of the relationship
435 * @param type the relationship type (or null to return all relationships)
436 * @param pageSize The maximum number of relationships returned (can be null for all relationships)
437 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
438 * @param orderHints may be null
439 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
440 * @return a Pager of NameRelationship instances
441 * @deprecated use {@link #listNameRelationships(TaxonName, eu.etaxonomy.cdm.model.common.RelationshipBase.Direction, NameRelationshipType, Integer, Integer, List, List)} instead
444 public List
<NameRelationship
> listToNameRelationships(TaxonName name
, NameRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
447 * Return a List of relationships in which another name is related to this name, optionally filtered
448 * by relationship type
450 * @param name the name on the <i>"to side"</i> of the relationship
451 * @param type the relationship type (or null to return all relationships)
452 * @param pageSize The maximum number of relationships returned (can be null for all relationships)
453 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
454 * @param orderHints may be null
455 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
456 * @return a Pager of NameRelationship instances
457 * @deprecated use {@link #pageNameRelationships(TaxonName, eu.etaxonomy.cdm.model.common.RelationshipBase.Direction, NameRelationshipType, Integer, Integer, List, List)} instead
460 public Pager
<NameRelationship
> pageToNameRelationships(TaxonName name
, NameRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
464 * Return a List of hybrids related to this name, optionally filtered
465 * by hybrid relationship type
467 * @param name the name
468 * @param type the hybrid relationship type (or null to return all hybrids)
469 * @param pageSize The maximum number of hybrid relationships returned (can be null for all relationships)
470 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
471 * @param orderHints may be null
472 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
473 * @return a Pager of HybridRelationship instances
475 public Pager
<HybridRelationship
> getHybridNames(INonViralName name
, HybridRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
478 * Return a List of types related to this name, optionally filtered
479 * by type designation status
481 * @param name the name
482 * @param status the type designation status (or null to return all types)
483 * @param pageSize The maximum number of types returned (can be null for all types)
484 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
485 * @return a Pager of TypeDesignationBase instances
487 public Pager
<TypeDesignationBase
> getTypeDesignations(TaxonName name
,
488 SpecimenTypeDesignationStatus status
, Integer pageSize
, Integer pageNumber
);
490 public Pager
<TypeDesignationBase
> getTypeDesignations(TaxonName name
,
491 SpecimenTypeDesignationStatus status
, Integer pageSize
, Integer pageNumber
, List
<String
> propertyPaths
);
493 public List
<TypeDesignationBase
> getTypeDesignationsInHomotypicalGroup(UUID nameUuid
, Integer pageSize
,
494 Integer pageNumber
, List
<String
> propertyPaths
);
498 * Returns a List of TaxonName instances that match the properties passed
501 * @param infraGenericEpithet
502 * @param specificEpithet
503 * @param infraspecificEpithet
505 * @param pageSize The maximum number of names returned (can be null for all names)
506 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
507 * @param orderHints may be null
508 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
509 * @return a Pager of TaxonName instances
511 public Pager
<TaxonName
> searchNames(String uninomial
, String infraGenericEpithet
, String specificEpithet
, String infraspecificEpithet
, Rank rank
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
514 * Returns a Paged List of TaxonName instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
516 * @param clazz filter the results by class (or pass null to return all TaxonName instances)
518 * @param pageSize The maximum number of names returned (can be null for all matching names)
519 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
521 * Supports path like <code>orderHints.propertyNames</code> which
522 * include *-to-one properties like createdBy.username or
523 * authorTeam.persistentTitleCache
524 * @param propertyPaths properties to be initialized
525 * @return a Pager TaxonName instances
526 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
529 public Pager
<TaxonName
> search(Class
<?
extends TaxonName
> clazz
, String queryString
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
532 * Returns a map that holds uuid, titleCache pairs of all names in the current database
535 * a <code>Map</code> containing uuid and titleCache of names
537 public List
<UuidAndTitleCache
> getUuidAndTitleCacheOfNames(Integer limit
, String pattern
);
540 * Returns a list of names belonging to the synonymy of the taxon
543 * @return a list containing uuid and titleCache of names of the synonymy of the given taxon
545 public List
<UuidAndTitleCache
> getUuidAndTitleCacheOfSynonymy(Integer limit
, UUID taxonUuid
);
548 * Return a Pager of names matching the given query string, optionally filtered by class, optionally with a particular MatchMode
550 * @param clazz filter by class - can be null to include all instances of type T
551 * @param queryString the query string to filter by
552 * @param matchmode use a particular type of matching (can be null - defaults to exact matching)
553 * @param criteria additional criteria to filter by
554 * @param pageSize The maximum number of objects returned (can be null for all objects)
555 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
556 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
558 * Supports path like <code>orderHints.propertyNames</code> which
559 * include *-to-one properties like createdBy.username or
560 * authorTeam.persistentTitleCache
561 * @return a paged list of instances of type T matching the queryString
563 public Pager
<TaxonName
> findByName(Class
<TaxonName
> clazz
, String queryString
, MatchMode matchmode
,
564 List
<Criterion
> criteria
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
567 * Returns a homotypical group with the given UUID or null if not homotypical group exists with that UUID
569 * @param uuid the uuid of the homotypical group
570 * @return a homotypical group
572 public HomotypicalGroup
findHomotypicalGroup(UUID uuid
);
578 public List
<TaggedText
> getTaggedName(UUID uuid
);
584 public UpdateResult
setAsGroupsBasionym(UUID nameUuid
);
586 public List
<HashMap
<String
, String
>> getNameRecords();
593 public DeleteResult
delete(TaxonName name
, NameDeletionConfigurator config
);
595 public List
<TypeDesignationStatusBase
> getTypeDesignationStatusInUse();
598 * Provides a collection of the TypeDesignationStatusBase terms which are in use.
599 * Terms having the same label are merged into one filter item.
601 * @param preferredLanguage
604 public Collection
<TypeDesignationStatusFilter
> getTypeDesignationStatusFilterTerms(List
<Language
> preferredLanguages
);
606 public NomenclaturalStatus
loadNomenclaturalStatus(UUID uuid
, List
<String
> propertyPaths
);
608 public <S
extends TaxonName
> Pager
<S
> page(Class
<S
> clazz
, List
<Restriction
<?
>> restrictions
, Integer pageSize
, Integer pageIndex
,
609 List
<OrderHint
> orderHints
, List
<String
> propertyPaths
, boolean includeUnpublished
);
611 public List
<TaxonName
> findByFullTitle(Class
<TaxonName
> clazz
, String queryString
, MatchMode matchmode
,
612 List
<Criterion
> criteria
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
,
613 List
<String
> propertyPaths
);
617 * Parses a name string and returns a parsed name. If deduplicate is <code>true</code>
618 * the parsed parts like nomenclatural reference and authors are deduplicated against the
621 * @param taxonNameString
622 * @param code the nomenclatural code to use
623 * @param preferredRank the preferred rank to use if rank is not clearly defined by the taxon name
624 * @param doDeduplicate if <code>true</code> the name parts are deduplicated against the database,
625 * but the name itself is NOT deduplicated (this may change in future)
628 public UpdateResult
parseName(String taxonNameString
, NomenclaturalCode code
, Rank preferredRank
, boolean doDeduplicate
);
630 public UpdateResult
parseName(TaxonName nameToBeFilled
, String stringToBeParsed
, Rank preferredRank
, boolean doEmpty
, boolean doDeduplicate
);
633 * checks whether the name can be deleted if the taxon with taxonUuid will be deleted, too
639 public DeleteResult
isDeletable(UUID nameUuid
, DeleteConfiguratorBase config
, UUID taxonUuid
);