|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.etaxonomy.cdm.api.service.ServiceBase<T,DAO>
eu.etaxonomy.cdm.api.service.VersionableServiceBase<T,DAO>
eu.etaxonomy.cdm.api.service.AnnotatableServiceBase<T,DAO>
eu.etaxonomy.cdm.api.service.IdentifiableServiceBase<TaxonBase,ITaxonDao>
eu.etaxonomy.cdm.api.service.TaxonServiceImpl
@Service @Transactional(readOnly=true) public class TaxonServiceImpl
| Field Summary | |
|---|---|
static String |
INFERRED_EPITHET_NAMESPACE
|
static String |
INFERRED_GENUS_NAMESPACE
|
static String |
POTENTIAL_COMBINATION_NAMESPACE
|
| Fields inherited from class eu.etaxonomy.cdm.api.service.IdentifiableServiceBase |
|---|
commonService, UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE |
| Fields inherited from class eu.etaxonomy.cdm.api.service.ServiceBase |
|---|
appContext, dao |
| Constructor Summary | |
|---|---|
TaxonServiceImpl()
Constructor |
|
| Method Summary | |
|---|---|
void |
changeHomotypicalGroupOfSynonym(Synonym synonym,
HomotypicalGroup newHomotypicalGroup,
Taxon targetTaxon,
boolean removeFromOtherTaxa,
boolean setBasionymRelationIfApplicable)
Changes the homotypic group of a synonym into the new homotypic group. |
Taxon |
changeSynonymToAcceptedTaxon(Synonym synonym,
Taxon acceptedTaxon,
boolean deleteSynonym,
boolean copyCitationInfo,
Reference citation,
String microCitation)
Changes a synonym into an accepted taxon and removes the synonym relationship to the given accepted taxon. |
Taxon |
changeSynonymToRelatedTaxon(Synonym synonym,
Taxon toTaxon,
TaxonRelationshipType taxonRelationshipType,
Reference citation,
String microcitation)
TODO still needed and correct? Change a synonym into a related concept |
int |
countAllRelationships()
|
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 |
List<Synonym> |
createInferredSynonyms(Taxon taxon,
Classification classification,
SynonymRelationshipType type,
boolean doWithMisappliedNames)
Creates the specified inferred synonyms for the taxon in the classification, but do not insert it to the database |
void |
deleteSynonym(Synonym synonym,
Taxon taxon,
boolean removeNameIfPossible,
boolean newHomotypicGroupIfNeeded)
Removes a synonym. In detail it removes all synonym relationship to the given taxon or to all taxa if taxon is null
the synonym concept if it is not referenced by any synonym relationship anymore
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 homotypical group.If synonym is null the method has no effect. |
long |
deleteSynonymRelationships(Synonym syn)
|
long |
deleteSynonymRelationships(Synonym syn,
Taxon taxon)
Deletes all synonym relationships of a given synonym. |
void |
deleteTaxon(Taxon taxon,
TaxonDeletionConfigurator config)
Deletes a taxon from the underlying database according to the given configurator. |
Synonym |
findBestMatchingSynonym(String taxonName)
|
Taxon |
findBestMatchingTaxon(MatchingTaxonConfigurator config)
|
Taxon |
findBestMatchingTaxon(String taxonName)
|
Pager<SearchResult<TaxonBase>> |
findByDescriptionElementFullText(Class<? extends DescriptionElementBase> clazz,
String queryString,
Classification classification,
List<Feature> features,
List<Language> languages,
boolean highlightFragments,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
This is an experimental feature, it may be moved, modified, or even removed in future releases!!! |
Pager<SearchResult<TaxonBase>> |
findByEverythingFullText(String queryString,
Classification classification,
List<Language> languages,
boolean highlightFragments,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
|
Pager<SearchResult<TaxonBase>> |
findByFullText(Class<? extends TaxonBase> clazz,
String queryString,
Classification classification,
List<Language> languages,
boolean highlightFragments,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
|
List<TaxonNameBase> |
findIdenticalTaxonNameIds(List<String> propertyPath)
|
List<TaxonNameBase> |
findIdenticalTaxonNames(List<String> propertyPath)
|
Pager<IdentifiableEntity> |
findTaxaAndNames(IFindTaxaAndNamesConfigurator configurator)
Returns a list of IdentifiableEntity instances (in particular, TaxonNameBase and TaxonBase instances) that match the properties specified in the configurator. |
List<UuidAndTitleCache<TaxonBase>> |
findTaxaAndNamesForEditor(IFindTaxaAndNamesConfigurator configurator)
|
List<TaxonBase> |
findTaxaByID(Set<Integer> listOfIDs)
|
Pager<TaxonBase> |
findTaxaByName(Class<? extends TaxonBase> clazz,
String uninomial,
String infragenericEpithet,
String specificEpithet,
String infraspecificEpithet,
Rank rank,
Integer pageSize,
Integer pageNumber)
Returns a list of TaxonBase instances where the taxon.name properties match the parameters passed. |
TaxonBase |
findTaxonByUuid(UUID uuid,
List<String> propertyPaths)
Returns the TaxonBase with the given UUID using the given match mode and initialization strategy |
List<MediaRepresentation> |
getAllMedia(Taxon taxon,
int size,
int height,
int widthOrDuration,
String[] mimeTypes)
|
List<RelationshipBase> |
getAllRelationships(int limit,
int start)
Computes all relationships. |
List<Synonym> |
getAllSynonyms(int limit,
int start)
FIXME Candidate for harmonization list(Synonym.class, ...) (non-Javadoc) |
List<Taxon> |
getAllTaxa(int limit,
int start)
FIXME Candidate for harmonization list(Taxon.class, ...) (non-Javadoc) |
List<List<Synonym>> |
getHeterotypicSynonymyGroups(Taxon taxon,
List<String> propertyPaths)
Returns the ordered list of all homotypical groups
that contain synonyms that are heterotypic to the given taxon. |
List<Synonym> |
getHomotypicSynonymsByHomotypicGroup(Taxon taxon,
List<String> propertyPaths)
Returns the list of all synonyms that share the same homotypical group with the given taxon. |
String |
getPhylumName(TaxonNameBase name)
|
List<Taxon> |
getRootTaxa(Rank rank,
Reference sec,
boolean onlyWithChildren,
boolean withMisapplications,
List<String> propertyPaths)
Computes all Taxon instances which name is of a certain Rank. |
List<Taxon> |
getRootTaxa(Reference sec,
CdmFetch cdmFetch,
boolean onlyWithChildren)
FIXME Candidate for harmonization merge with getRootTaxa(Reference sec, ..., ...) (non-Javadoc) |
Pager<SynonymRelationship> |
getSynonyms(Synonym synonym,
SynonymRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns the SynonymRelationships (of where relationship.type == type, if this argument is supplied) where the supplied synonym is relatedFrom. |
Pager<SynonymRelationship> |
getSynonyms(Taxon taxon,
SynonymRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns the SynonymRelationships (of where relationship.type == type, if this argument is supplied) where the supplied taxon is relatedTo. |
OrderedTermVocabulary<TaxonRelationshipType> |
getTaxonRelationshipTypeVocabulary()
Deprecated. |
List<UuidAndTitleCache<TaxonBase>> |
getTaxonUuidAndTitleCache()
|
List<UuidAndTitleCache<TaxonBase>> |
getUuidAndTitleCacheSynonym()
|
List<UuidAndTitleCache<TaxonBase>> |
getUuidAndTitleCacheTaxon()
|
List<Classification> |
listClassifications(TaxonBase taxonBase,
Integer limit,
Integer start,
List<String> propertyPaths)
lists all accepted taxa for the given Synonym |
List<TaxonRelationship> |
listFromTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns the TaxonRelationships (of where relationship.type == type, if this argument is supplied) where the supplied taxon is relatedFrom. |
List<Media> |
listMedia(Taxon taxon,
Set<TaxonRelationshipEdge> includeRelationships,
Boolean limitToGalleries,
Boolean includeTaxonDescriptions,
Boolean includeOccurrences,
Boolean includeTaxonNameDescriptions,
List<String> propertyPath)
Lists all Media found in an any TaxonDescription, NameDescription, SpecimenOrObservationBase, DnaSample Chromatograms, etc. |
Set<Taxon> |
listRelatedTaxa(Taxon taxon,
Set<TaxonRelationshipEdge> includeRelationships,
Integer maxDepth,
Integer limit,
Integer start,
List<String> propertyPaths)
lists all taxa which are related to the taxon given as
parameter. |
List<SynonymRelationship> |
listSynonymRelationships(TaxonBase taxonBase,
SynonymRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths,
RelationshipBase.Direction direction)
Returns the SynonymRelationships (of where relationship.type == type, if this argument is supplied) depending on direction, where the supplied taxon is relatedTo or the supplied synonym is relatedFrom. |
List<TaxonBase> |
listTaxaByName(Class<? extends TaxonBase> clazz,
String uninomial,
String infragenericEpithet,
String specificEpithet,
String infraspecificEpithet,
Rank rank,
Integer pageSize,
Integer pageNumber)
Returns a list of TaxonBase instances where the taxon.name properties match the parameters passed. |
List<Media> |
listTaxonDescriptionMedia(Taxon taxon,
Set<TaxonRelationshipEdge> includeRelationships,
boolean limitToGalleries,
List<String> propertyPath)
Lists all Media found in an any TaxonDescription associated with this taxon. |
List<TaxonRelationship> |
listToTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns the TaxonRelationships (of where relationship.type == type, if this argument is supplied) where the supplied taxon is relatedTo. |
SynonymRelationship |
moveSynonymToAnotherTaxon(SynonymRelationship oldSynonymRelation,
Taxon newTaxon,
boolean moveHomotypicGroup,
SynonymRelationshipType newSynonymRelationshipType,
Reference reference,
String referenceDetail,
boolean keepReference)
Moves a synonym to another taxon and removes the old synonym relationship. |
Pager<TaxonRelationship> |
pageFromTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<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,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
Returns the TaxonRelationships (of where relationship.type == type, if this arguement is supplied) where the supplied taxon is relatedTo. |
protected LuceneSearch |
prepareByDescriptionElementFullTextSearch(Class<? extends CdmBase> clazz,
String queryString,
Classification classification,
List<Feature> features,
List<Language> languages,
boolean highlightFragments)
|
protected LuceneSearch |
prepareFindByFullTextSearch(Class<? extends CdmBase> clazz,
String queryString,
Classification classification,
List<Language> languages,
boolean highlightFragments)
|
List<TaxonBase> |
searchTaxaByName(String name,
Reference sec)
FIXME Candidate for harmonization rename searchByName ? |
protected void |
setDao(ITaxonDao dao)
|
void |
swapSynonymAndAcceptedTaxon(Synonym synonym,
Taxon acceptedTaxon)
Swaps given synonym and accepted taxon. |
void |
updateTitleCache(Class<? extends TaxonBase> clazz,
Integer stepSize,
IIdentifiableEntityCacheStrategy<TaxonBase> cacheStrategy,
IProgressMonitor monitor)
(Re-)generate the title caches for all objects of this concrete IdentifiableEntity class |
| Methods inherited from class eu.etaxonomy.cdm.api.service.IdentifiableServiceBase |
|---|
countByTitle, countByTitle, deduplicate, find, findByTitle, findByTitle, findCdmObjectsByTitle, findCdmObjectsByTitle, findCdmObjectsByTitle, findTitleCache, getRights, getSourcedObjectByIdInSource, getSources, getUuidAndTitleCache, listByReferenceTitle, listByTitle, replace, search, setOtherCachesNull, updateTitleCache, updateTitleCacheImpl |
| Methods inherited from class eu.etaxonomy.cdm.api.service.AnnotatableServiceBase |
|---|
countMarkers, getAnnotations, getMarkers, groupMarkers |
| Methods inherited from class eu.etaxonomy.cdm.api.service.VersionableServiceBase |
|---|
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents |
| Methods inherited from class eu.etaxonomy.cdm.api.service.ServiceBase |
|---|
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, setApplicationContext, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.ITaxonService |
|---|
search |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IIdentifiableEntityService |
|---|
countByTitle, countByTitle, deduplicate, find, findByTitle, findByTitle, findTitleCache, getRights, getSourcedObjectByIdInSource, getSources, getUuidAndTitleCache, listByReferenceTitle, listByTitle, replace, updateTitleCache |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IAnnotatableService |
|---|
countMarkers, getAnnotations, getMarkers, groupMarkers |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IVersionableService |
|---|
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents |
| Methods inherited from interface eu.etaxonomy.cdm.api.service.IService |
|---|
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, update |
| Field Detail |
|---|
public static final String POTENTIAL_COMBINATION_NAMESPACE
public static final String INFERRED_EPITHET_NAMESPACE
public static final String INFERRED_GENUS_NAMESPACE
| Constructor Detail |
|---|
public TaxonServiceImpl()
| Method Detail |
|---|
public List<TaxonBase> searchTaxaByName(String name,
Reference sec)
searchTaxaByName in interface ITaxonServicename - the name string to search forsec - the taxons sec reference
public List<Synonym> getAllSynonyms(int limit,
int start)
getAllSynonyms in interface ITaxonServiceITaxonService.getAllSynonyms(int, int)
public List<Taxon> getAllTaxa(int limit,
int start)
getAllTaxa in interface ITaxonServiceITaxonService.getAllTaxa(int, int)
public List<Taxon> getRootTaxa(Reference sec,
CdmFetch cdmFetch,
boolean onlyWithChildren)
getRootTaxa in interface ITaxonServicesec - The concept reference that the taxon belongs toonlyWithChildren - if true only taxa are returned that have taxonomic children. eu.etaxonomy.cdm.api.service.ITaxonService#getRootTaxa(eu.etaxonomy.cdm.model.reference.Reference, boolean)
public List<Taxon> getRootTaxa(Rank rank,
Reference sec,
boolean onlyWithChildren,
boolean withMisapplications,
List<String> propertyPaths)
ITaxonService
getRootTaxa in interface ITaxonServicerank - The rank of the taxon namesec - The concept reference that the taxon belongs toonlyWithChildren - if true only taxa are returned that have taxonomic children. withMisapplications - if false taxa that have at least one misapplied name relationship in which they are
the misapplied name are not returned.propertyPaths - properties to be initialized, For detailed description and
examples please refer to:
IBeanInitializer.initialize(Object, List).
public List<RelationshipBase> getAllRelationships(int limit,
int start)
ITaxonService
getAllRelationships in interface ITaxonService@Deprecated public OrderedTermVocabulary<TaxonRelationshipType> getTaxonRelationshipTypeVocabulary()
getTaxonRelationshipTypeVocabulary in interface ITaxonService
@Transactional(readOnly=false)
public void swapSynonymAndAcceptedTaxon(Synonym synonym,
Taxon acceptedTaxon)
ITaxonService
swapSynonymAndAcceptedTaxon in interface ITaxonService
@Transactional(readOnly=false)
public Taxon changeSynonymToAcceptedTaxon(Synonym synonym,
Taxon acceptedTaxon,
boolean deleteSynonym,
boolean copyCitationInfo,
Reference citation,
String microCitation)
throws HomotypicalGroupChangeException
ITaxonService
changeSynonymToAcceptedTaxon in interface ITaxonServicesynonym - 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 databasecopyCitationInfo - if true the citation and the microcitation of newly created synonyms
is taken from the old synonym relationships.citation - if given this citation is added to the newly created synonym
relationships as citation. Only used if copyCitationInfo is falsemicroCitation - if given this microCitation is added to the newly created synonym
relationships as microCitation.Only used if copyCitationInfo is false
HomotypicalGroupChangeException
public Taxon changeSynonymToRelatedTaxon(Synonym synonym,
Taxon toTaxon,
TaxonRelationshipType taxonRelationshipType,
Reference citation,
String microcitation)
ITaxonService
changeSynonymToRelatedTaxon in interface ITaxonServicesynonym - 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 removeFromOtherTaxa,
boolean setBasionymRelationIfApplicable)
ITaxonServicetargetTaxon is defined, the synonym is
added to this taxon irrespctive of if it has been related to this
taxon before.removeFromOtherTaxa is true and targetTaxon is
defined all relationships to other taxa are deleted.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 void updateTitleCache(Class<? extends TaxonBase> clazz,
Integer stepSize,
IIdentifiableEntityCacheStrategy<TaxonBase> cacheStrategy,
IProgressMonitor monitor)
IIdentifiableEntityService
updateTitleCache in interface IIdentifiableEntityService<TaxonBase>clazz - class of objects to be updatedstepSize - number of objects loaded per step. If null use default.cacheStrategy - cachestrategy used for title cache. 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(Class<? extends TaxonBase> clazz,
String uninomial,
String infragenericEpithet,
String specificEpithet,
String infraspecificEpithet,
Rank rank,
Integer pageSize,
Integer pageNumber)
ITaxonService
findTaxaByName in interface ITaxonServiceclazz - 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 List<TaxonBase> listTaxaByName(Class<? extends TaxonBase> clazz,
String uninomial,
String infragenericEpithet,
String specificEpithet,
String infraspecificEpithet,
Rank rank,
Integer pageSize,
Integer pageNumber)
ITaxonService
listTaxaByName in interface ITaxonServiceclazz - 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 List<TaxonRelationship> listToTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
ITaxonService
listToTaxonRelationships in interface ITaxonServicetaxon - The taxon that is relatedTotype - The type of TaxonRelationship (can be null)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,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
ITaxonService
pageToTaxonRelationships in interface ITaxonServicetaxon - The taxon that is relatedTotype - The type of TaxonRelationship (can be null)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 List<TaxonRelationship> listFromTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
ITaxonService
listFromTaxonRelationships in interface ITaxonServicetaxon - The taxon that is relatedFromtype - The type of TaxonRelationship (can be null)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,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
ITaxonService
pageFromTaxonRelationships in interface ITaxonServicetaxon - The taxon that is relatedFromtype - The type of TaxonRelationship (can be null)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 Set<Taxon> listRelatedTaxa(Taxon taxon,
Set<TaxonRelationshipEdge> includeRelationships,
Integer maxDepth,
Integer limit,
Integer start,
List<String> propertyPaths)
ITaxonServicetaxon given as
parameter.
listRelatedTaxa in interface ITaxonServicetaxon - includeRelationships - maxDepth - limit - starts - propertyPaths -
public Pager<SynonymRelationship> getSynonyms(Taxon taxon,
SynonymRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
ITaxonService
getSynonyms in interface ITaxonServicetaxon - The taxon that is relatedTotype - The type of SynonymRelationship (can be null)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)
* @param orderHints Properties to order bypropertyPaths - Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public Pager<SynonymRelationship> getSynonyms(Synonym synonym,
SynonymRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
ITaxonService
getSynonyms in interface ITaxonServicetype - The type of SynonymRelationship (can be null)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)
* @param orderHints Properties to order bypropertyPaths - Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public List<Synonym> getHomotypicSynonymsByHomotypicGroup(Taxon taxon,
List<String> propertyPaths)
ITaxonService
getHomotypicSynonymsByHomotypicGroup in interface ITaxonService
public List<List<Synonym>> getHeterotypicSynonymyGroups(Taxon taxon,
List<String> propertyPaths)
ITaxonServicehomotypical 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(),
SynonymRelationshipType.HETEROTYPIC_SYNONYM_OF(),
HomotypicalGrouppublic List<UuidAndTitleCache<TaxonBase>> findTaxaAndNamesForEditor(IFindTaxaAndNamesConfigurator configurator)
findTaxaAndNamesForEditor in interface ITaxonServicepublic Pager<IdentifiableEntity> findTaxaAndNames(IFindTaxaAndNamesConfigurator configurator)
ITaxonService
findTaxaAndNames in interface ITaxonServicepublic List<UuidAndTitleCache<TaxonBase>> getTaxonUuidAndTitleCache()
public List<MediaRepresentation> getAllMedia(Taxon taxon,
int size,
int height,
int widthOrDuration,
String[] mimeTypes)
getAllMedia in interface ITaxonService
public List<Media> listTaxonDescriptionMedia(Taxon taxon,
Set<TaxonRelationshipEdge> includeRelationships,
boolean limitToGalleries,
List<String> propertyPath)
ITaxonService
listTaxonDescriptionMedia in interface ITaxonServiceincludeRelationships - 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 gallery
public List<Media> listMedia(Taxon taxon,
Set<TaxonRelationshipEdge> includeRelationships,
Boolean limitToGalleries,
Boolean includeTaxonDescriptions,
Boolean includeOccurrences,
Boolean includeTaxonNameDescriptions,
List<String> propertyPath)
ITaxonService
listMedia in interface ITaxonServiceincludeRelationships - 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 NULL
public List<TaxonBase> findTaxaByID(Set<Integer> listOfIDs)
findTaxaByID in interface ITaxonService
public TaxonBase findTaxonByUuid(UUID uuid,
List<String> propertyPaths)
ITaxonService
findTaxonByUuid in interface ITaxonServicepublic int countAllRelationships()
countAllRelationships in interface ITaxonServicepublic List<TaxonNameBase> findIdenticalTaxonNames(List<String> propertyPath)
findIdenticalTaxonNames in interface ITaxonService
public void deleteTaxon(Taxon taxon,
TaxonDeletionConfigurator config)
throws ReferencedObjectUndeletableException
ITaxonServiceconfigurator.
deleteTaxon in interface ITaxonServiceReferencedObjectUndeletableException
@Transactional(readOnly=false)
public void deleteSynonym(Synonym synonym,
Taxon taxon,
boolean removeNameIfPossible,
boolean newHomotypicGroupIfNeeded)
ITaxonServicenullremoveNameIfPossible 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 homotypical group.null the method has no effect.
deleteSynonym in interface ITaxonServicepublic List<TaxonNameBase> findIdenticalTaxonNameIds(List<String> propertyPath)
findIdenticalTaxonNameIds in interface ITaxonServicepublic String getPhylumName(TaxonNameBase name)
getPhylumName in interface ITaxonService
public long deleteSynonymRelationships(Synonym syn,
Taxon taxon)
ITaxonService
deleteSynonymRelationships in interface ITaxonServicesyn - the synonym
public long deleteSynonymRelationships(Synonym syn)
deleteSynonymRelationships in interface ITaxonService
public List<SynonymRelationship> listSynonymRelationships(TaxonBase taxonBase,
SynonymRelationshipType type,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths,
RelationshipBase.Direction direction)
ITaxonService
listSynonymRelationships in interface ITaxonServicetaxonBase - The taxon or synonym that is relatedTo or relatedFromtype - The type of SynonymRelationship (can be null)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)direction - The direction of the relationship
public Taxon findBestMatchingTaxon(String taxonName)
findBestMatchingTaxon in interface ITaxonServicepublic Taxon findBestMatchingTaxon(MatchingTaxonConfigurator config)
findBestMatchingTaxon in interface ITaxonServicepublic Synonym findBestMatchingSynonym(String taxonName)
findBestMatchingSynonym in interface ITaxonService
public SynonymRelationship moveSynonymToAnotherTaxon(SynonymRelationship oldSynonymRelation,
Taxon newTaxon,
boolean moveHomotypicGroup,
SynonymRelationshipType newSynonymRelationshipType,
Reference reference,
String referenceDetail,
boolean keepReference)
throws HomotypicalGroupChangeException
ITaxonService
moveSynonymToAnotherTaxon in interface ITaxonServiceoldSynonymRelation - the old synonym relationship defining the synonym to move and the old accepted taxon.newTaxon - the taxon the synonym will be moved tomoveHomotypicGroup - if the synonym belongs to a homotypical 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.newSynonymRelationshipType - the synonym relationship type of the new synonym relations. Default is
heterotypic.reference - The reference for the new synonym relation(s).referenceDetail - The reference detail for the new synonym relation(s).keepReference - if no newReference and/or no newReferenceDetail
is defined they are taken from the old synonym relation(s) if keepReference is
true. If false the reference and the reference detail will be taken
only from the newReference and newReferenceDetail.
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 List<UuidAndTitleCache<TaxonBase>> getUuidAndTitleCacheTaxon()
getUuidAndTitleCacheTaxon in interface ITaxonServicepublic List<UuidAndTitleCache<TaxonBase>> getUuidAndTitleCacheSynonym()
getUuidAndTitleCacheSynonym in interface ITaxonService
public Pager<SearchResult<TaxonBase>> findByFullText(Class<? extends TaxonBase> clazz,
String queryString,
Classification classification,
List<Language> languages,
boolean highlightFragments,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
throws org.apache.lucene.index.CorruptIndexException,
IOException,
org.apache.lucene.queryParser.ParseException
findByFullText in interface ITaxonServiceorg.apache.lucene.index.CorruptIndexException
IOException
org.apache.lucene.queryParser.ParseException
protected LuceneSearch prepareFindByFullTextSearch(Class<? extends CdmBase> clazz,
String queryString,
Classification classification,
List<Language> languages,
boolean highlightFragments)
clazz - queryString - classification - languages - highlightFragments - directorySelectClass -
public Pager<SearchResult<TaxonBase>> findByDescriptionElementFullText(Class<? extends DescriptionElementBase> clazz,
String queryString,
Classification classification,
List<Feature> features,
List<Language> languages,
boolean highlightFragments,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
throws org.apache.lucene.index.CorruptIndexException,
IOException,
org.apache.lucene.queryParser.ParseException
ITaxonService
findByDescriptionElementFullText in interface ITaxonServicequeryString - the query string to filter byclassification - If a taxonomic classification three is specified here the
result set will only contain taxa of the given classificationfeatures - TODOlanguages - 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)
org.apache.lucene.index.CorruptIndexException
IOException
org.apache.lucene.queryParser.ParseException
public Pager<SearchResult<TaxonBase>> findByEverythingFullText(String queryString,
Classification classification,
List<Language> languages,
boolean highlightFragments,
Integer pageSize,
Integer pageNumber,
List<OrderHint> orderHints,
List<String> propertyPaths)
throws org.apache.lucene.index.CorruptIndexException,
IOException,
org.apache.lucene.queryParser.ParseException
findByEverythingFullText in interface ITaxonServiceorg.apache.lucene.index.CorruptIndexException
IOException
org.apache.lucene.queryParser.ParseException
protected LuceneSearch prepareByDescriptionElementFullTextSearch(Class<? extends CdmBase> clazz,
String queryString,
Classification classification,
List<Feature> features,
List<Language> languages,
boolean highlightFragments)
clazz - queryString - classification - features - languages - highlightFragments - directorySelectClass -
public List<Synonym> createInferredSynonyms(Taxon taxon,
Classification classification,
SynonymRelationshipType type,
boolean doWithMisappliedNames)
ITaxonService
createInferredSynonyms in interface ITaxonService
public List<Synonym> createAllInferredSynonyms(Taxon taxon,
Classification tree,
boolean doWithMisappliedNames)
ITaxonService
createAllInferredSynonyms in interface ITaxonService
public List<Classification> listClassifications(TaxonBase taxonBase,
Integer limit,
Integer start,
List<String> propertyPaths)
ITaxonServiceSynonym
listClassifications in interface ITaxonService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||