Project

General

Profile

Download (2.43 KB) Statistics
| Branch: | Tag: | Revision:
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
package eu.etaxonomy.cdm.api.service;
10

    
11
import java.util.Collection;
12
import java.util.List;
13
import java.util.Map;
14
import java.util.UUID;
15

    
16
import eu.etaxonomy.cdm.api.service.pager.Pager;
17
import eu.etaxonomy.cdm.model.term.TermNode;
18
import eu.etaxonomy.cdm.model.term.TermTree;
19
import eu.etaxonomy.cdm.model.term.TermType;
20
import eu.etaxonomy.cdm.persistence.dao.common.Restriction;
21
import eu.etaxonomy.cdm.persistence.dto.TermTreeDto;
22
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
23
import eu.etaxonomy.cdm.persistence.query.OrderHint;
24

    
25
public interface ITermTreeService extends IIdentifiableEntityService<TermTree> {
26

    
27
    public List<TermTree> list(TermType termType, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);
28

    
29
    public Pager<TermTree> page(TermType termType, Integer pageSize, Integer pageIndex, List<OrderHint> orderHints, List<String> propertyPaths);
30

    
31
	/**
32
	 * Loads a term tree including all of its nodes (all the way down to the tips of the tree).
33
	 * Because this method automatically adds term nodes recursively, adding "root" to property paths
34
	 * is superfluous - the propertyPaths argument should be used to initialize property paths <i>in addition</i>
35
	 * to the term nodes. The nodePaths argument is applied to each node in turn, so again, adding "children"
36
	 * is also superfluous. The nodePaths argument should be used to specify additional properties of the term node
37
	 * to initialize (e.g. feature).
38
	 *
39
	 */
40
	public TermTree loadWithNodes(UUID uuid, List<String> propertyPaths, List<String> nodePaths);
41

    
42
	public Map<UUID, TermNode> saveNodesAll(Collection<TermNode> featureNodeCollection);
43

    
44
	public Map<UUID, TermNode> saveOrUpdateNodesAll(Collection<TermNode> featureNodeCollection);
45

    
46
	public <S extends TermTree> List<UuidAndTitleCache<S>> getUuidAndTitleCacheByTermType(
47
	        Class<S> clazz, TermType termType, Integer limit, String pattern);
48

    
49
    public List<Restriction<?>> buildTermTypeFilterRestrictions(TermType termType);
50

    
51
    public List<TermTreeDto> listTermTreeDtosByTermType(TermType termType);
52

    
53
    public TermTreeDto getTermTreeDtoByUuid(UUID uuid);
54

    
55
    public UpdateResult saveOrUpdateTermTreeDtoList(List<TermTreeDto> dtos);
56

    
57

    
58
}
(59-59/95)