Project

General

Profile

Download (4.18 KB) Statistics
| Branch: | Tag: | Revision:
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.Collection;
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.model.reference.Reference;
20
import eu.etaxonomy.cdm.model.taxon.Classification;
21
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
22
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
23
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
24

    
25

    
26
/**
27
 * @author n.hoffmann
28
 * @created Apr 9, 2010
29
 * @version 1.0
30
 */
31
public interface ITaxonNodeService extends IAnnotatableService<TaxonNode>{
32

    
33
	/**
34
	 *returns the childnodes of the taxonNode, if recursive is true it returns all descendants, if sort is true the nodes are sorted
35
	 *
36
	 * @param taxonNode
37
	 * @param propertyPaths
38
	 * @param recursive
39
	 * @return List<TaxonNode>
40
	 */
41
	public List<TaxonNode> loadChildNodesOfTaxonNode(TaxonNode taxonNode, List<String> propertyPaths, boolean recursive, NodeSortMode sortMode);
42

    
43
	/**
44
	 * Changes the taxon associated with the given taxon node into a synonym of the new accepted taxon node.
45
	 * All data associated with the former taxon are moved to the newly accepted taxon.
46
	 *
47
	 * @param oldTaxonNode
48
	 * @param newAcceptedTaxonNode
49
	 * @param synonymRelationshipType
50
	 * @param citation
51
	 * @param citationMicroReference
52
	 * @return
53
	 *
54
	 */
55
	public DeleteResult makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode, TaxonNode newAcceptedTaxonNode, SynonymRelationshipType synonymRelationshipType, Reference citation, String citationMicroReference) ;
56

    
57
	public UpdateResult makeTaxonNodeASynonymOfAnotherTaxonNode(UUID oldTaxonNodeUuid,
58
	        UUID newAcceptedTaxonNodeUUID,
59
	        SynonymRelationshipType synonymRelationshipType,
60
	        Reference citation,
61
	        String citationMicroReference) ;
62

    
63
	/**
64
	 * deletes the given taxon nodes
65
	 *
66
	 * @param nodes
67
	 * @param config
68
	 * @return
69
	 *
70
	 */
71
	public DeleteResult deleteTaxonNodes(Set<ITaxonTreeNode> nodes,
72
			TaxonDeletionConfigurator config) ;
73
    /**
74
     * @param nodeUuids
75
     * @param config
76
     * @return
77
     */
78
    public DeleteResult deleteTaxonNodes(Collection<UUID> nodeUuids, TaxonDeletionConfigurator config);
79

    
80
	/**
81
	 * deletes the given taxon node the configurator defines whether the children will be deleted too or not
82
	 *
83
	 * @param node
84
	 * @param conf
85
	 * @return
86
	 *
87
	 */
88
	public DeleteResult deleteTaxonNode(TaxonNode node, TaxonDeletionConfigurator config);
89
	/**
90
	 * Returns a List of all TaxonNodes of a given Classification.
91
	 *
92
	 * @param classification - according to the given classification the TaxonNodes are filtered.
93
	 * @param start -  beginning of wanted row set, i.e. 0 if one want to start from the beginning.
94
	 * @param end  - limit of how many rows are to be pulled from the database, i.e. 1000 rows.
95
	 * @return filtered List of TaxonNode according to the classification provided
96
	 */
97

    
98
    /**
99
     * @param nodeUuid
100
     * @param config
101
     * @return
102
     */
103
    public DeleteResult deleteTaxonNode(UUID nodeUuid, TaxonDeletionConfigurator config);
104

    
105
	public List<TaxonNode> listAllNodesForClassification(Classification classification, Integer start, Integer end);
106

    
107
	/**
108
	 * Counts all TaxonNodes for a given Classification
109
	 *
110
	 * @param classification - according to the given classification the TaxonNodes are filtered.
111
	 * @return
112
	 */
113
	public int countAllNodesForClassification(Classification classification);
114

    
115

    
116
    /**
117
     * @param taxonNode
118
     * @param newParentTaxonNode
119
     * @return
120
     */
121
    public UpdateResult moveTaxonNode(TaxonNode taxonNode, TaxonNode newParentTaxonNode);
122

    
123

    
124

    
125

    
126
    /**
127
     * @param taxonNodeUuid
128
     * @param newParentTaxonNodeUuid
129
     * @return
130
     */
131
    public UpdateResult moveTaxonNode(UUID taxonNodeUuid, UUID newParentTaxonNodeUuid);
132

    
133

    
134

    
135
    /**
136
     * @param taxonNodeUuids
137
     * @param newParentNodeUuid
138
     * @return
139
     */
140
    UpdateResult moveTaxonNodes(Set<UUID> taxonNodeUuids, UUID newParentNodeUuid);
141

    
142

    
143

    
144

    
145
}
(57-57/92)