set sorting in getChildNodes optional & minor for delete in bulk editor
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / ITaxonNodeService.java
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.List;
14 import java.util.Set;
15 import java.util.UUID;
16
17 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
18 import eu.etaxonomy.cdm.model.reference.Reference;
19 import eu.etaxonomy.cdm.model.taxon.Classification;
20 import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
21 import eu.etaxonomy.cdm.model.taxon.Synonym;
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
35 *
36 * @param taxonNode
37 * @param propertyPaths
38 * @param recursive
39 * @return
40 */
41 public List<TaxonNode> loadChildNodesOfTaxonNode(TaxonNode taxonNode, List<String> propertyPaths, boolean recursive, boolean sort);
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 Synonym makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode, TaxonNode newAcceptedTaxonNode, SynonymRelationshipType synonymRelationshipType, Reference citation, String citationMicroReference) ;
56
57 /**
58 * deletes the given taxon nodes
59 *
60 * @param nodes
61 * @param config
62 * @return
63 *
64 */
65 List<UUID> deleteTaxonNodes(Set<ITaxonTreeNode> nodes,
66 TaxonDeletionConfigurator config) ;
67 /**
68 * deletes the given taxon node the configurator defines whether the children will be deleted too or not
69 *
70 * @param node
71 * @param conf
72 * @return
73 *
74 */
75 public String deleteTaxonNode(TaxonNode node, TaxonDeletionConfigurator config);
76 /**
77 * Returns a List of all TaxonNodes of a given Classification.
78 *
79 * @param classification - according to the given classification the TaxonNodes are filtered.
80 * @param start - beginning of wanted row set, i.e. 0 if one want to start from the beginning.
81 * @param end - limit of how many rows are to be pulled from the database, i.e. 1000 rows.
82 * @return filtered List of TaxonNode according to the classification provided
83 */
84 public List<TaxonNode> listAllNodesForClassification(Classification classification, Integer start, Integer end);
85
86 /**
87 * Counts all TaxonNodes for a given Classification
88 *
89 * @param classification - according to the given classification the TaxonNodes are filtered.
90 * @return
91 */
92 public int countAllNodesForClassification(Classification classification);
93
94
95
96
97
98
99 }