@Service @Transactional(readOnly=true) public class TaxonNodeServiceImpl extends AnnotatableServiceBase<TaxonNode,ITaxonNodeDao> implements ITaxonNodeService
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
TaxonNodeServiceImpl() |
Modifier and Type | Method and Description |
---|---|
UpdateResult |
addTaxonNodeAgentRelation(java.util.UUID taxonNodeUUID,
java.util.UUID agentUUID,
DefinedTerm relationshipType) |
long |
count(TaxonNodeFilter filter)
Returns a list of taxon node
uuids according to the given filter. |
int |
countAllNodesForClassification(Classification classification)
Counts all TaxonNodes for a given Classification
|
UpdateResult |
createNewTaxonNode(java.util.UUID parentNodeUuid,
Taxon newTaxon,
Reference ref,
java.lang.String microref) |
UpdateResult |
createNewTaxonNode(java.util.UUID parentNodeUuid,
java.util.UUID taxonUuid,
Reference ref,
java.lang.String microref) |
DeleteResult |
deleteTaxonNode(TaxonNode node,
TaxonDeletionConfigurator config)
deletes the given taxon node the configurator defines whether the children will be deleted too or not
|
DeleteResult |
deleteTaxonNode(java.util.UUID nodeUUID,
TaxonDeletionConfigurator config) |
DeleteResult |
deleteTaxonNodes(java.util.Collection<java.util.UUID> nodeUuids,
TaxonDeletionConfigurator config) |
DeleteResult |
deleteTaxonNodes(java.util.List<TaxonNode> list,
TaxonDeletionConfigurator config)
deletes the given taxon nodes
|
TaxonNodeDto |
dto(java.util.UUID taxonNodeUuid) |
TaxonNodeDto |
findCommonParentDto(java.util.Collection<TaxonNodeDto> nodes)
Retrieves the first taxon node that is direct or indirect parent
to all nodes of the given list of nodes.
|
TaxonNodeDto |
getParentUuidAndTitleCache(ITaxonTreeNode child)
Retrieves the parent node of the child
TaxonNode |
TaxonNodeDto |
getParentUuidAndTitleCache(TaxonNodeDto child)
Retrieves the parent node of the
TaxonNode represented by the given UuidAndTitleCache . |
java.util.List<TaxonDistributionDTO> |
getTaxonDistributionDTO(java.util.List<java.util.UUID> nodeUuids,
java.util.List<java.lang.String> propertyPaths,
org.springframework.security.core.Authentication authentication,
boolean openChildren) |
java.util.List<TaxonDistributionDTO> |
getTaxonDistributionDTO(java.util.List<java.util.UUID> nodeUuids,
java.util.List<java.lang.String> propertyPaths,
boolean openChildren) |
java.util.List<TaxonNodeDto> |
getUuidAndTitleCache(java.lang.Integer limit,
java.lang.String pattern,
java.util.UUID classificationUuid)
Retrieves a list of
UuidAndTitleCache objects that have a matchin titleCache |
java.util.List<java.lang.Integer> |
idList(TaxonNodeFilter filter)
Returns a list of taxon node IDs according to the given filter.
|
java.util.List<TaxonNode> |
listAllNodesForClassification(Classification classification,
java.lang.Integer start,
java.lang.Integer end) |
java.util.List<TaxonNodeDto> |
listChildNodesAsTaxonNodeDto(ITaxonTreeNode parent) |
java.util.List<TaxonNodeDto> |
listChildNodesAsTaxonNodeDto(TaxonNodeDto parent) |
java.util.List<TaxonNode> |
listChildrenOf(TaxonNode node,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
boolean recursive,
boolean includeUnpublished,
java.util.List<java.lang.String> propertyPaths)
Lists all direct child nodes of the given
UuidAndTitleCache which
represents the parent TaxonNode |
java.util.List<TaxonNode> |
loadChildNodesOfTaxonNode(TaxonNode taxonNode,
java.util.List<java.lang.String> propertyPaths,
boolean recursive,
boolean includeUnpublished,
NodeSortMode sortMode)
returns the childnodes of the taxonNode, if recursive is true it returns all descendants, if sort is true the nodes are sorted
|
DeleteResult |
makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode,
TaxonNode newAcceptedTaxonNode,
SynonymType synonymType,
Reference citation,
java.lang.String citationMicroReference,
boolean setNameInSource)
Changes the taxon associated with the given taxon node into a synonym of the new accepted taxon node.
|
UpdateResult |
makeTaxonNodeASynonymOfAnotherTaxonNode(java.util.UUID oldTaxonNodeUuid,
java.util.UUID newAcceptedTaxonNodeUUID,
SynonymType synonymType,
Reference citation,
java.lang.String citationMicroReference,
boolean setNameInSource) |
UpdateResult |
makeTaxonNodeSynonymsOfAnotherTaxonNode(java.util.Set<java.util.UUID> oldTaxonNodeUuids,
java.util.UUID newAcceptedTaxonNodeUUIDs,
SynonymType synonymType,
Reference citation,
java.lang.String citationMicroReference,
boolean setNameInSource)
Changes the taxa associated with the given taxon nodes into synonyms of the new accepted taxon node.
|
UpdateResult |
moveTaxonNode(TaxonNode taxonNode,
TaxonNode newParent,
int movingType) |
UpdateResult |
moveTaxonNode(java.util.UUID taxonNodeUuid,
java.util.UUID targetNodeUuid,
int movingType) |
UpdateResult |
moveTaxonNodes(java.util.Set<java.util.UUID> taxonNodeUuids,
java.util.UUID newParentNodeUuid,
int movingType,
IProgressMonitor monitor) |
<S extends TaxonNode> |
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 TaxonNode> |
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<TaxonNodeDto> |
pageChildNodesDTOs(java.util.UUID taxonNodeUuid,
boolean recursive,
boolean includeUnpublished,
boolean doSynonyms,
NodeSortMode sortMode,
java.lang.Integer pageSize,
java.lang.Integer pageIndex)
Returns the childnodes of the taxonNode, if recursive is true it returns all descendants, if sort is true the nodes are sorted
|
Pager<TaxonNodeAgentRelation> |
pageTaxonNodeAgentRelations(java.util.UUID taxonUuid,
java.util.UUID classificationUuid,
java.util.UUID agentUuid,
java.util.UUID rankUuid,
java.util.UUID relTypeUuid,
java.lang.Integer pageSize,
java.lang.Integer pageIndex,
java.util.List<java.lang.String> propertyPaths)
Returns the of TaxonNodeAgentRelation entities which are associated with the TaxonNode for the
given TaxonUuid in the specified Classification.
|
TaxonNodeDto |
parentDto(java.util.UUID taxonNodeUuid) |
UpdateResult |
saveNewTaxonNode(TaxonNode newTaxonNode) |
protected void |
setDao(ITaxonNodeDao dao) |
UpdateResult |
setPublishForSubtree(PublishForSubtreeConfigurator config)
Sets the publish flag for all taxa and/or synonyms of the subtree.
|
UpdateResult |
setSecundumForSubtree(SecundumForSubtreeConfigurator config)
Sets the secundum reference for all taxa of the given subtree.
|
java.util.List<TaxonNodeDto> |
taxonNodeDtoParentRank(Classification classification,
Rank rank,
TaxonBase<?> taxonBase) |
java.util.List<TaxonNodeDto> |
taxonNodeDtoParentRank(Classification classification,
Rank rank,
TaxonName name) |
java.util.List<java.util.UUID> |
uuidList(TaxonNodeFilter filter)
Returns a list of taxon node
uuids according to the given filter. |
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, pageAuditEvents, pageAuditEvents
checkPublished, clear, count, delete, 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
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, pageAuditEvents, pageAuditEvents
clear, count, delete, 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, update
public java.util.List<TaxonNode> loadChildNodesOfTaxonNode(TaxonNode taxonNode, java.util.List<java.lang.String> propertyPaths, boolean recursive, boolean includeUnpublished, NodeSortMode sortMode)
ITaxonNodeService
loadChildNodesOfTaxonNode
in interface ITaxonNodeService
public java.util.List<TaxonNode> listChildrenOf(TaxonNode node, java.lang.Integer pageSize, java.lang.Integer pageIndex, boolean recursive, boolean includeUnpublished, java.util.List<java.lang.String> propertyPaths)
ITaxonNodeService
UuidAndTitleCache
which
represents the parent TaxonNode
listChildrenOf
in interface ITaxonNodeService
public TaxonNodeDto getParentUuidAndTitleCache(ITaxonTreeNode child)
ITaxonNodeService
TaxonNode
getParentUuidAndTitleCache
in interface ITaxonNodeService
child
- the child for which the parent should be retrievedpublic TaxonNodeDto getParentUuidAndTitleCache(TaxonNodeDto child)
ITaxonNodeService
TaxonNode
represented by the given UuidAndTitleCache
.getParentUuidAndTitleCache
in interface ITaxonNodeService
child
- the child for which the parent should be retrievedpublic java.util.List<TaxonNodeDto> listChildNodesAsTaxonNodeDto(TaxonNodeDto parent)
listChildNodesAsTaxonNodeDto
in interface ITaxonNodeService
public java.util.List<TaxonNodeDto> getUuidAndTitleCache(java.lang.Integer limit, java.lang.String pattern, java.util.UUID classificationUuid)
ITaxonNodeService
UuidAndTitleCache
objects that have a matchin titleCachegetUuidAndTitleCache
in interface ITaxonNodeService
limit
- the maximum resultspattern
- the titleCache that is searched forclassificationUuid
- if specified only nodes of this classification are retrievedpublic java.util.List<TaxonNodeDto> listChildNodesAsTaxonNodeDto(ITaxonTreeNode parent)
listChildNodesAsTaxonNodeDto
in interface ITaxonNodeService
public java.util.List<TaxonNodeDto> taxonNodeDtoParentRank(Classification classification, Rank rank, TaxonName name)
taxonNodeDtoParentRank
in interface ITaxonNodeService
public java.util.List<TaxonNodeDto> taxonNodeDtoParentRank(Classification classification, Rank rank, TaxonBase<?> taxonBase)
taxonNodeDtoParentRank
in interface ITaxonNodeService
public Pager<TaxonNodeDto> pageChildNodesDTOs(java.util.UUID taxonNodeUuid, boolean recursive, boolean includeUnpublished, boolean doSynonyms, NodeSortMode sortMode, java.lang.Integer pageSize, java.lang.Integer pageIndex)
ITaxonNodeService
pageChildNodesDTOs
in interface ITaxonNodeService
doSynonyms
- if true also synonyms are returned as childrenpublic TaxonNodeDto parentDto(java.util.UUID taxonNodeUuid)
parentDto
in interface ITaxonNodeService
public TaxonNodeDto dto(java.util.UUID taxonNodeUuid)
dto
in interface ITaxonNodeService
@Autowired protected void setDao(ITaxonNodeDao dao)
setDao
in class ServiceBase<TaxonNode,ITaxonNodeDao>
@Transactional(readOnly=false) public DeleteResult makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode, TaxonNode newAcceptedTaxonNode, SynonymType synonymType, Reference citation, java.lang.String citationMicroReference, boolean setNameInSource)
ITaxonNodeService
makeTaxonNodeASynonymOfAnotherTaxonNode
in interface ITaxonNodeService
@Transactional(readOnly=false) public UpdateResult makeTaxonNodeSynonymsOfAnotherTaxonNode(java.util.Set<java.util.UUID> oldTaxonNodeUuids, java.util.UUID newAcceptedTaxonNodeUUIDs, SynonymType synonymType, Reference citation, java.lang.String citationMicroReference, boolean setNameInSource)
ITaxonNodeService
makeTaxonNodeSynonymsOfAnotherTaxonNode
in interface ITaxonNodeService
@Transactional(readOnly=false) public UpdateResult makeTaxonNodeASynonymOfAnotherTaxonNode(java.util.UUID oldTaxonNodeUuid, java.util.UUID newAcceptedTaxonNodeUUID, SynonymType synonymType, Reference citation, java.lang.String citationMicroReference, boolean setNameInSource)
makeTaxonNodeASynonymOfAnotherTaxonNode
in interface ITaxonNodeService
@Transactional(readOnly=false) public DeleteResult deleteTaxonNodes(java.util.List<TaxonNode> list, TaxonDeletionConfigurator config)
ITaxonNodeService
deleteTaxonNodes
in interface ITaxonNodeService
@Transactional(readOnly=false) public DeleteResult deleteTaxonNodes(java.util.Collection<java.util.UUID> nodeUuids, TaxonDeletionConfigurator config)
deleteTaxonNodes
in interface ITaxonNodeService
@Transactional(readOnly=false) public DeleteResult deleteTaxonNode(java.util.UUID nodeUUID, TaxonDeletionConfigurator config)
deleteTaxonNode
in interface ITaxonNodeService
@Transactional(readOnly=false) public DeleteResult deleteTaxonNode(TaxonNode node, TaxonDeletionConfigurator config)
ITaxonNodeService
deleteTaxonNode
in interface ITaxonNodeService
public java.util.List<TaxonNode> listAllNodesForClassification(Classification classification, java.lang.Integer start, java.lang.Integer end)
listAllNodesForClassification
in interface ITaxonNodeService
public int countAllNodesForClassification(Classification classification)
ITaxonNodeService
countAllNodesForClassification
in interface ITaxonNodeService
classification
- - according to the given classification the TaxonNodes are filtered.@Transactional public UpdateResult moveTaxonNode(java.util.UUID taxonNodeUuid, java.util.UUID targetNodeUuid, int movingType)
moveTaxonNode
in interface ITaxonNodeService
@Transactional public UpdateResult moveTaxonNode(TaxonNode taxonNode, TaxonNode newParent, int movingType)
moveTaxonNode
in interface ITaxonNodeService
@Transactional public UpdateResult moveTaxonNodes(java.util.Set<java.util.UUID> taxonNodeUuids, java.util.UUID newParentNodeUuid, int movingType, IProgressMonitor monitor)
moveTaxonNodes
in interface ITaxonNodeService
public Pager<TaxonNodeAgentRelation> pageTaxonNodeAgentRelations(java.util.UUID taxonUuid, java.util.UUID classificationUuid, java.util.UUID agentUuid, java.util.UUID rankUuid, java.util.UUID relTypeUuid, java.lang.Integer pageSize, java.lang.Integer pageIndex, java.util.List<java.lang.String> propertyPaths)
ITaxonNodeService
pageTaxonNodeAgentRelations
in interface ITaxonNodeService
agentUuid
- TODOrankUuid
- TODOrelTypeUuid
- TODO@Transactional public UpdateResult createNewTaxonNode(java.util.UUID parentNodeUuid, Taxon newTaxon, Reference ref, java.lang.String microref)
createNewTaxonNode
in interface ITaxonNodeService
@Transactional public UpdateResult saveNewTaxonNode(TaxonNode newTaxonNode)
saveNewTaxonNode
in interface ITaxonNodeService
@Transactional public UpdateResult createNewTaxonNode(java.util.UUID parentNodeUuid, java.util.UUID taxonUuid, Reference ref, java.lang.String microref)
createNewTaxonNode
in interface ITaxonNodeService
@Transactional public UpdateResult addTaxonNodeAgentRelation(java.util.UUID taxonNodeUUID, java.util.UUID agentUUID, DefinedTerm relationshipType)
addTaxonNodeAgentRelation
in interface ITaxonNodeService
@Transactional(readOnly=false) public UpdateResult setSecundumForSubtree(SecundumForSubtreeConfigurator config)
ITaxonNodeService
SetSecundumForSubtreeConfigurator
for further configuration
options.setSecundumForSubtree
in interface ITaxonNodeService
@Transactional(readOnly=false) public UpdateResult setPublishForSubtree(PublishForSubtreeConfigurator config)
ITaxonNodeService
setPublishForSubtree
in interface ITaxonNodeService
public long count(TaxonNodeFilter filter)
ITaxonNodeService
uuids
according to the given filter.count
in interface ITaxonNodeService
public java.util.List<java.util.UUID> uuidList(TaxonNodeFilter filter)
ITaxonNodeService
uuids
according to the given filter.uuidList
in interface ITaxonNodeService
public java.util.List<java.lang.Integer> idList(TaxonNodeFilter filter)
ITaxonNodeService
idList
in interface ITaxonNodeService
public TaxonNodeDto findCommonParentDto(java.util.Collection<TaxonNodeDto> nodes)
ITaxonNodeService
null
is returned.findCommonParentDto
in interface ITaxonNodeService
nodes
- the direct/indirect child taxon nodes for which the common
parent should be retrievedpublic java.util.List<TaxonDistributionDTO> getTaxonDistributionDTO(java.util.List<java.util.UUID> nodeUuids, java.util.List<java.lang.String> propertyPaths, org.springframework.security.core.Authentication authentication, boolean openChildren)
getTaxonDistributionDTO
in interface ITaxonNodeService
public <S extends TaxonNode> 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<TaxonNode>
page
in class ServiceBase<TaxonNode,ITaxonNodeDao>
public <S extends TaxonNode> 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 ITaxonNodeService
public java.util.List<TaxonDistributionDTO> getTaxonDistributionDTO(java.util.List<java.util.UUID> nodeUuids, java.util.List<java.lang.String> propertyPaths, boolean openChildren)
getTaxonDistributionDTO
in interface ITaxonNodeService
Copyright © 2007-2020 EDIT. All Rights Reserved.