1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
|
11
|
package eu.etaxonomy.cdm.api.service;
|
12
|
|
13
|
import java.util.HashSet;
|
14
|
import java.util.List;
|
15
|
import java.util.Set;
|
16
|
import java.util.UUID;
|
17
|
|
18
|
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
|
19
|
import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
|
20
|
import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;
|
21
|
import eu.etaxonomy.cdm.model.common.ITreeNode;
|
22
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
23
|
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
|
24
|
import eu.etaxonomy.cdm.model.taxon.Synonym;
|
25
|
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
|
26
|
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
|
27
|
|
28
|
|
29
|
/**
|
30
|
* @author n.hoffmann
|
31
|
* @created Apr 9, 2010
|
32
|
* @version 1.0
|
33
|
*/
|
34
|
public interface ITaxonNodeService extends IAnnotatableService<TaxonNode>{
|
35
|
|
36
|
/**
|
37
|
*
|
38
|
* @param uuid
|
39
|
*/
|
40
|
@Deprecated // use findByUuid() instead; TODO will be removed in the next version
|
41
|
public TaxonNode getTaxonNodeByUuid(UUID uuid);
|
42
|
|
43
|
/**
|
44
|
*
|
45
|
* @param taxonNode
|
46
|
* @param propertyPaths
|
47
|
* @return
|
48
|
*/
|
49
|
public List<TaxonNode> loadChildNodesOfTaxonNode(TaxonNode taxonNode, List<String> propertyPaths);
|
50
|
|
51
|
/**
|
52
|
* Changes the taxon associated with the given taxon node into a synonym of the new accepted taxon node.
|
53
|
* All data associated with the former taxon are moved to the newly accepted taxon.
|
54
|
*
|
55
|
* @param oldTaxonNode
|
56
|
* @param newAcceptedTaxonNode
|
57
|
* @param synonymRelationshipType
|
58
|
* @param citation
|
59
|
* @param citationMicroReference
|
60
|
* @return
|
61
|
* @throws DataChangeNoRollbackException
|
62
|
*/
|
63
|
public Synonym makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode, TaxonNode newAcceptedTaxonNode, SynonymRelationshipType synonymRelationshipType, Reference citation, String citationMicroReference) throws DataChangeNoRollbackException;
|
64
|
|
65
|
/**
|
66
|
* deletes the given taxon nodes
|
67
|
*
|
68
|
* @param nodes
|
69
|
* @param config
|
70
|
* @return
|
71
|
*
|
72
|
*/
|
73
|
List<UUID> deleteTaxonNodes(Set<ITaxonTreeNode> nodes,
|
74
|
TaxonDeletionConfigurator config) throws DataChangeNoRollbackException;
|
75
|
/**
|
76
|
* deletes the given taxon node the configurator defines whether the children will be deleted too or not
|
77
|
*
|
78
|
* @param node
|
79
|
* @param conf
|
80
|
* @return
|
81
|
*
|
82
|
*/
|
83
|
public UUID deleteTaxonNode(TaxonNode node, TaxonDeletionConfigurator config)
|
84
|
throws DataChangeNoRollbackException;
|
85
|
|
86
|
|
87
|
|
88
|
|
89
|
|
90
|
}
|