Project

General

Profile

Download (4.18 KB) Statistics
| Branch: | Tag: | Revision:
1 892efc69 Andreas Kohlbecker
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4 c50bbf8d Alexander Oppermann
* European Distributed Institute of Taxonomy
5 892efc69 Andreas Kohlbecker
* http://www.e-taxonomy.eu
6 c50bbf8d Alexander Oppermann
*
7 892efc69 Andreas Kohlbecker
* 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 de5c2087 Cherian Mathew
import java.util.Collection;
14 892efc69 Andreas Kohlbecker
import java.util.List;
15 679d8c93 Katja Luther
import java.util.Set;
16 de5c2087 Cherian Mathew
import java.util.UUID;
17 892efc69 Andreas Kohlbecker
18 67e85088 Katja Luther
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
19 fd992c0d n.hoffmann
import eu.etaxonomy.cdm.model.reference.Reference;
20 0ac7b8a4 Katja Luther
import eu.etaxonomy.cdm.model.taxon.Classification;
21 ca814968 Katja Luther
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
22 fd992c0d n.hoffmann
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType;
23 892efc69 Andreas Kohlbecker
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 95b07aa3 Katja Luther
	 *returns the childnodes of the taxonNode, if recursive is true it returns all descendants, if sort is true the nodes are sorted
35 c50bbf8d Alexander Oppermann
	 *
36 892efc69 Andreas Kohlbecker
	 * @param taxonNode
37
	 * @param propertyPaths
38 c7e33773 Katja Luther
	 * @param recursive
39 95b07aa3 Katja Luther
	 * @return List<TaxonNode>
40 892efc69 Andreas Kohlbecker
	 */
41 971c0943 Katja Luther
	public List<TaxonNode> loadChildNodesOfTaxonNode(TaxonNode taxonNode, List<String> propertyPaths, boolean recursive, NodeSortMode sortMode);
42 c50bbf8d Alexander Oppermann
43 fd992c0d n.hoffmann
	/**
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 c50bbf8d Alexander Oppermann
	 *
47 fd992c0d n.hoffmann
	 * @param oldTaxonNode
48
	 * @param newAcceptedTaxonNode
49
	 * @param synonymRelationshipType
50
	 * @param citation
51
	 * @param citationMicroReference
52
	 * @return
53 1995f802 Katja Luther
	 *
54 fd992c0d n.hoffmann
	 */
55 73b60882 Katja Luther
	public DeleteResult makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode, TaxonNode newAcceptedTaxonNode, SynonymRelationshipType synonymRelationshipType, Reference citation, String citationMicroReference) ;
56 c50bbf8d Alexander Oppermann
57 51a3a962 Cherian Mathew
	public UpdateResult makeTaxonNodeASynonymOfAnotherTaxonNode(UUID oldTaxonNodeUuid,
58 de5c2087 Cherian Mathew
	        UUID newAcceptedTaxonNodeUUID,
59
	        SynonymRelationshipType synonymRelationshipType,
60
	        Reference citation,
61
	        String citationMicroReference) ;
62
63 67e85088 Katja Luther
	/**
64 c50bbf8d Alexander Oppermann
	 * deletes the given taxon nodes
65
	 *
66 67e85088 Katja Luther
	 * @param nodes
67
	 * @param config
68 c50bbf8d Alexander Oppermann
	 * @return
69
	 *
70 67e85088 Katja Luther
	 */
71 de5c2087 Cherian Mathew
	public DeleteResult deleteTaxonNodes(Set<ITaxonTreeNode> nodes,
72 1995f802 Katja Luther
			TaxonDeletionConfigurator config) ;
73 de5c2087 Cherian Mathew
    /**
74
     * @param nodeUuids
75
     * @param config
76
     * @return
77
     */
78
    public DeleteResult deleteTaxonNodes(Collection<UUID> nodeUuids, TaxonDeletionConfigurator config);
79
80 679d8c93 Katja Luther
	/**
81
	 * deletes the given taxon node the configurator defines whether the children will be deleted too or not
82 c50bbf8d Alexander Oppermann
	 *
83 679d8c93 Katja Luther
	 * @param node
84
	 * @param conf
85 c50bbf8d Alexander Oppermann
	 * @return
86
	 *
87 679d8c93 Katja Luther
	 */
88 08d62c6f Katja Luther
	public DeleteResult deleteTaxonNode(TaxonNode node, TaxonDeletionConfigurator config);
89 c50bbf8d Alexander Oppermann
	/**
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 de5c2087 Cherian Mathew
98
    /**
99
     * @param nodeUuid
100
     * @param config
101
     * @return
102
     */
103
    public DeleteResult deleteTaxonNode(UUID nodeUuid, TaxonDeletionConfigurator config);
104
105 1eb3d17a Alexander Oppermann
	public List<TaxonNode> listAllNodesForClassification(Classification classification, Integer start, Integer end);
106 c50bbf8d Alexander Oppermann
107 bd47b74d Alexander Oppermann
	/**
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 c50bbf8d Alexander Oppermann
115 b323fb94 Katja Luther
116 933e5ac3 Cherian Mathew
    /**
117
     * @param taxonNode
118
     * @param newParentTaxonNode
119
     * @return
120
     */
121 51a3a962 Cherian Mathew
    public UpdateResult moveTaxonNode(TaxonNode taxonNode, TaxonNode newParentTaxonNode);
122 933e5ac3 Cherian Mathew
123 1e3d56bb U-BGBM\k.luther
124 67e85088 Katja Luther
125
126 933e5ac3 Cherian Mathew
    /**
127
     * @param taxonNodeUuid
128
     * @param newParentTaxonNodeUuid
129
     * @return
130
     */
131 51a3a962 Cherian Mathew
    public UpdateResult moveTaxonNode(UUID taxonNodeUuid, UUID newParentTaxonNodeUuid);
132 933e5ac3 Cherian Mathew
133 82a73743 k.luther
134
135 6ae5ca99 Katja Luther
    /**
136
     * @param taxonNodeUuids
137
     * @param newParentNodeUuid
138
     * @return
139
     */
140
    UpdateResult moveTaxonNodes(Set<UUID> taxonNodeUuids, UUID newParentNodeUuid);
141
142 1e3d56bb U-BGBM\k.luther
143
144
145 892efc69 Andreas Kohlbecker
}