@Service @Transactional(readOnly=true) public class NameServiceImpl extends IdentifiableServiceBase<TaxonName,ITaxonNameDao> implements INameService
Modifier and Type | Field and Description |
---|---|
protected ICollectionService |
collectionService |
protected IBeanInitializer |
defaultBeanInitializer |
protected IOccurrenceService |
occurrenceService |
protected IOrderedTermVocabularyDao |
orderedVocabularyDao |
protected IReferencedEntityDao<ReferencedEntityBase> |
referencedEntityDao |
protected ISourcedEntityDao<SourcedEntityBase<?>> |
sourcedEntityDao |
protected ITaxonService |
taxonService |
protected ITermVocabularyDao |
vocabularyDao |
UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
NameServiceImpl()
Constructor
|
Modifier and Type | Method and Description |
---|---|
UpdateResult |
cloneTypeDesignation(java.util.UUID nameUuid,
SpecimenTypeDesignation baseDesignation,
java.lang.String accessionNumber,
java.lang.String barcode,
java.lang.String catalogNumber,
java.util.UUID collectionUuid,
SpecimenTypeDesignationStatus typeStatus)
Creates specimen duplicate based on the given type specimen which will be assigned as a type
of the given name.
The specimen will only differ in accession number, collection and type status and will be attached to the same FieldUnit |
DeleteResult |
delete(TaxonName name) |
DeleteResult |
delete(TaxonName name,
NameDeletionConfigurator config) |
DeleteResult |
delete(java.util.UUID nameUUID)
Delete an existing persistent object
|
DeleteResult |
delete(java.util.UUID nameUUID,
NameDeletionConfigurator config)
Deletes a name.
|
DeleteResult |
deleteTypeDesignation(TaxonName name,
TypeDesignationBase<?> typeDesignation)
Removes the given type designation from the given taxon name and deletes it from
the database if it is not connected to any other name.
|
DeleteResult |
deleteTypeDesignation(java.util.UUID nameUuid,
java.util.UUID typeDesignationUuid)
Removes the given type designation from the given taxon name and deletes it from
the database if it is not connected to any other name.
|
java.util.List<TaxonName> |
findByFullTitle(java.lang.Class<TaxonName> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criteria,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
java.util.List<DocumentSearchResult> |
findByFuzzyNameCacheSearch(java.lang.String name,
float accuracy,
java.util.List<Language> languages,
boolean highlightFragments,
int maxNoOfResults)
Fuzzy matching against the name cache using only the lucene index.
|
Pager<TaxonName> |
findByName(java.lang.Class<TaxonName> clazz,
java.lang.String queryString,
MatchMode matchmode,
java.util.List<org.hibernate.criterion.Criterion> criteria,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a Pager of names matching the given query string, optionally filtered by class, optionally with a particular MatchMode
|
java.util.List<DocumentSearchResult> |
findByNameExactSearch(java.lang.String name,
boolean wildcard,
java.util.List<Language> languages,
boolean highlightFragments,
int maxNoOfResults)
Exact matching for the taxon name elements using only the lucene index.
|
java.util.List<DocumentSearchResult> |
findByNameFuzzySearch(java.lang.String name,
float accuracy,
java.util.List<Language> languages,
boolean highlightFragments,
int maxNoOfResults)
Fuzzy matching for the taxon name elements using only the lucene index.
|
java.util.List<SearchResult<TaxonName>> |
findByNameFuzzySearch(java.lang.String name,
float accuracy,
java.util.List<Language> languages,
boolean highlightFragments,
java.util.List<java.lang.String> propertyPaths,
int maxNoOfResults)
Fuzzy matching for the taxon name elements.
|
HomotypicalGroup |
findHomotypicalGroup(java.util.UUID uuid)
Returns a homotypical group with the given UUID or null if not homotypical group exists with that UUID
|
java.util.List<TaxonName> |
findNamesByNameCache(java.lang.String nameCache,
MatchMode matchMode,
java.util.List<java.lang.String> propertyPaths)
Deprecated.
|
java.util.List<TaxonName> |
findNamesByTitleCache(java.lang.String titleCache,
MatchMode matchMode,
java.util.List<java.lang.String> propertyPaths)
Deprecated.
|
Pager<TaxonNameParts> |
findTaxonNameParts(java.util.Optional<java.lang.String> genusOrUninomial,
java.util.Optional<java.lang.String> infraGenericEpithet,
java.util.Optional<java.lang.String> specificEpithet,
java.util.Optional<java.lang.String> infraSpecificEpithet,
Rank rank,
java.util.Set<java.util.UUID> excludedNamesUuids,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<OrderHint> orderHints)
Supports using wildcards in the query parameters.
|
Pager<TaxonNameParts> |
findTaxonNameParts(TaxonNamePartsFilter filter,
java.lang.String namePartQueryString,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<OrderHint> orderHints)
This method behaves differently compared to
#findTaxonNameParts(Optional, Optional, Optional, Optional, Rank, Integer, Integer, List) ! |
java.util.List<HomotypicalGroup> |
getAllHomotypicalGroups(int limit,
int start)
FIXME Candidate for harmonization
homotypicalGroupService.list
|
java.util.List<NomenclaturalStatus> |
getAllNomenclaturalStatus(int limit,
int start)
TODO candidate for harmonization
new name getNomenclaturalStatus
|
java.util.List<TypeDesignationBase<?>> |
getAllTypeDesignations(int limit,
int start)
TODO candidate for harmonization
new name getTypeDesignations
|
Pager<HybridRelationship> |
getHybridNames(INonViralName name,
HybridRelationshipType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of hybrids related to this name, optionally filtered
by hybrid relationship type
|
java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> |
getNameRecords() |
java.util.List<TaxonName> |
getNamesByNameCache(java.lang.String nameCache)
Deprecated.
|
java.util.List<TaggedText> |
getTaggedName(java.util.UUID uuid) |
Pager<TypeDesignationBase> |
getTypeDesignations(TaxonName name,
SpecimenTypeDesignationStatus status,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Return a List of types related to this name, optionally filtered
by type designation status
|
Pager<TypeDesignationBase> |
getTypeDesignations(TaxonName name,
SpecimenTypeDesignationStatus status,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
java.util.List<TypeDesignationBase> |
getTypeDesignationsInHomotypicalGroup(java.util.UUID nameUuid,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
java.util.Collection<TypeDesignationStatusFilter> |
getTypeDesignationStatusFilterTerms(java.util.List<Language> preferredLanguages)
Provides a collection of the TypeDesignationStatusBase terms which are in use.
|
java.util.List<TypeDesignationStatusBase> |
getTypeDesignationStatusInUse() |
java.util.List<UuidAndTitleCache> |
getUuidAndTitleCacheOfNames(java.lang.Integer limit,
java.lang.String pattern)
Returns a map that holds uuid, titleCache pairs of all names in the current database
|
java.util.List<UuidAndTitleCache> |
getUuidAndTitleCacheOfSynonymy(java.lang.Integer limit,
java.util.UUID taxonUuid)
Returns a list of names belonging to the synonymy of the taxon
|
DeleteResult |
isDeletable(TaxonName name,
DeleteConfiguratorBase config) |
DeleteResult |
isDeletable(java.util.UUID nameUUID,
DeleteConfiguratorBase config)
the basic isDeletable method return false if the object is referenced from any other object.
|
java.util.List<NameRelationship> |
listFromNameRelationships(TaxonName name,
NameRelationshipType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of relationships in which this name is related to another name, optionally filtered
by relationship type
|
java.util.List<HybridRelationship> |
listHybridRelationships(java.util.Set<HybridRelationshipType> types,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns all or a page of all hybrid relationships in the database.
|
java.util.List<NameRelationship> |
listNameRelationships(java.util.Set<NameRelationshipType> types,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns all or a page of all taxon name relationships in the database.
|
java.util.List<NameRelationship> |
listNameRelationships(TaxonName name,
RelationshipBase.Direction direction,
NameRelationshipType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of name relationships in which this name is related to
another name, optionally filtered by relationship type
|
java.util.List<NameRelationship> |
listToNameRelationships(TaxonName name,
NameRelationshipType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of relationships in which another name is related to this name, optionally filtered
by relationship type
|
NomenclaturalStatus |
loadNomenclaturalStatus(java.util.UUID uuid,
java.util.List<java.lang.String> propertyPaths) |
TypeDesignationBase<?> |
loadTypeDesignation(int id,
java.util.List<java.lang.String> propertyPaths) |
TypeDesignationBase<?> |
loadTypeDesignation(java.util.UUID uuid,
java.util.List<java.lang.String> propertyPaths) |
<S extends TaxonName> |
page(java.lang.Class<S> clazz,
java.util.List<Restriction<?>> restrictions,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
<S extends TaxonName> |
page(java.lang.Class<S> clazz,
java.util.List<Restriction<?>> restrictions,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths,
boolean includeUnpublished) |
Pager<NameRelationship> |
pageFromNameRelationships(TaxonName name,
NameRelationshipType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of relationships in which this name is related to another name, optionally filtered
by relationship type
|
Pager<NameRelationship> |
pageNameRelationships(TaxonName name,
RelationshipBase.Direction direction,
NameRelationshipType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of name relationships in which this name is related to another name, optionally filtered
by relationship type
|
Pager<NameRelationship> |
pageToNameRelationships(TaxonName name,
NameRelationshipType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Return a List of relationships in which another name is related to this name, optionally filtered
by relationship type
|
protected LuceneSearch |
prepareFindByExactNameSearch(java.lang.Class<? extends CdmBase> clazz,
java.lang.String name,
boolean wildcard,
java.util.List<Language> languages,
boolean highlightFragments) |
protected LuceneSearch |
prepareFindByFuzzyNameCacheSearch(java.lang.Class<? extends CdmBase> clazz,
java.lang.String name,
float accuracy,
int maxNoOfResults,
java.util.List<Language> languages,
boolean highlightFragments) |
protected LuceneSearch |
prepareFindByFuzzyNameSearch(java.lang.Class<? extends CdmBase> clazz,
INonViralName nvn,
float accuracy,
int maxNoOfResults,
java.util.List<Language> languages,
boolean highlightFragments) |
java.util.Map<java.util.UUID,HomotypicalGroup> |
saveAllHomotypicalGroups(java.util.Collection<HomotypicalGroup> homotypicalGroups)
TODO candidate for harmonization
new name saveHomotypicalGroups
|
java.util.Map<java.util.UUID,TypeDesignationBase<?>> |
saveTypeDesignationAll(java.util.Collection<TypeDesignationBase<?>> typeDesignationCollection)
TODO candidate for harmonization
new name saveTypeDesignations
|
Pager<TaxonName> |
searchNames(java.lang.String uninomial,
java.lang.String infraGenericEpithet,
java.lang.String specificEpithet,
java.lang.String infraspecificEpithet,
Rank rank,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
FIXME Candidate for harmonization
rename search
|
UpdateResult |
setAsGroupsBasionym(java.util.UUID nameUuid) |
protected void |
setDao(ITaxonNameDao dao) |
UpdateResult |
updateCaches(java.lang.Class<? extends TaxonName> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<TaxonName> cacheStrategy,
IProgressMonitor monitor)
(Re-)generate the caches for all objects of this concrete IdentifiableEntity class
|
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, search, switchOfAutoinitializer, switchOnOldAutoInitializer, updateCaches, updateCachesImpl
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
checkPublished, clear, count, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, setApplicationContext, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
search
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, updateCaches
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
clear, count, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, update
@Autowired protected ITermVocabularyDao vocabularyDao
@Autowired protected IOrderedTermVocabularyDao orderedVocabularyDao
@Autowired protected IOccurrenceService occurrenceService
@Autowired protected ICollectionService collectionService
@Autowired protected ITaxonService taxonService
@Autowired @Qualifier(value="refEntDao") protected IReferencedEntityDao<ReferencedEntityBase> referencedEntityDao
@Autowired @Qualifier(value="sourcedEntityDao") protected ISourcedEntityDao<SourcedEntityBase<?>> sourcedEntityDao
@Autowired protected IBeanInitializer defaultBeanInitializer
@Transactional(readOnly=false) public DeleteResult delete(java.util.UUID nameUUID)
IService
delete
in interface IService<TaxonName>
delete
in class ServiceBase<TaxonName,ITaxonNameDao>
public DeleteResult delete(TaxonName name)
delete
in interface IService<TaxonName>
delete
in class ServiceBase<TaxonName,ITaxonNameDao>
@Transactional(readOnly=false) public DeleteResult delete(TaxonName name, NameDeletionConfigurator config)
delete
in interface INameService
@Transactional(readOnly=false) public DeleteResult delete(java.util.UUID nameUUID, NameDeletionConfigurator config)
INameService
null
this method has no effect.delete
in interface INameService
@Transactional(readOnly=false) public UpdateResult cloneTypeDesignation(java.util.UUID nameUuid, SpecimenTypeDesignation baseDesignation, java.lang.String accessionNumber, java.lang.String barcode, java.lang.String catalogNumber, java.util.UUID collectionUuid, SpecimenTypeDesignationStatus typeStatus)
INameService
FieldUnit
cloneTypeDesignation
in interface INameService
baseDesignation
- the type specimen of this designation is cloned to create the new specimenaccessionNumber
- the accession number of the cloned specimenbarcode
- the barcode of the cloned specimencatalogNumber
- the catalog number of the cloned specimencollectionUuid
- the collection the cloned specimen belongs totypeStatus
- the type status of the cloned specimenUpdateResult
@Transactional public DeleteResult deleteTypeDesignation(TaxonName name, TypeDesignationBase<?> typeDesignation)
INameService
typeDesignation
is null
all type designations are deleted
from the given taxon name. If name
is null
all names are removed from
the given type designation. If both are null
nothing happens.deleteTypeDesignation
in interface INameService
@Transactional(readOnly=false) public DeleteResult deleteTypeDesignation(java.util.UUID nameUuid, java.util.UUID typeDesignationUuid)
INameService
typeDesignation
is null
all type designations are deleted
from the given taxon name. If name
is null
all names are removed from
the given type designation. If both are null
nothing happens.deleteTypeDesignation
in interface INameService
@Deprecated public java.util.List<TaxonName> getNamesByNameCache(java.lang.String nameCache)
getNamesByNameCache
in interface INameService
@Deprecated public java.util.List<TaxonName> findNamesByTitleCache(java.lang.String titleCache, MatchMode matchMode, java.util.List<java.lang.String> propertyPaths)
findNamesByTitleCache
in interface INameService
matchMode
- must not be NULL
@Deprecated public java.util.List<TaxonName> findNamesByNameCache(java.lang.String nameCache, MatchMode matchMode, java.util.List<java.lang.String> propertyPaths)
findNamesByNameCache
in interface INameService
public Pager<TaxonNameParts> findTaxonNameParts(java.util.Optional<java.lang.String> genusOrUninomial, java.util.Optional<java.lang.String> infraGenericEpithet, java.util.Optional<java.lang.String> specificEpithet, java.util.Optional<java.lang.String> infraSpecificEpithet, Rank rank, java.util.Set<java.util.UUID> excludedNamesUuids, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<OrderHint> orderHints)
INameService
A query parameter which is passed as NULL
value will be ignored. A parameter passed as Optional
object containing a NULL
value will be used
to filter select taxon names where the according field is null
.
findTaxonNameParts
in interface INameService
rank
- Only names having the specified rank are taken into account.excludedNamesUuids
- Names to be excluded from the result setpublic Pager<TaxonNameParts> findTaxonNameParts(TaxonNamePartsFilter filter, java.lang.String namePartQueryString, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<OrderHint> orderHints)
#findTaxonNameParts(Optional, Optional, Optional, Optional, Rank, Integer, Integer, List)
!
The TaxonNamePartsFilter
defines the rank and fixed name parts for the search process.
For example: In case the rank
is "genus", the genusOrUninomial
will be used as search parameter which needs to match exactly.
The namePartQueryString
will be used to do a wildcard search on the specificEpithet.
For name part lookup purposes the TaxonNameParts
in the result list can be asked to return the relavant name part by
calling TaxonNameParts#nameRankSpecificNamePart(TaxonName)
findTaxonNameParts
in interface INameService
@Transactional(readOnly=false) public java.util.Map<java.util.UUID,HomotypicalGroup> saveAllHomotypicalGroups(java.util.Collection<HomotypicalGroup> homotypicalGroups)
saveAllHomotypicalGroups
in interface INameService
@Transactional(readOnly=false) public java.util.Map<java.util.UUID,TypeDesignationBase<?>> saveTypeDesignationAll(java.util.Collection<TypeDesignationBase<?>> typeDesignationCollection)
saveTypeDesignationAll
in interface INameService
public java.util.List<NomenclaturalStatus> getAllNomenclaturalStatus(int limit, int start)
getAllNomenclaturalStatus
in interface INameService
public NomenclaturalStatus loadNomenclaturalStatus(java.util.UUID uuid, java.util.List<java.lang.String> propertyPaths)
loadNomenclaturalStatus
in interface INameService
public java.util.List<TypeDesignationBase<?>> getAllTypeDesignations(int limit, int start)
getAllTypeDesignations
in interface INameService
public TypeDesignationBase<?> loadTypeDesignation(int id, java.util.List<java.lang.String> propertyPaths)
loadTypeDesignation
in interface INameService
public TypeDesignationBase<?> loadTypeDesignation(java.util.UUID uuid, java.util.List<java.lang.String> propertyPaths)
loadTypeDesignation
in interface INameService
public java.util.List<HomotypicalGroup> getAllHomotypicalGroups(int limit, int start)
getAllHomotypicalGroups
in interface INameService
public java.util.List<NameRelationship> listNameRelationships(java.util.Set<NameRelationshipType> types, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
INameService.listHybridRelationships(Set, Integer, Integer, List, List)
)listNameRelationships
in interface INameService
types
- The name relationship type filter, if null
no filter is set, if empty the result will also be emptypageSize
- the page sizeorderHints
- the order hintspropertyPaths
- the property path to initialize the resulting objectspublic java.util.List<HybridRelationship> listHybridRelationships(java.util.Set<HybridRelationshipType> types, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
INameService.listNameRelationships(Set, Integer, Integer, List, List)
)listHybridRelationships
in interface INameService
types
- The hybrid relationship type filter, if null
no filter is set, if empty the result will also be emptypageSize
- the page sizeorderHints
- the order hintspropertyPaths
- the property path to initialize the resulting objects@Autowired protected void setDao(ITaxonNameDao dao)
setDao
in class ServiceBase<TaxonName,ITaxonNameDao>
public Pager<HybridRelationship> getHybridNames(INonViralName name, HybridRelationshipType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
getHybridNames
in interface INameService
name
- the nametype
- the hybrid relationship type (or null to return all hybrids)pageSize
- The maximum number of hybrid relationships returned (can be null for all relationships)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public java.util.List<NameRelationship> listNameRelationships(TaxonName name, RelationshipBase.Direction direction, NameRelationshipType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
listNameRelationships
in interface INameService
name
- the name on either the "from side" or on the
"to side" of the relationship, depending on the
direction
of the relationship.direction
- the direction of the NameRelationship, may be null to return all relationshipstype
- the relationship type (or null to return all relationships)pageSize
- The maximum number of relationships returned (can be null for
all relationships)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see
IBeanInitializer.initialize(Object, List)
protected LuceneSearch prepareFindByFuzzyNameSearch(java.lang.Class<? extends CdmBase> clazz, INonViralName nvn, float accuracy, int maxNoOfResults, java.util.List<Language> languages, boolean highlightFragments)
protected LuceneSearch prepareFindByFuzzyNameCacheSearch(java.lang.Class<? extends CdmBase> clazz, java.lang.String name, float accuracy, int maxNoOfResults, java.util.List<Language> languages, boolean highlightFragments)
protected LuceneSearch prepareFindByExactNameSearch(java.lang.Class<? extends CdmBase> clazz, java.lang.String name, boolean wildcard, java.util.List<Language> languages, boolean highlightFragments)
public java.util.List<SearchResult<TaxonName>> findByNameFuzzySearch(java.lang.String name, float accuracy, java.util.List<Language> languages, boolean highlightFragments, java.util.List<java.lang.String> propertyPaths, int maxNoOfResults) throws java.io.IOException, LuceneParseException
INameService
NonViralNameParserImpl
into its separate parts (genusOrUninomial,infraGenericEpithet,specificEpithet,infraGenericEpithet,authorshipCache).
Each field is then matched separately with the same accuracy parameter.findByNameFuzzySearch
in interface INameService
name
- taxon name to fuzzy matchaccuracy
- value > 0.0 and < 1.0 which determines the accuracy of the result.languages
- list of languages to consider when matching (currently not used)java.io.IOException
LuceneParseException
public java.util.List<DocumentSearchResult> findByNameFuzzySearch(java.lang.String name, float accuracy, java.util.List<Language> languages, boolean highlightFragments, int maxNoOfResults) throws java.io.IOException, LuceneParseException
INameService
NonViralNameParserImpl
into its separate parts (genusOrUninomial,infraGenericEpithet,specificEpithet,infraGenericEpithet,authorshipCache).
Each field is then matched separately with the same accuracy parameter.findByNameFuzzySearch
in interface INameService
name
- taxon name to fuzzy matchaccuracy
- value > 0.0 and < 1.0 which determines the accuracy of the result.languages
- list of languages to consider when matching (currently not used)java.io.IOException
LuceneParseException
public java.util.List<DocumentSearchResult> findByFuzzyNameCacheSearch(java.lang.String name, float accuracy, java.util.List<Language> languages, boolean highlightFragments, int maxNoOfResults) throws java.io.IOException, LuceneParseException
INameService
findByFuzzyNameCacheSearch
in interface INameService
name
- taxon name to fuzzy matchaccuracy
- value > 0.0 and < 1.0 which determines the accuracy of the result.languages
- list of languages to consider when matching (currently not used)java.io.IOException
LuceneParseException
public java.util.List<DocumentSearchResult> findByNameExactSearch(java.lang.String name, boolean wildcard, java.util.List<Language> languages, boolean highlightFragments, int maxNoOfResults) throws java.io.IOException, LuceneParseException
INameService
NonViralNameParserImpl
into its separate parts (genusOrUninomial,infraGenericEpithet,specificEpithet,infraGenericEpithet,authorshipCache).
Each field is then matched separately with the same accuracy parameter.findByNameExactSearch
in interface INameService
name
- taxon name to fuzzy matchwildcard
- boolean flag to indicate whether a wildcard '*' should be added at the end of the querylanguages
- list of languages to consider when matching (currently not used)java.io.IOException
LuceneParseException
public Pager<NameRelationship> pageNameRelationships(TaxonName name, RelationshipBase.Direction direction, NameRelationshipType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
pageNameRelationships
in interface INameService
name
- the name on the "from side" of the relationshipdirection
- the direction of the NameRelationshiptype
- the relationship type (or null to return all relationships)pageSize
- The maximum number of relationships returned (can be null for all relationships)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public java.util.List<NameRelationship> listFromNameRelationships(TaxonName name, NameRelationshipType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
listFromNameRelationships
in interface INameService
name
- the name on the "from side" of the relationshiptype
- the relationship type (or null to return all relationships)pageSize
- The maximum number of relationships returned (can be null for all relationships)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public Pager<NameRelationship> pageFromNameRelationships(TaxonName name, NameRelationshipType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
pageFromNameRelationships
in interface INameService
name
- the name on the "from side" of the relationshiptype
- the relationship type (or null to return all relationships)pageSize
- The maximum number of relationships returned (can be null for all relationships)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public java.util.List<NameRelationship> listToNameRelationships(TaxonName name, NameRelationshipType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
listToNameRelationships
in interface INameService
name
- the name on the "to side" of the relationshiptype
- the relationship type (or null to return all relationships)pageSize
- The maximum number of relationships returned (can be null for all relationships)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public Pager<NameRelationship> pageToNameRelationships(TaxonName name, NameRelationshipType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
pageToNameRelationships
in interface INameService
name
- the name on the "to side" of the relationshiptype
- the relationship type (or null to return all relationships)pageSize
- The maximum number of relationships returned (can be null for all relationships)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public Pager<TypeDesignationBase> getTypeDesignations(TaxonName name, SpecimenTypeDesignationStatus status, java.lang.Integer pageSize, java.lang.Integer pageNumber)
INameService
getTypeDesignations
in interface INameService
name
- the namestatus
- the type designation status (or null to return all types)pageSize
- The maximum number of types returned (can be null for all types)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public Pager<TypeDesignationBase> getTypeDesignations(TaxonName name, SpecimenTypeDesignationStatus status, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
getTypeDesignations
in interface INameService
public java.util.List<TypeDesignationBase> getTypeDesignationsInHomotypicalGroup(java.util.UUID nameUuid, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
getTypeDesignationsInHomotypicalGroup
in interface INameService
public Pager<TaxonName> searchNames(java.lang.String uninomial, java.lang.String infraGenericEpithet, java.lang.String specificEpithet, java.lang.String infraspecificEpithet, Rank rank, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
searchNames
in interface INameService
pageSize
- The maximum number of names returned (can be null for all names)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public java.util.List<UuidAndTitleCache> getUuidAndTitleCacheOfNames(java.lang.Integer limit, java.lang.String pattern)
INameService
getUuidAndTitleCacheOfNames
in interface INameService
Map
containing uuid and titleCache of namespublic Pager<TaxonName> findByName(java.lang.Class<TaxonName> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criteria, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
INameService
findByName
in interface INameService
clazz
- filter by class - can be null to include all instances of type TqueryString
- the query string to filter bymatchmode
- use a particular type of matching (can be null - defaults to exact matching)criteria
- additional criteria to filter bypageSize
- The maximum number of objects returned (can be null for all objects)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public java.util.List<TaxonName> findByFullTitle(java.lang.Class<TaxonName> clazz, java.lang.String queryString, MatchMode matchmode, java.util.List<org.hibernate.criterion.Criterion> criteria, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
findByFullTitle
in interface INameService
public HomotypicalGroup findHomotypicalGroup(java.util.UUID uuid)
INameService
findHomotypicalGroup
in interface INameService
uuid
- the uuid of the homotypical group@Transactional(readOnly=false) public UpdateResult updateCaches(java.lang.Class<? extends TaxonName> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<TaxonName> cacheStrategy, IProgressMonitor monitor)
IIdentifiableEntityService
updateCaches
in interface IIdentifiableEntityService<TaxonName>
clazz
- class of objects to be updatedstepSize
- number of objects loaded per step. If null
use default.cacheStrategy
- cache strategy used for cache generation. If null
use default.monitor
- progress monitor. If null
use default.public java.util.List<TaggedText> getTaggedName(java.util.UUID uuid)
getTaggedName
in interface INameService
public DeleteResult isDeletable(TaxonName name, DeleteConfiguratorBase config)
public DeleteResult isDeletable(java.util.UUID nameUUID, DeleteConfiguratorBase config)
VersionableServiceBase
isDeletable
in interface IVersionableService<TaxonName>
isDeletable
in class VersionableServiceBase<TaxonName,ITaxonNameDao>
@Transactional(readOnly=true) public UpdateResult setAsGroupsBasionym(java.util.UUID nameUuid)
setAsGroupsBasionym
in interface INameService
public java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> getNameRecords()
getNameRecords
in interface INameService
public java.util.List<TypeDesignationStatusBase> getTypeDesignationStatusInUse()
getTypeDesignationStatusInUse
in interface INameService
public java.util.Collection<TypeDesignationStatusFilter> getTypeDesignationStatusFilterTerms(java.util.List<Language> preferredLanguages)
INameService
getTypeDesignationStatusFilterTerms
in interface INameService
public <S extends TaxonName> Pager<S> page(java.lang.Class<S> clazz, java.util.List<Restriction<?>> restrictions, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
page
in interface IService<TaxonName>
page
in class ServiceBase<TaxonName,ITaxonNameDao>
public <S extends TaxonName> Pager<S> page(java.lang.Class<S> clazz, java.util.List<Restriction<?>> restrictions, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths, boolean includeUnpublished)
page
in interface INameService
public java.util.List<UuidAndTitleCache> getUuidAndTitleCacheOfSynonymy(java.lang.Integer limit, java.util.UUID taxonUuid)
INameService
getUuidAndTitleCacheOfSynonymy
in interface INameService
Copyright © 2007-2020 EDIT. All Rights Reserved.