Merge branch 'develop' of ssh://dev.e-taxonomy.eu/var/git/cdmlib into develop
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IPolytomousKeyService.java
1 /**
2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9
10 package eu.etaxonomy.cdm.api.service;
11
12 import java.util.List;
13 import java.util.UUID;
14
15 import eu.etaxonomy.cdm.api.service.pager.Pager;
16 import eu.etaxonomy.cdm.model.description.PolytomousKey;
17 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
18
19 public interface IPolytomousKeyService extends IIdentifiableEntityService<PolytomousKey> {
20
21 /**
22 * Loads a polytomous key including all of its nodes (all the way down to the tips of the tree).
23 * Because this method automatically adds key nodes recursively, adding "root" to property paths
24 * is superfluous - the propertyPaths argument should be used to initialize property paths <i>in addition</i>
25 * to the key nodes. The nodePaths argument is applied to each node in turn, so again, adding "children"
26 * is also superfluous. The nodePaths argument should be used to specify additional properties of the
27 * key node to initialize.
28 *
29 */
30 public PolytomousKey loadWithNodes(UUID uuid, List<String> propertyPaths, List<String> nodePaths);
31
32 public Pager<PolytomousKey> findByTaxonomicScope(TaxonBase taxon, Integer pageSize,
33 Integer pageNumber, List<String> propertyPaths, List<String> nodePaths);
34
35 /**
36 * Refreshes all node numberings recursively from the root node downwards.
37 *
38 * @param polytomousKeyUuid
39 * @return
40 */
41 public UpdateResult updateAllNodeNumberings(UUID polytomousKeyUuid);
42
43 /**
44 * Refreshes all node numberings for all polytomous keys recursively from the root node downwards.
45 *
46 * @return
47 */
48 public UpdateResult updateAllNodeNumberings();
49
50 }