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.Collection;
|
13
|
import java.util.List;
|
14
|
import java.util.Map;
|
15
|
import java.util.UUID;
|
16
|
|
17
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
18
|
import eu.etaxonomy.cdm.model.term.TermNode;
|
19
|
import eu.etaxonomy.cdm.model.term.TermTree;
|
20
|
import eu.etaxonomy.cdm.model.term.TermType;
|
21
|
import eu.etaxonomy.cdm.persistence.dao.common.Restriction;
|
22
|
import eu.etaxonomy.cdm.persistence.dto.TermTreeDto;
|
23
|
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
|
24
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
25
|
|
26
|
public interface ITermTreeService extends IIdentifiableEntityService<TermTree> {
|
27
|
|
28
|
public List<TermTree> list(TermType termType, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);
|
29
|
|
30
|
public Pager<TermTree> page(TermType termType, Integer pageSize, Integer pageIndex, List<OrderHint> orderHints, List<String> propertyPaths);
|
31
|
|
32
|
/**
|
33
|
* Loads a term tree including all of its nodes (all the way down to the tips of the tree).
|
34
|
* Because this method automatically adds term nodes recursively, adding "root" to property paths
|
35
|
* is superfluous - the propertyPaths argument should be used to initialize property paths <i>in addition</i>
|
36
|
* to the term nodes. The nodePaths argument is applied to each node in turn, so again, adding "children"
|
37
|
* is also superfluous. The nodePaths argument should be used to specify additional properties of the term node
|
38
|
* to initialize (e.g. feature).
|
39
|
*
|
40
|
*/
|
41
|
public TermTree loadWithNodes(UUID uuid, List<String> propertyPaths, List<String> nodePaths);
|
42
|
|
43
|
public Map<UUID, TermNode> saveNodesAll(Collection<TermNode> featureNodeCollection);
|
44
|
|
45
|
public Map<UUID, TermNode> saveOrUpdateNodesAll(Collection<TermNode> featureNodeCollection);
|
46
|
|
47
|
public <S extends TermTree> List<UuidAndTitleCache<S>> getUuidAndTitleCacheByTermType(
|
48
|
Class<S> clazz, TermType termType, Integer limit, String pattern);
|
49
|
|
50
|
public List<Restriction<?>> buildTermTypeFilterRestrictions(TermType termType);
|
51
|
|
52
|
public List<TermTreeDto> listTermTreeDtosByTermType(TermType termType);
|
53
|
|
54
|
/**
|
55
|
* @param uuid
|
56
|
* @return
|
57
|
*/
|
58
|
public TermTreeDto getTermTreeDtoByUuid(UUID uuid);
|
59
|
|
60
|
/**
|
61
|
* @param dtos
|
62
|
* @return
|
63
|
*/
|
64
|
UpdateResult saveOrUpdateTermTreeDtoList(List<TermTreeDto> dtos);
|
65
|
|
66
|
|
67
|
}
|