Project

General

Profile

Download (1.85 KB) Statistics
| Branch: | Tag: | Revision:
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.model.term;
11

    
12
import java.util.Set;
13

    
14
import eu.etaxonomy.cdm.model.media.Media;
15

    
16
public interface IDefinedTerm<T extends IDefinedTerm>
17
        extends ISimpleTerm<T>, ILoadableTerm<T> {
18

    
19
    /**
20
     * Returns the defined term this term is a part of.
21
     * Therefore the returned term includes <code>this</code> term
22
     * Discuss: move to {@link ISimpleTerm}?
23
     * @see #getIncludes()
24
     */
25
    //Discuss: move to ISimpleTerm
26
    public T getPartOf();
27

    
28

    
29
    /**
30
     * Returns all defined terms this term includes.
31
     * Therefore the returned terms are part of <code>this</code> term
32
     * Discuss: move to {@link ISimpleTerm}?
33
     *
34
     * FIXME getIncludes():  Hibernate returns this as a collection of CGLibProxy$$DefinedTermBase objects
35
     * which can't be cast to instances of T - can we explicitly initialize these terms using
36
     * Hibernate.initialize() or ( ( PersistentCollection ) proxy ).forceInitialization(),
37
     * does this imply a distinct load, and find methods in the dao?
38
     *
39
     * @see #getPartOf()
40
     */
41
    public Set<T> getIncludes();
42

    
43
    /**
44
     * Returns the media attached to this {@link IDefinedTerm term}
45
     * @return
46
     */
47
    public Set<Media> getMedia();
48

    
49
    /**
50
     * Returns the label of this term used (and unique) in the term's vocabulary.
51
     * @see #setIdInVocabulary(String)
52
     */
53
    public String getIdInVocabulary();
54

    
55
    /**
56
     * Sets the label of this term used (and unique) in the term's vocabulary.
57
     * @see #getIdInVocabulary()
58
     * @param idInVocabulary
59
     */
60
    public void setIdInVocabulary(String idInVocabulary);
61

    
62
}
(5-5/23)