Project

General

Profile

Download (4.19 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.SynonymRelationshipType;
22
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
23

    
24

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

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

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

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

    
62

    
63
    /**
64
     * @param nodeUuids
65
     * @param config
66
     * @return
67
     */
68
    public DeleteResult deleteTaxonNodes(Collection<UUID> nodeUuids, TaxonDeletionConfigurator config);
69

    
70
	/**
71
	 * deletes the given taxon node the configurator defines whether the children will be deleted too or not
72
	 *
73
	 * @param node
74
	 * @param conf
75
	 * @return
76
	 *
77
	 */
78
	public DeleteResult deleteTaxonNode(TaxonNode node, TaxonDeletionConfigurator config);
79
	/**
80
	 * Returns a List of all TaxonNodes of a given Classification.
81
	 *
82
	 * @param classification - according to the given classification the TaxonNodes are filtered.
83
	 * @param start -  beginning of wanted row set, i.e. 0 if one want to start from the beginning.
84
	 * @param end  - limit of how many rows are to be pulled from the database, i.e. 1000 rows.
85
	 * @return filtered List of TaxonNode according to the classification provided
86
	 */
87

    
88
    /**
89
     * @param nodeUuid
90
     * @param config
91
     * @return
92
     */
93
    public DeleteResult deleteTaxonNode(UUID nodeUuid, TaxonDeletionConfigurator config);
94

    
95
	public List<TaxonNode> listAllNodesForClassification(Classification classification, Integer start, Integer end);
96

    
97
	/**
98
	 * Counts all TaxonNodes for a given Classification
99
	 *
100
	 * @param classification - according to the given classification the TaxonNodes are filtered.
101
	 * @return
102
	 */
103
	public int countAllNodesForClassification(Classification classification);
104

    
105

    
106
    /**
107
     * @param taxonNodeUuid
108
     * @param newParentTaxonNodeUuid
109
     * @return
110
     */
111
    public UpdateResult moveTaxonNode(UUID taxonNodeUuid, UUID newParentTaxonNodeUuid, boolean parent);
112

    
113

    
114

    
115
    /**
116
     * @param taxonNodeUuids
117
     * @param newParentNodeUuid
118
     * @return
119
     */
120
    UpdateResult moveTaxonNodes(Set<UUID> taxonNodeUuids, UUID newParentNodeUuid, boolean parent);
121

    
122
    /**
123
     * @param taxonNode
124
     * @param newParent
125
     * @param parent
126
     * @return
127
     */
128
    UpdateResult moveTaxonNode(TaxonNode taxonNode, TaxonNode newParent, boolean parent);
129

    
130
    /**
131
     * deletes the given taxon nodes
132
     *
133
     * @param nodes
134
     * @param config
135
     * @return
136
     *
137
     */
138
    public DeleteResult deleteTaxonNodes(List<TaxonNode> list, TaxonDeletionConfigurator config);
139

    
140

    
141

    
142

    
143
}
(57-57/92)