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
.api
.service
.config
.TaxonNodeDeletionConfigurator
;
19 import eu
.etaxonomy
.cdm
.api
.service
.exception
.DataChangeNoRollbackException
;
20 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
21 import eu
.etaxonomy
.cdm
.model
.taxon
.Classification
;
22 import eu
.etaxonomy
.cdm
.model
.taxon
.ITaxonTreeNode
;
23 import eu
.etaxonomy
.cdm
.model
.taxon
.Synonym
;
24 import eu
.etaxonomy
.cdm
.model
.taxon
.SynonymRelationshipType
;
25 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
30 * @created Apr 9, 2010
33 public interface ITaxonNodeService
extends IAnnotatableService
<TaxonNode
>{
39 @Deprecated // use findByUuid() instead; TODO will be removed in the next version
40 public TaxonNode
getTaxonNodeByUuid(UUID uuid
);
45 * @param propertyPaths
48 public List
<TaxonNode
> loadChildNodesOfTaxonNode(TaxonNode taxonNode
, List
<String
> propertyPaths
, boolean recursive
);
51 * Changes the taxon associated with the given taxon node into a synonym of the new accepted taxon node.
52 * All data associated with the former taxon are moved to the newly accepted taxon.
55 * @param newAcceptedTaxonNode
56 * @param synonymRelationshipType
58 * @param citationMicroReference
62 public Synonym
makeTaxonNodeASynonymOfAnotherTaxonNode(TaxonNode oldTaxonNode
, TaxonNode newAcceptedTaxonNode
, SynonymRelationshipType synonymRelationshipType
, Reference citation
, String citationMicroReference
) ;
65 * deletes the given taxon nodes
72 List
<UUID
> deleteTaxonNodes(Set
<ITaxonTreeNode
> nodes
,
73 TaxonDeletionConfigurator config
) ;
75 * deletes the given taxon node the configurator defines whether the children will be deleted too or not
82 public String
deleteTaxonNode(TaxonNode node
, TaxonDeletionConfigurator config
);
84 * Returns a List of all TaxonNodes of a given Classification.
86 * @param classification - according to the given classification the TaxonNodes are filtered.
87 * @param start - beginning of wanted row set, i.e. 0 if one want to start from the beginning.
88 * @param end - limit of how many rows are to be pulled from the database, i.e. 1000 rows.
89 * @return filtered List of TaxonNode according to the classification provided
91 public List
<TaxonNode
> listAllNodesForClassification(Classification classification
, Integer start
, Integer end
);
94 * Counts all TaxonNodes for a given Classification
96 * @param classification - according to the given classification the TaxonNodes are filtered.
99 public int countAllNodesForClassification(Classification classification
);