3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.cdm
.api
.service
;
13 import java
.util
.List
;
15 import java
.util
.UUID
;
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
;
28 * @created Apr 9, 2010
31 public interface ITaxonNodeService
extends IAnnotatableService
<TaxonNode
>{
34 *returns the childnodes of the taxonNode, if recursive is true it returns all descendants
37 * @param propertyPaths
41 public List
<TaxonNode
> loadChildNodesOfTaxonNode(TaxonNode taxonNode
, List
<String
> propertyPaths
, boolean recursive
, boolean sort
);
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.
48 * @param newAcceptedTaxonNode
49 * @param synonymRelationshipType
51 * @param citationMicroReference
55 public Synonym
makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode
, TaxonNode newAcceptedTaxonNode
, SynonymRelationshipType synonymRelationshipType
, Reference citation
, String citationMicroReference
) ;
58 * deletes the given taxon nodes
65 List
<UUID
> deleteTaxonNodes(Set
<ITaxonTreeNode
> nodes
,
66 TaxonDeletionConfigurator config
) ;
68 * deletes the given taxon node the configurator defines whether the children will be deleted too or not
75 public String
deleteTaxonNode(TaxonNode node
, TaxonDeletionConfigurator config
);
77 * Returns a List of all TaxonNodes of a given Classification.
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
84 public List
<TaxonNode
> listAllNodesForClassification(Classification classification
, Integer start
, Integer end
);
87 * Counts all TaxonNodes for a given Classification
89 * @param classification - according to the given classification the TaxonNodes are filtered.
92 public int countAllNodesForClassification(Classification classification
);