Search for specific references implemented (getReferencesByTitle)
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / INameService.java
1 /**
2 * Copyright (C) 2007 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.model.common.CdmBase;
18 import eu.etaxonomy.cdm.model.common.OrderedTermVocabulary;
19 import eu.etaxonomy.cdm.model.common.ReferencedEntityBase;
20 import eu.etaxonomy.cdm.model.common.TermVocabulary;
21 import eu.etaxonomy.cdm.model.name.*;
22
23 public interface INameService extends IIdentifiableEntityService<TaxonNameBase> {
24
25 /**
26 * @param uuid
27 * @return
28 */
29 public abstract TaxonNameBase getTaxonNameByUuid(UUID uuid);
30
31 /**
32 * @param taxonName
33 * @return
34 */
35 public abstract UUID saveTaxonName(TaxonNameBase taxonName);
36
37 /**
38 * Saves a collection of TaxonNames and return its UUID@param taxonCollection
39 * @return
40 */
41 public abstract Map<UUID, TaxonNameBase> saveTaxonNameAll(Collection<TaxonNameBase> taxonCollection);
42
43 public Map<UUID, TypeDesignationBase> saveTypeDesignationAll(Collection<TypeDesignationBase> typeDesignationCollection);
44
45 public Map<UUID, ReferencedEntityBase> saveReferencedEntitiesAll(Collection<ReferencedEntityBase> referencedEntityCollection);
46
47 public Map<UUID, HomotypicalGroup> saveAllHomotypicalGroups(Collection<HomotypicalGroup> homotypicalGroups);
48
49 /**
50 * @param limit
51 * @param start
52 * @return
53 */
54 public abstract List<TaxonNameBase> getAllNames(int limit, int start);
55
56 public abstract List<NomenclaturalStatus> getAllNomenclaturalStatus(int limit, int start);
57
58 public abstract List<TypeDesignationBase> getAllTypeDesignations(int limit, int start);
59
60 /**
61 * @param name
62 * @return
63 */
64 public abstract List<TaxonNameBase> getNamesByName(String name);
65
66 /**
67 * @param name
68 * @param sessionObject An object that is attached to the session before executing the query
69 * @return
70 */
71 public abstract List getNamesByName(String name, CdmBase sessionObject);
72
73 // TODO: Remove getNamesByName() methods. Use findNamesByTitle() instead.
74
75 public abstract List findNamesByTitle(String title);
76
77 public abstract List findNamesByTitle(String title, CdmBase sessionObject);
78
79 public List<HomotypicalGroup> getAllHomotypicalGroups(int limit, int start);
80
81 /**
82 * Returns all Ranks.
83 * @return
84 */
85 public abstract OrderedTermVocabulary<Rank> getRankVocabulary();
86
87 /**
88 * Returns all NomenclaturalStatusTypes.
89 * @return
90 */
91 public abstract TermVocabulary<NomenclaturalStatusType> getStatusTypeVocabulary();
92
93
94 /**
95 * Returns all NameRelationshipTypes.
96 * @return
97 */
98 public abstract TermVocabulary<NameRelationshipType> getNameRelationshipTypeVocabulary();
99 }