Project

General

Profile

Download (3.97 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.Synonym;
23
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
24
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
25

    
26

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

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

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

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

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

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

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

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

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

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

    
123
    /**
124
     * @param taxonNodeUuid
125
     * @param newParentTaxonNodeUuid
126
     * @return
127
     */
128
    public TaxonNode moveTaxonNode(UUID taxonNodeUuid, UUID newParentTaxonNodeUuid);
129

    
130

    
131

    
132

    
133

    
134

    
135

    
136

    
137

    
138

    
139
}
(57-57/88)