@Service @Transactional(readOnly=true) public class TaxonServiceImpl extends IdentifiableServiceBase<TaxonBase,ITaxonDao> implements ITaxonService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INFERRED_EPITHET_NAMESPACE |
static java.lang.String |
INFERRED_GENUS_NAMESPACE |
static java.lang.String |
POTENTIAL_COMBINATION_NAMESPACE |
UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
TaxonServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
changeHomotypicalGroupOfSynonym(Synonym synonym,
HomotypicalGroup newHomotypicalGroup,
Taxon targetTaxon,
boolean setBasionymRelationIfApplicable)
Changes the homotypic group of a synonym into the new homotypic group.
|
UpdateResult |
changeRelatedTaxonToSynonym(Taxon fromTaxon,
Taxon toTaxon,
TaxonRelationshipType oldRelationshipType,
SynonymType synonymType)
Change a related concept into synonym
|
UpdateResult |
changeRelatedTaxonToSynonym(java.util.UUID fromTaxonUuid,
java.util.UUID toTaxonUuid,
TaxonRelationshipType oldRelationshipType,
SynonymType synonymType) |
UpdateResult |
changeSynonymToAcceptedTaxon(Synonym synonym,
Taxon acceptedTaxon,
boolean deleteSynonym)
Changes a synonym into an accepted taxon and removes
the synonym relationship to the given accepted taxon.
|
UpdateResult |
changeSynonymToAcceptedTaxon(java.util.UUID synonymUuid,
java.util.UUID acceptedTaxonUuid,
java.util.UUID newParentNodeUuid,
boolean deleteSynonym) |
UpdateResult |
changeSynonymToRelatedTaxon(Synonym synonym,
Taxon toTaxon,
TaxonRelationshipType taxonRelationshipType,
Reference citation,
java.lang.String microcitation)
Change a synonym into a related concept
|
UpdateResult |
changeSynonymToRelatedTaxon(java.util.UUID synonymUuid,
java.util.UUID toTaxonUuid,
TaxonRelationshipType taxonRelationshipType,
Reference citation,
java.lang.String microcitation) |
long |
countSynonyms(boolean onlyAttachedToTaxon)
Counts the number of synonyms
|
java.util.List<Synonym> |
createAllInferredSynonyms(Taxon taxon,
Classification tree,
boolean doWithMisappliedNames)
Creates all inferred synonyms for the taxon in the classification, but do not insert it to the database
|
protected org.apache.lucene.search.Query |
createByDistributionJoinQuery(java.util.List<NamedArea> namedAreaList,
java.util.List<PresenceAbsenceTerm> distributionStatusList,
QueryFactory queryFactory,
java.lang.Class<? extends CdmBase> toType,
boolean asFilter) |
java.util.List<Synonym> |
createInferredSynonyms(Taxon taxon,
Classification classification,
SynonymType type,
boolean doWithMisappliedNames)
Creates the specified inferred synonyms for the taxon in the classification, but do not insert it to the database
|
DeleteResult |
delete(java.util.UUID synUUID)
Delete an existing persistent object
|
DeleteResult |
deleteSynonym(Synonym synonym,
SynonymDeletionConfigurator config)
Removes a synonym.
In detail it removes the synonym concept If removeNameIfPossible is true
it also removes the synonym name if it is not used in any other context
(part of a concept, in DescriptionElementSource, part of a name relationship, used inline, ...)If newHomotypicGroupIfNeeded is true and the synonym name
is not deleted and the name is homotypic to the taxon
the name is moved to a new homotypic group.If synonym is null the method has no effect. |
DeleteResult |
deleteSynonym(java.util.UUID synonymUuid,
SynonymDeletionConfigurator config)
Removes a synonym.
|
DeleteResult |
deleteTaxon(java.util.UUID taxonUUID,
TaxonDeletionConfigurator config,
java.util.UUID classificationUuid) |
Taxon |
findAcceptedTaxonFor(java.util.UUID synonymUuid,
java.util.UUID classificationUuid,
boolean includeUnpublished,
java.util.List<java.lang.String> propertyPaths) |
Synonym |
findBestMatchingSynonym(java.lang.String taxonName,
boolean includeUnpublished) |
Taxon |
findBestMatchingTaxon(MatchingTaxonConfigurator config) |
Taxon |
findBestMatchingTaxon(java.lang.String taxonName) |
Pager<SearchResult<TaxonBase>> |
findByDescriptionElementFullText(java.lang.Class<? extends DescriptionElementBase> clazz,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
java.util.List<Feature> features,
java.util.List<Language> languages,
boolean highlightFragments,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Searches for TaxonBase instances by using the DescriptionElement free text index.
|
Pager<SearchResult<TaxonBase>> |
findByDistribution(java.util.List<NamedArea> areaFilter,
java.util.List<PresenceAbsenceTerm> statusFilter,
Classification classification,
TaxonNode subtree,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
Pager<SearchResult<TaxonBase>> |
findByEverythingFullText(java.lang.String queryString,
Classification classification,
TaxonNode subtree,
boolean includeUnpublished,
java.util.List<Language> languages,
boolean highlightFragments,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
performes a union searches for TaxonBase instances on all available
free text indexes.
|
Pager<SearchResult<TaxonBase>> |
findByFullText(java.lang.Class<? extends TaxonBase> clazz,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
boolean includeUnpublished,
java.util.List<Language> languages,
boolean highlightFragments,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Searches for TaxonBase instances using the TaxonBase free text index.
|
<S extends TaxonBase> |
findByIdentifier(java.lang.Class<S> clazz,
java.lang.String identifier,
DefinedTerm identifierType,
TaxonNode subtreeFilter,
MatchMode matchmode,
boolean includeEntity,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
<S extends TaxonBase> |
findByMarker(java.lang.Class<S> clazz,
MarkerType markerType,
java.lang.Boolean markerValue,
TaxonNode subtreeFilter,
boolean includeEntity,
TaxonTitleType titleType,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
|
java.util.Map<java.lang.String,java.util.Map<java.util.UUID,java.util.Set<TaxonName>>> |
findIdenticalTaxonNames(java.util.List<java.util.UUID> sourceRefUuids,
java.util.List<java.lang.String> propertyPaths)
Returns a map of taxon names that have identical name caches but derive from different sources.
|
Pager<IdentifiableEntity> |
findTaxaAndNames(IFindTaxaAndNamesConfigurator configurator)
Returns a list of IdentifiableEntity instances (in particular, TaxonName and TaxonBase instances)
that match the properties specified in the configurator.
|
Pager<SearchResult<TaxonBase>> |
findTaxaAndNamesByFullText(java.util.EnumSet<TaxaAndNamesSearchMode> searchModes,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
java.util.Set<NamedArea> namedAreas,
java.util.Set<PresenceAbsenceTerm> distributionStatus,
java.util.List<Language> languages,
boolean highlightFragments,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Searches for TaxonBase instances using the TaxonBase free text index.
|
java.util.List<UuidAndTitleCache<? extends IdentifiableEntity>> |
findTaxaAndNamesForEditor(IFindTaxaAndNamesConfigurator config) |
java.util.List<TaxonBase> |
findTaxaByID(java.util.Set<java.lang.Integer> listOfIDs) |
Pager<TaxonBase> |
findTaxaByName(java.lang.Class<? extends TaxonBase> clazz,
java.lang.String uninomial,
java.lang.String infragenericEpithet,
java.lang.String specificEpithet,
java.lang.String infraspecificEpithet,
java.lang.String authorshipCache,
Rank rank,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a list of TaxonBase instances where the
taxon.name properties match the parameters passed.
|
java.util.List<TaxonBase> |
findTaxaByName(MatchingTaxonConfigurator config) |
TaxonBase |
findTaxonByUuid(java.util.UUID uuid,
java.util.List<java.lang.String> propertyPaths)
Returns the TaxonBase with the given UUID
using the given match mode and initialization strategy
|
java.util.List<java.util.List<Synonym>> |
getHeterotypicSynonymyGroups(Taxon taxon,
java.util.List<java.lang.String> propertyPaths)
Returns the ordered list of all
homotypical groups
that contain synonyms that are heterotypic to the given taxon. |
java.util.List<Synonym> |
getHomotypicSynonymsByHomotypicGroup(Taxon taxon,
java.util.List<java.lang.String> propertyPaths)
Returns the list of all synonyms that share the same homotypical group with the given taxon.
|
Pager<Synonym> |
getSynonyms(Taxon taxon,
SynonymType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns the Synonyms (with the given synonym relationship type, if this argument is supplied)
that do have the supplied taxon as accepted taxon.
|
java.util.List<java.util.List<Synonym>> |
getSynonymsByHomotypicGroup(Taxon taxon,
java.util.List<java.lang.String> propertyPaths)
This method returns in the first entry the list of synonyms of the
homotypic group of the accepted taxon.
|
java.util.List<UuidAndTitleCache<TaxonBase>> |
getTaxonUuidAndTitleCache(java.lang.Integer limit,
java.lang.String pattern) |
<T extends TaxonBase> |
getUuidAndTitleCache(java.lang.Class<T> clazz,
java.lang.Integer limit,
java.lang.String pattern)
Like
IIdentifiableEntityService.getUuidAndTitleCache(Integer, String) but searching only on a subclass
of the type handled by the DAO. |
DeleteResult |
isDeletable(java.util.UUID taxonBaseUuid,
DeleteConfiguratorBase config)
the basic isDeletable method return false if the object is referenced from any other object.
|
java.util.List<Classification> |
listClassifications(TaxonBase taxonBase,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<java.lang.String> propertyPaths)
Lists all classifications the given taxon/synonym is used in
Synonym |
java.util.List<TaxonRelationship> |
listFromTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
boolean includeUnpublished,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns the TaxonRelationships (of where relationship.type == type, if this argument is supplied)
where the supplied taxon is relatedFrom.
|
IncludedTaxaDTO |
listIncludedTaxa(java.util.UUID taxonUuid,
IncludedTaxonConfiguration config)
|
java.util.List<Media> |
listMedia(Taxon taxon,
java.util.Set<TaxonRelationshipEdge> includeRelationships,
java.lang.Boolean limitToGalleries,
java.lang.Boolean includeTaxonDescriptions,
java.lang.Boolean includeOccurrences,
java.lang.Boolean includeTaxonNameDescriptions,
java.util.List<java.lang.String> propertyPath)
Lists all Media found in an any TaxonDescription, NameDescription,
SpecimenOrObservationBase, DnaSample Chromatograms, etc.
|
java.util.Set<Taxon> |
listRelatedTaxa(Taxon taxon,
java.util.Set<TaxonRelationshipEdge> includeRelationships,
java.lang.Integer maxDepth,
boolean includeUnpublished,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<java.lang.String> propertyPaths)
lists all taxa which are related to the
taxon given as
parameter. |
java.util.List<TaxonBase> |
listTaxaByName(java.lang.Class<? extends TaxonBase> clazz,
java.lang.String uninomial,
java.lang.String infragenericEpithet,
java.lang.String specificEpithet,
java.lang.String infraspecificEpithet,
java.lang.String authorshipCache,
Rank rank,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a list of TaxonBase instances where the
taxon.name properties match the parameters passed.
|
java.util.List<Media> |
listTaxonDescriptionMedia(Taxon taxon,
java.util.Set<TaxonRelationshipEdge> includeRelationships,
boolean limitToGalleries,
java.util.List<java.lang.String> propertyPath)
Lists all Media found in an any TaxonDescription associated with this
taxon.
|
java.util.List<TaxonRelationship> |
listTaxonRelationships(java.util.Set<TaxonRelationshipType> 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 concept relationships in the database.
|
TaxonRelationshipsDTO |
listTaxonRelationships(java.util.UUID taxonUuid,
java.util.Set<TaxonRelationshipType> directTypes,
java.util.Set<TaxonRelationshipType> inversTypes,
RelationshipBase.Direction direction,
boolean groupMisapplications,
boolean includeUnpublished,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Returns a list of taxon relationships for a given taxon as DTO.
|
java.util.List<TaxonRelationship> |
listToTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
boolean includeUnpublished,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns the TaxonRelationships (of where relationship.type == type, if this argument is supplied)
where the supplied taxon is relatedTo.
|
TaxonBase |
load(java.util.UUID uuid,
boolean includeUnpublished,
java.util.List<java.lang.String> propertyPaths)
Like
#load(int, List) but allows loading unpublished taxa |
UpdateResult |
moveFactualDateToAnotherTaxon(java.util.UUID fromTaxonUuid,
java.util.UUID toTaxonUuid) |
UpdateResult |
moveSynonymToAnotherTaxon(Synonym oldSynonym,
Taxon newTaxon,
boolean moveHomotypicGroup,
SynonymType newSynonymType)
|
UpdateResult |
moveSynonymToAnotherTaxon(Synonym oldSynonym,
Taxon newTaxon,
boolean moveHomotypicGroup,
SynonymType newSynonymType,
Reference newSecundum,
java.lang.String newSecundumDetail,
boolean keepSecundumIfUndefined)
Moves a synonym to another taxon and removes the old synonym relationship.
|
UpdateResult |
moveSynonymToAnotherTaxon(Synonym oldSynonym,
java.util.UUID newTaxonUUID,
boolean moveHomotypicGroup,
SynonymType newSynonymType,
Reference newSecundum,
java.lang.String newSecundumDetail,
boolean keepSecundumIfUndefined) |
<S extends TaxonBase> |
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 TaxonBase> |
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<TaxonRelationship> |
pageFromTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
boolean includeUnpublished,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns the TaxonRelationships (of where relationship.type == type, if this argument is supplied)
where the supplied taxon is relatedFrom.
|
Pager<TaxonRelationship> |
pageToTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
boolean includeUnpublished,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns the TaxonRelationships (of where relationship.type == type, if this arguement is supplied)
where the supplied taxon is relatedTo.
|
protected LuceneSearch |
prepareByDescriptionElementFullTextSearch(java.lang.Class<? extends CdmBase> clazz,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
java.util.List<Feature> features,
java.util.List<Language> languages,
boolean highlightFragments) |
protected LuceneSearch |
prepareByDistributionSearch(java.util.List<NamedArea> namedAreaList,
java.util.List<PresenceAbsenceTerm> distributionStatusList,
Classification classification,
TaxonNode subtree)
This method has been primarily created for testing the area join query but might
also be useful in other situations
|
protected LuceneSearch |
prepareFindByFullTextSearch(java.lang.Class<? extends CdmBase> clazz,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
java.lang.String className,
boolean includeUnpublished,
java.util.List<Language> languages,
boolean highlightFragments,
org.apache.lucene.search.SortField[] sortFields) |
protected LuceneSearch |
prepareFindByTaxonRelationFullTextSearch(TaxonRelationshipEdge edge,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
boolean includeUnpublished,
java.util.List<Language> languages,
boolean highlightFragments,
org.apache.lucene.search.SortField[] sortFields)
Uses org.apache.lucene.search.join.JoinUtil for query time joining, alternatively
the BlockJoinQuery could be used.
|
java.util.List<TaxonBase> |
searchByName(java.lang.String name,
boolean includeUnpublished,
Reference sec)
Returns a list of taxa that matches the name string and the sec reference
|
protected void |
setDao(ITaxonDao dao) |
UpdateResult |
swapSynonymAndAcceptedTaxon(Synonym synonym,
Taxon acceptedTaxon,
boolean setNameInSource)
Swaps given synonym and accepted taxon.
|
UpdateResult |
swapSynonymAndAcceptedTaxon(java.util.UUID synonymUUid,
java.util.UUID acceptedTaxonUuid,
boolean setNameInSource) |
UpdateResult |
updateCaches(java.lang.Class<? extends TaxonBase> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<TaxonBase> 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, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, search, switchOfAutoinitializer, switchOnOldAutoInitializer, updateCaches, updateCachesImpl
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
checkPublished, clear, count, delete, 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
load, search
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, updateCaches
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
clear, count, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, update
public static final java.lang.String POTENTIAL_COMBINATION_NAMESPACE
public static final java.lang.String INFERRED_EPITHET_NAMESPACE
public static final java.lang.String INFERRED_GENUS_NAMESPACE
public TaxonBase load(java.util.UUID uuid, boolean includeUnpublished, java.util.List<java.lang.String> propertyPaths)
#load(int, List)
but allows loading unpublished taxaload
in interface IPublishableService<TaxonBase>
#load(UUID, List)
public java.util.List<TaxonBase> searchByName(java.lang.String name, boolean includeUnpublished, Reference sec)
ITaxonService
searchByName
in interface ITaxonService
name
- the name string to search forsec
- the taxons sec reference@Transactional(readOnly=false) public UpdateResult swapSynonymAndAcceptedTaxon(Synonym synonym, Taxon acceptedTaxon, boolean setNameInSource)
ITaxonService
swapSynonymAndAcceptedTaxon
in interface ITaxonService
@Transactional(readOnly=false) public UpdateResult changeSynonymToAcceptedTaxon(Synonym synonym, Taxon acceptedTaxon, boolean deleteSynonym)
ITaxonService
changeSynonymToAcceptedTaxon
in interface ITaxonService
synonym
- the synonym to change into an accepted taxonacceptedTaxon
- an accepted taxon, the synonym had a relationship todeleteSynonym
- if true the method tries to delete the old synonym from the database@Transactional(readOnly=false) public UpdateResult changeSynonymToAcceptedTaxon(java.util.UUID synonymUuid, java.util.UUID acceptedTaxonUuid, java.util.UUID newParentNodeUuid, boolean deleteSynonym)
changeSynonymToAcceptedTaxon
in interface ITaxonService
@Transactional(readOnly=false) public UpdateResult changeSynonymToRelatedTaxon(java.util.UUID synonymUuid, java.util.UUID toTaxonUuid, TaxonRelationshipType taxonRelationshipType, Reference citation, java.lang.String microcitation)
changeSynonymToRelatedTaxon
in interface ITaxonService
@Transactional(readOnly=false) public UpdateResult changeSynonymToRelatedTaxon(Synonym synonym, Taxon toTaxon, TaxonRelationshipType taxonRelationshipType, Reference citation, java.lang.String microcitation)
ITaxonService
changeSynonymToRelatedTaxon
in interface ITaxonService
synonym
- the synonym to change into the concept taxontoTaxon
- the taxon the newly created concept should be related totaxonRelationshipType
- the type of relationship@Transactional(readOnly=false) public void changeHomotypicalGroupOfSynonym(Synonym synonym, HomotypicalGroup newHomotypicalGroup, Taxon targetTaxon, boolean setBasionymRelationIfApplicable)
ITaxonService
targetTaxon
is defined, the synonym is
added to this taxon irrespctive of if it has been related to this
taxon before.setBasionymRelationIfApplicable
is true a basionym relationship
between the existing basionym(s) of the new homotypic group and the synonyms name
is added.changeHomotypicalGroupOfSynonym
in interface ITaxonService
@Transactional(readOnly=false) public UpdateResult updateCaches(java.lang.Class<? extends TaxonBase> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<TaxonBase> cacheStrategy, IProgressMonitor monitor)
IIdentifiableEntityService
updateCaches
in interface IIdentifiableEntityService<TaxonBase>
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.@Autowired protected void setDao(ITaxonDao dao)
setDao
in class ServiceBase<TaxonBase,ITaxonDao>
public Pager<TaxonBase> findTaxaByName(java.lang.Class<? extends TaxonBase> clazz, java.lang.String uninomial, java.lang.String infragenericEpithet, java.lang.String specificEpithet, java.lang.String infraspecificEpithet, java.lang.String authorshipCache, Rank rank, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
ITaxonService
findTaxaByName
in interface ITaxonService
clazz
- optionally filter by class (can be null to return all taxa)pageSize
- The maximum number of taxa returned (can be null for all matching taxa)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public java.util.List<TaxonBase> listTaxaByName(java.lang.Class<? extends TaxonBase> clazz, java.lang.String uninomial, java.lang.String infragenericEpithet, java.lang.String specificEpithet, java.lang.String infraspecificEpithet, java.lang.String authorshipCache, Rank rank, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
ITaxonService
listTaxaByName
in interface ITaxonService
clazz
- optionally filter by classpageSize
- The maximum number of taxa returned (can be null for all matching taxa)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public java.util.List<TaxonRelationship> listToTaxonRelationships(Taxon taxon, TaxonRelationshipType type, boolean includeUnpublished, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ITaxonService
listToTaxonRelationships
in interface ITaxonService
taxon
- The taxon that is relatedTotype
- The type of TaxonRelationship (can be null)includeUnpublished
- should unpublished related taxa also be returned?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
- Properties to order bypropertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public Pager<TaxonRelationship> pageToTaxonRelationships(Taxon taxon, TaxonRelationshipType type, boolean includeUnpublished, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ITaxonService
pageToTaxonRelationships
in interface ITaxonService
taxon
- The taxon that is relatedTotype
- The type of TaxonRelationship (can be null)includeUnpublished
- should unpublished related taxa also be returned?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
- Properties to order bypropertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public java.util.List<TaxonRelationship> listFromTaxonRelationships(Taxon taxon, TaxonRelationshipType type, boolean includeUnpublished, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ITaxonService
listFromTaxonRelationships
in interface ITaxonService
taxon
- The taxon that is relatedFromtype
- The type of TaxonRelationship (can be null)includeUnpublished
- should unpublished related taxa also be returned?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
- Properties to order bypropertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public Pager<TaxonRelationship> pageFromTaxonRelationships(Taxon taxon, TaxonRelationshipType type, boolean includeUnpublished, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ITaxonService
pageFromTaxonRelationships
in interface ITaxonService
taxon
- The taxon that is relatedFromtype
- The type of TaxonRelationship (can be null)includeUnpublished
- should unpublished related taxa also be returned?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
- Properties to order bypropertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public java.util.List<TaxonRelationship> listTaxonRelationships(java.util.Set<TaxonRelationshipType> types, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ITaxonService
listTaxonRelationships
in interface ITaxonService
types
- The taxon 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 <S extends TaxonBase> 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)
public <S extends TaxonBase> 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 ITaxonService
public Taxon findAcceptedTaxonFor(java.util.UUID synonymUuid, java.util.UUID classificationUuid, boolean includeUnpublished, java.util.List<java.lang.String> propertyPaths) throws UnpublishedException
findAcceptedTaxonFor
in interface ITaxonService
UnpublishedException
public java.util.Set<Taxon> listRelatedTaxa(Taxon taxon, java.util.Set<TaxonRelationshipEdge> includeRelationships, java.lang.Integer maxDepth, boolean includeUnpublished, java.lang.Integer limit, java.lang.Integer start, java.util.List<java.lang.String> propertyPaths)
ITaxonService
taxon
given as
parameter.listRelatedTaxa
in interface ITaxonService
maxDepth
- 1
for one level, null
for infinite
depth, 0
will completely omit collecting related taxa.public Pager<Synonym> getSynonyms(Taxon taxon, SynonymType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ITaxonService
getSynonyms
in interface ITaxonService
taxon
- The accepted taxontype
- The type of Synonym (can be null)pageSize
- The maximum number of synonyms returned (can be null for returning synonyms)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)
* @param orderHints Properties to order bypropertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
Synonym
instancespublic java.util.List<java.util.List<Synonym>> getSynonymsByHomotypicGroup(Taxon taxon, java.util.List<java.lang.String> propertyPaths)
ITaxonService
ITaxonService.getHomotypicSynonymsByHomotypicGroup(Taxon, List)
and
ITaxonService.getHeterotypicSynonymyGroups(Taxon, List)
getSynonymsByHomotypicGroup
in interface ITaxonService
taxon
- the accepted taxonpropertyPaths
- the property path#getSynonyms()
,
SynonymType.HETEROTYPIC_SYNONYM_OF()
,
HomotypicalGroup
public java.util.List<Synonym> getHomotypicSynonymsByHomotypicGroup(Taxon taxon, java.util.List<java.lang.String> propertyPaths)
ITaxonService
getHomotypicSynonymsByHomotypicGroup
in interface ITaxonService
public java.util.List<java.util.List<Synonym>> getHeterotypicSynonymyGroups(Taxon taxon, java.util.List<java.lang.String> propertyPaths)
ITaxonService
homotypical groups
that contain synonyms
that are heterotypic to the given taxon.
Taxon names
of heterotypic synonyms
belong to a homotypical group which cannot be the homotypical group to which the
taxon name of the given taxon belongs. This method does not return the homotypic group the given
taxon belongs to.getHeterotypicSynonymyGroups
in interface ITaxonService
#getHeterotypicSynonymyGroups()
,
#getSynonyms()
,
SynonymType.HETEROTYPIC_SYNONYM_OF()
,
HomotypicalGroup
public java.util.List<UuidAndTitleCache<? extends IdentifiableEntity>> findTaxaAndNamesForEditor(IFindTaxaAndNamesConfigurator config)
findTaxaAndNamesForEditor
in interface ITaxonService
public Pager<IdentifiableEntity> findTaxaAndNames(IFindTaxaAndNamesConfigurator configurator)
ITaxonService
findTaxaAndNames
in interface ITaxonService
public java.util.List<UuidAndTitleCache<TaxonBase>> getTaxonUuidAndTitleCache(java.lang.Integer limit, java.lang.String pattern)
public java.util.List<Media> listTaxonDescriptionMedia(Taxon taxon, java.util.Set<TaxonRelationshipEdge> includeRelationships, boolean limitToGalleries, java.util.List<java.lang.String> propertyPath)
ITaxonService
listTaxonDescriptionMedia
in interface ITaxonService
includeRelationships
- the given list of TaxonRelationshipEdges will be taken into
account when retrieving media associated with the given taxon.
Can be NULL.limitToGalleries
- whether to take only TaxonDescription into account which are
marked as gallerypublic java.util.List<Media> listMedia(Taxon taxon, java.util.Set<TaxonRelationshipEdge> includeRelationships, java.lang.Boolean limitToGalleries, java.lang.Boolean includeTaxonDescriptions, java.lang.Boolean includeOccurrences, java.lang.Boolean includeTaxonNameDescriptions, java.util.List<java.lang.String> propertyPath)
ITaxonService
listMedia
in interface ITaxonService
includeRelationships
- the given list of TaxonRelationshipEdges will be taken into
account when retrieving media associated with the given taxon.
Can be NULL.limitToGalleries
- whether to take only descriptions into account which are
marked as gallery, can be NULLincludeTaxonDescriptions
- whether to take TaxonDescriptions into account, can be NULLincludeOccurrences
- whether to take TaxonDescriptions into account, can be NULLincludeTaxonNameDescriptions
- whether to take TaxonNameDescriptions into account, can be NULLpublic java.util.List<TaxonBase> findTaxaByID(java.util.Set<java.lang.Integer> listOfIDs)
findTaxaByID
in interface ITaxonService
public TaxonBase findTaxonByUuid(java.util.UUID uuid, java.util.List<java.lang.String> propertyPaths)
ITaxonService
findTaxonByUuid
in interface ITaxonService
public long countSynonyms(boolean onlyAttachedToTaxon)
ITaxonService
countSynonyms
in interface ITaxonService
onlyAttachedToTaxon
- if true
only those synonyms being attached to
an accepted taxon are counted@Transactional(readOnly=false) public DeleteResult deleteTaxon(java.util.UUID taxonUUID, TaxonDeletionConfigurator config, java.util.UUID classificationUuid)
deleteTaxon
in interface ITaxonService
@Transactional(readOnly=false) public DeleteResult delete(java.util.UUID synUUID)
IService
@Transactional(readOnly=false) public DeleteResult deleteSynonym(java.util.UUID synonymUuid, SynonymDeletionConfigurator config)
ITaxonService
deleteSynonym
methoddeleteSynonym
in interface ITaxonService
@Transactional(readOnly=false) public DeleteResult deleteSynonym(Synonym synonym, SynonymDeletionConfigurator config)
ITaxonService
removeNameIfPossible
is true
it also removes the synonym name if it is not used in any other context
(part of a concept, in DescriptionElementSource, part of a name relationship, used inline, ...)newHomotypicGroupIfNeeded
is true
and the synonym name
is not deleted and the name is homotypic to the taxon
the name is moved to a new homotypic group.null
the method has no effect.deleteSynonym
in interface ITaxonService
public java.util.Map<java.lang.String,java.util.Map<java.util.UUID,java.util.Set<TaxonName>>> findIdenticalTaxonNames(java.util.List<java.util.UUID> sourceRefUuids, java.util.List<java.lang.String> propertyPaths)
ITaxonService
findIdenticalTaxonNames
in interface ITaxonService
public Taxon findBestMatchingTaxon(java.lang.String taxonName)
findBestMatchingTaxon
in interface ITaxonService
public Taxon findBestMatchingTaxon(MatchingTaxonConfigurator config)
findBestMatchingTaxon
in interface ITaxonService
public Synonym findBestMatchingSynonym(java.lang.String taxonName, boolean includeUnpublished)
findBestMatchingSynonym
in interface ITaxonService
@Transactional(readOnly=false) public UpdateResult moveSynonymToAnotherTaxon(Synonym oldSynonym, Taxon newTaxon, boolean moveHomotypicGroup, SynonymType newSynonymType) throws HomotypicalGroupChangeException
ITaxonService
moveSynonymToAnotherTaxon
in interface ITaxonService
HomotypicalGroupChangeException
@Transactional(readOnly=false) public UpdateResult moveSynonymToAnotherTaxon(Synonym oldSynonym, Taxon newTaxon, boolean moveHomotypicGroup, SynonymType newSynonymType, Reference newSecundum, java.lang.String newSecundumDetail, boolean keepSecundumIfUndefined) throws HomotypicalGroupChangeException
ITaxonService
moveSynonymToAnotherTaxon
in interface ITaxonService
oldSynonym
- the old synonym to move.newTaxon
- the taxon the synonym will be moved tomoveHomotypicGroup
- if the synonym belongs to a homotypic group with other synonyms and
moveHomotypicGroup
is true
all these synonyms are moved to the new taxon,
if false
a HomotypicalGroupChangeException
is thrown.
moveHomotypicGroup
has no effect if the synonym is the only synonym in it's homotypic group.newSynonymType
- the synonym type of the new synonyms. Default is
heterotypic
.newSecundum
- The secundum for the new synonyms).newSecundumDetail
- The secundum micro reference for the new synonym(s).keepSecundumIfUndefined
- if no newSecundum
and/or no newSecundumDetail
is defined they are taken from the old synonym(s) if keepSecundumIfUndefined
is
true
. If false
the secundum and the secundum detail will be taken
only from the newSecundum
and newSecundumDetail
even if they are
undefined (null
).moveHomotypicGroup
is true
additionally
created new synonym relationships must be retrieved separately from the new taxon.HomotypicalGroupChangeException
- Exception is thrown if (1) synonym is homotypic to the old accepted taxon or
(2) synonym is in homotypic group with other synonyms and moveHomotypicGroup
is falsepublic <T extends TaxonBase> java.util.List<UuidAndTitleCache<T>> getUuidAndTitleCache(java.lang.Class<T> clazz, java.lang.Integer limit, java.lang.String pattern)
IIdentifiableEntityService
IIdentifiableEntityService.getUuidAndTitleCache(Integer, String)
but searching only on a subclass
of the type handled by the DAO.getUuidAndTitleCache
in interface IIdentifiableEntityService<TaxonBase>
getUuidAndTitleCache
in class IdentifiableServiceBase<TaxonBase,ITaxonDao>
clazz
- the (sub)classlimit
- max number of resultspattern
- search patternIIdentifiableEntityService.getUuidAndTitleCache(Integer, String)
public Pager<SearchResult<TaxonBase>> findByFullText(java.lang.Class<? extends TaxonBase> clazz, java.lang.String queryString, Classification classification, TaxonNode subtree, boolean includeUnpublished, java.util.List<Language> languages, boolean highlightFragments, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws java.io.IOException, LuceneParseException
ITaxonService
findByFullText
in interface ITaxonService
clazz
- Additional filter criterion: The specific TaxonBase subclass
to search forqueryString
- the query stringclassification
- Additional filter criterion: If a taxonomic classification
three is specified here the result set will only contain taxa
of the given classificationlanguages
- Additional filter criterion: Search only in these languages.
Not all text fields in the cdm model are multilingual, thus
this setting will only apply to the multilingiual fields.
Other fields are searched nevertheless if this parameter is
set or not.highlightFragments
- TODOpageSize
- 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)
java.io.IOException
LuceneParseException
public Pager<SearchResult<TaxonBase>> findByDistribution(java.util.List<NamedArea> areaFilter, java.util.List<PresenceAbsenceTerm> statusFilter, Classification classification, TaxonNode subtree, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws java.io.IOException, LuceneParseException
findByDistribution
in interface ITaxonService
classification
- Additional filter criterion: If a taxonomic classification
three is specified here the result set will only contain taxa
of the given classificationpageSize
- 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.persistentTitleCacheTaxon
instancesjava.io.IOException
LuceneParseException
protected LuceneSearch prepareFindByFullTextSearch(java.lang.Class<? extends CdmBase> clazz, java.lang.String queryString, Classification classification, TaxonNode subtree, java.lang.String className, boolean includeUnpublished, java.util.List<Language> languages, boolean highlightFragments, org.apache.lucene.search.SortField[] sortFields)
clazz
- queryString
- classification
- includeUnpublished
- languages
- highlightFragments
- sortFields
- TODOdirectorySelectClass
- protected LuceneSearch prepareFindByTaxonRelationFullTextSearch(TaxonRelationshipEdge edge, java.lang.String queryString, Classification classification, TaxonNode subtree, boolean includeUnpublished, java.util.List<Language> languages, boolean highlightFragments, org.apache.lucene.search.SortField[] sortFields) throws java.io.IOException
Direction.relatedTo
: TaxonRelationShip.relatedTo.id --> Taxon.id Direction.relatedFrom
: TaxonRelationShip.relatedFrom.id --> Taxon.id queryString
- classification
- languages
- highlightFragments
- sortFields
- TODOjava.io.IOException
public Pager<SearchResult<TaxonBase>> findTaxaAndNamesByFullText(java.util.EnumSet<TaxaAndNamesSearchMode> searchModes, java.lang.String queryString, Classification classification, TaxonNode subtree, java.util.Set<NamedArea> namedAreas, java.util.Set<PresenceAbsenceTerm> distributionStatus, java.util.List<Language> languages, boolean highlightFragments, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws java.io.IOException, LuceneParseException, LuceneMultiSearchException
ITaxonService
findTaxaAndNamesByFullText
in interface ITaxonService
searchModes
- Additional filter criterion: defaults to [doTaxa] if set nullqueryString
- the query stringclassification
- Additional filter criterion: If a taxonomic classification
three is specified here the result set will only contain taxa
of the given classificationlanguages
- Additional filter criterion: Search only in these languages.
Not all text fields in the cdm model are multilingual, thus
this setting will only apply to the multilingiual fields.
Other fields are searched nevertheless if this parameter is
set or not.highlightFragments
- TODOpageSize
- 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.persistentTitleCacheTaxon
, Synonym
, matching the queryString and
the additional filter criteriajava.io.IOException
LuceneParseException
LuceneMultiSearchException
protected org.apache.lucene.search.Query createByDistributionJoinQuery(java.util.List<NamedArea> namedAreaList, java.util.List<PresenceAbsenceTerm> distributionStatusList, QueryFactory queryFactory, java.lang.Class<? extends CdmBase> toType, boolean asFilter) throws java.io.IOException
namedAreaList
- at least one area must be in the listdistributionStatusList
- optionaltoType
- toType
Optional parameter. Only used for debugging to print the toType documentsasFilter
- TODOjava.io.IOException
protected LuceneSearch prepareByDistributionSearch(java.util.List<NamedArea> namedAreaList, java.util.List<PresenceAbsenceTerm> distributionStatusList, Classification classification, TaxonNode subtree) throws java.io.IOException
namedAreaList
- distributionStatusList
- classification
- highlightFragments
- java.io.IOException
public Pager<SearchResult<TaxonBase>> findByDescriptionElementFullText(java.lang.Class<? extends DescriptionElementBase> clazz, java.lang.String queryString, Classification classification, TaxonNode subtree, java.util.List<Feature> features, java.util.List<Language> languages, boolean highlightFragments, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws java.io.IOException, LuceneParseException
ITaxonService
findByDescriptionElementFullText
in interface ITaxonService
clazz
- Additional filter criterion:queryString
- the query string to filter byclassification
- Additional filter criterion: If a taxonomic classification
tree is specified here the result set will only contain taxa
of the given classificationsubtree
- Additional filter criterion: If a taxonomic classification
subtree is specified here the result set will only contain taxa
of the given subtreefeatures
- TODOlanguages
- Additional filter criterion: Search only in these languages.
Not all text fields in the CDM model are multi-lingual, thus
this setting will only apply to the multi-lingual fields.
Other fields are searched nevertheless if this parameter is
set or not.highlightFragments
- TODOpageSize
- 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)
java.io.IOException
LuceneParseException
public Pager<SearchResult<TaxonBase>> findByEverythingFullText(java.lang.String queryString, Classification classification, TaxonNode subtree, boolean includeUnpublished, java.util.List<Language> languages, boolean highlightFragments, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths) throws java.io.IOException, LuceneParseException, LuceneMultiSearchException
ITaxonService
#findByDescriptionElementFullText(Class, String, Classification, List, List, boolean, Integer, Integer, List, List)
and {@link #findByFullText(Class, String, Classification, List, boolean, Integer, Integer, List, List)findByEverythingFullText
in interface ITaxonService
queryString
- the query stringclassification
- Additional filter criterion: If a taxonomic classification
three is specified here the result set will only contain taxa
of the given classificationlanguages
- Additional filter criterion: Search only in these languages.
Not all text fields in the cdm model are multilingual, thus
this setting will only apply to the multilingiual fields.
Other fields are searched nevertheless if this parameter is
set or not.highlightFragments
- TODOpageSize
- 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)
java.io.IOException
LuceneParseException
LuceneMultiSearchException
protected LuceneSearch prepareByDescriptionElementFullTextSearch(java.lang.Class<? extends CdmBase> clazz, java.lang.String queryString, Classification classification, TaxonNode subtree, java.util.List<Feature> features, java.util.List<Language> languages, boolean highlightFragments)
clazz
- queryString
- classification
- features
- languages
- highlightFragments
- directorySelectClass
- public java.util.List<Synonym> createInferredSynonyms(Taxon taxon, Classification classification, SynonymType type, boolean doWithMisappliedNames)
ITaxonService
createInferredSynonyms
in interface ITaxonService
public java.util.List<Synonym> createAllInferredSynonyms(Taxon taxon, Classification tree, boolean doWithMisappliedNames)
ITaxonService
createAllInferredSynonyms
in interface ITaxonService
public java.util.List<Classification> listClassifications(TaxonBase taxonBase, java.lang.Integer limit, java.lang.Integer start, java.util.List<java.lang.String> propertyPaths)
ITaxonService
Synonym
listClassifications
in interface ITaxonService
@Transactional(readOnly=false) public UpdateResult changeRelatedTaxonToSynonym(java.util.UUID fromTaxonUuid, java.util.UUID toTaxonUuid, TaxonRelationshipType oldRelationshipType, SynonymType synonymType) throws DataChangeNoRollbackException
changeRelatedTaxonToSynonym
in interface ITaxonService
DataChangeNoRollbackException
@Transactional(readOnly=false) public UpdateResult changeRelatedTaxonToSynonym(Taxon fromTaxon, Taxon toTaxon, TaxonRelationshipType oldRelationshipType, SynonymType synonymType) throws DataChangeNoRollbackException
ITaxonService
changeRelatedTaxonToSynonym
in interface ITaxonService
toTaxon
- the taxon the newly created synonym should be related tooldRelationshipType
- the type of old concept relationshipDataChangeNoRollbackException
public DeleteResult isDeletable(java.util.UUID taxonBaseUuid, DeleteConfiguratorBase config)
VersionableServiceBase
isDeletable
in interface IVersionableService<TaxonBase>
isDeletable
in class VersionableServiceBase<TaxonBase,ITaxonDao>
public IncludedTaxaDTO listIncludedTaxa(java.util.UUID taxonUuid, IncludedTaxonConfiguration config)
ITaxonService
taxa
which are congruent
or
included
in the taxon represented by the given taxon uuid.
The result also returns the path to these taxa represented by the uuids of
the taxon relationships types
and doubtful information.
If classificationUuids is set only taxa of classifications are returned which are included
in the given classifications
. ALso the path to these taxa may not include
taxa from other classifications.listIncludedTaxa
in interface ITaxonService
taxonUuid
- uuid of the original taxonpublic java.util.List<TaxonBase> findTaxaByName(MatchingTaxonConfigurator config)
findTaxaByName
in interface ITaxonService
@Transactional(readOnly=true) public <S extends TaxonBase> Pager<IdentifiedEntityDTO<S>> findByIdentifier(java.lang.Class<S> clazz, java.lang.String identifier, DefinedTerm identifierType, TaxonNode subtreeFilter, MatchMode matchmode, boolean includeEntity, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
findByIdentifier
in interface ITaxonService
clazz
- the optional TaxonBase
subclassidentifier
- the identifier stringidentifierType
- the identifier typesubtreeFilter
- filter on a classification subtree (TaxonNode)matchmode
- the match mode for the identifier stringincludeEntity
- should the taxon as an object be included in the resultpageSize
- page sizepageNumber
- page numberpropertyPaths
- property path for initializing the returned taxon object (requires includeEntity=true)IdentifiedEntityDTO
pagerIIdentifiableEntityService.findByIdentifier(Class, String, DefinedTerm, MatchMode, boolean, Integer, Integer, List)
@Transactional(readOnly=true) public <S extends TaxonBase> Pager<MarkedEntityDTO<S>> findByMarker(java.lang.Class<S> clazz, MarkerType markerType, java.lang.Boolean markerValue, TaxonNode subtreeFilter, boolean includeEntity, TaxonTitleType titleType, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
ITaxonService
DTOs
that hold the marker including type, title and uuid
and the according TaxonBase
information (uuid, title and the taxon object itself (optional)).findByMarker
in interface ITaxonService
clazz
- The optional TaxonBase
subclassmarkerType
- the obligatory marker type, if not given, the results will always be emptymarkerValue
- the optionalsubtreeFilter
- filter on a classification subtree (TaxonNode)includeEntity
- should the taxon as an object be included in the resulttitleType
- which label to give the returned entity, taxon.titleCache, name.titleCache or name.nameCachepageSize
- page sizepageNumber
- page numberpropertyPaths
- property path for initializing the returned taxon object (requires includeEntity=true)MarkedEntityDTO
pagerIIdentifiableEntityService.findByMarker(Class, MarkerType, Boolean, boolean, Integer, Integer, List)
@Transactional(readOnly=false) public UpdateResult moveSynonymToAnotherTaxon(Synonym oldSynonym, java.util.UUID newTaxonUUID, boolean moveHomotypicGroup, SynonymType newSynonymType, Reference newSecundum, java.lang.String newSecundumDetail, boolean keepSecundumIfUndefined) throws HomotypicalGroupChangeException
moveSynonymToAnotherTaxon
in interface ITaxonService
HomotypicalGroupChangeException
#moveSynonymToAnotherTaxon(Synonym, Taxon, boolean, SynonymType, Reference, String, boolean)}
public UpdateResult moveFactualDateToAnotherTaxon(java.util.UUID fromTaxonUuid, java.util.UUID toTaxonUuid)
moveFactualDateToAnotherTaxon
in interface ITaxonService
@Transactional(readOnly=false) public UpdateResult swapSynonymAndAcceptedTaxon(java.util.UUID synonymUUid, java.util.UUID acceptedTaxonUuid, boolean setNameInSource)
swapSynonymAndAcceptedTaxon
in interface ITaxonService
public TaxonRelationshipsDTO listTaxonRelationships(java.util.UUID taxonUuid, java.util.Set<TaxonRelationshipType> directTypes, java.util.Set<TaxonRelationshipType> inversTypes, RelationshipBase.Direction direction, boolean groupMisapplications, boolean includeUnpublished, java.lang.Integer pageSize, java.lang.Integer pageNumber)
listTaxonRelationships
in interface ITaxonService
Copyright © 2007-2020 EDIT. All Rights Reserved.