2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.util
.Arrays
;
13 import java
.util
.Collection
;
14 import java
.util
.List
;
16 import java
.util
.UUID
;
18 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
19 import eu
.etaxonomy
.cdm
.model
.term
.TermNode
;
20 import eu
.etaxonomy
.cdm
.model
.term
.TermTree
;
21 import eu
.etaxonomy
.cdm
.model
.term
.TermType
;
22 import eu
.etaxonomy
.cdm
.persistence
.dao
.common
.Restriction
;
23 import eu
.etaxonomy
.cdm
.persistence
.dao
.common
.Restriction
.Operator
;
24 import eu
.etaxonomy
.cdm
.persistence
.dto
.UuidAndTitleCache
;
25 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
27 public interface ITermTreeService
extends IIdentifiableEntityService
<TermTree
> {
29 public List
<TermTree
> list(TermType termType
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
31 public Pager
<TermTree
> page(TermType termType
, Integer pageSize
, Integer pageIndex
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
34 * Loads a term tree including all of its nodes (all the way down to the tips of the tree).
35 * Because this method automatically adds term nodes recursively, adding "root" to property paths
36 * is superfluous - the propertyPaths argument should be used to initialize property paths <i>in addition</i>
37 * to the term nodes. The nodePaths argument is applied to each node in turn, so again, adding "children"
38 * is also superfluous. The nodePaths argument should be used to specify additional properties of the term node
39 * to initialize (e.g. feature).
42 public TermTree
loadWithNodes(UUID uuid
, List
<String
> propertyPaths
, List
<String
> nodePaths
);
44 public Map
<UUID
, TermNode
> saveNodesAll(Collection
<TermNode
> featureNodeCollection
);
46 public Map
<UUID
, TermNode
> saveOrUpdateNodesAll(Collection
<TermNode
> featureNodeCollection
);
48 public <S
extends TermTree
> List
<UuidAndTitleCache
<S
>> getUuidAndTitleCacheByTermType(
49 Class
<S
> clazz
, TermType termType
, Integer limit
, String pattern
);
51 List
<Restriction
<?
>> buildTermTypeFilterRestrictions(TermType termType
);