taking over class from IdentificationKeyGenerator2:
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IVocabularyService.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
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;
20
21 public interface IVocabularyService extends IIdentifiableEntityService<TermVocabulary> {
22 public TermVocabulary getVocabulary(VocabularyEnum vocabularyType);
23
24 /**
25 * Returns term vocabularies that contain terms of a certain class e.g. Feature, Modifier, State.
26 *
27 * @param <TERM>
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)
31 * @param orderHints
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
37 */
38 public <TERM extends DefinedTermBase> List<TermVocabulary<TERM>> listByTermClass(Class<TERM> clazz, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);
39
40 /**
41 * Returns Language Vocabulary
42 * @return
43 */
44 public TermVocabulary<Language> getLanguageVocabulary();
45
46 /**
47 * Returns a list of terms belonging to the vocabulary passed as an argument
48 *
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)
52 * @param orderHints
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
58 */
59 public Pager<DefinedTermBase> getTerms(TermVocabulary vocabulary, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);
60
61 }