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
.List
;
14 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
15 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
16 import eu
.etaxonomy
.cdm
.model
.common
.Language
;
17 import eu
.etaxonomy
.cdm
.model
.common
.TermVocabulary
;
18 import eu
.etaxonomy
.cdm
.model
.common
.VocabularyEnum
;
19 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
21 public interface IVocabularyService
extends IIdentifiableEntityService
<TermVocabulary
> {
22 public TermVocabulary
getVocabulary(VocabularyEnum vocabularyType
);
25 * Returns term vocabularies that contain terms of a certain class e.g. Feature, Modifier, State.
28 * @param clazz the term class of the terms in the vocabulary
29 * @param limit The maximum number of vocabularies returned (can be null for all vocabularies)
30 * @param start The offset from the start of the result set (0 - based, can be null - equivalent of starting at the beginning of the recordset)
32 * Supports path like <code>orderHints.propertyNames</code> which
33 * include *-to-one properties like createdBy.username or
34 * authorTeam.persistentTitleCache
35 * @param propertyPaths properties to be initialized
36 * @return a list of term vocabularies
38 public <TERM
extends DefinedTermBase
> List
<TermVocabulary
<TERM
>> listByTermClass(Class
<TERM
> clazz
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
41 * Returns Language Vocabulary
44 public TermVocabulary
<Language
> getLanguageVocabulary();
47 * Returns a list of terms belonging to the vocabulary passed as an argument
49 * @param vocabulary The vocabulary for which the list of terms is desired
50 * @param limit The maximum number of terms returned (can be null for all terms in the vocabulary)
51 * @param start The offset from the start of the result set (0 - based, can be null - equivalent of starting at the beginning of the recordset)
53 * Supports path like <code>orderHints.propertyNames</code> which
54 * include *-to-one properties like createdBy.username or
55 * authorTeam.persistentTitleCache
56 * @param propertyPaths properties to be initialized
57 * @return a paged list of terms
59 public Pager
<DefinedTermBase
> getTerms(TermVocabulary vocabulary
, Integer limit
, Integer start
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);