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.common;
|
11
|
|
12
|
import java.util.Set;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.media.Media;
|
15
|
|
16
|
public interface IDefinedTerm<T extends IDefinedTerm> extends ISimpleTerm<T>, ILoadableTerm<T> {
|
17
|
|
18
|
|
19
|
// public void setKindOf(T kindOf);
|
20
|
|
21
|
|
22
|
// public void setGeneralizationOf(Set<T> generalizationOf);
|
23
|
//
|
24
|
// public void addGeneralizationOf(T generalization);
|
25
|
//
|
26
|
// public void removeGeneralization(T generalization);
|
27
|
|
28
|
/**
|
29
|
* Returns the defined term this term is a part of.
|
30
|
* Therefore the returned term includes <code>this</code> term
|
31
|
* Discuss: move to {@link ISimpleTerm}?
|
32
|
* @see #getIncludes()
|
33
|
*/
|
34
|
//Discuss: move to ISimpleTerm
|
35
|
public T getPartOf();
|
36
|
|
37
|
// public void setPartOf(T partOf);
|
38
|
|
39
|
/**
|
40
|
* Returns all defined terms this term includes.
|
41
|
* Therefore the returned terms are part of <code>this</code> term
|
42
|
* Discuss: move to {@link ISimpleTerm}?
|
43
|
*
|
44
|
* FIXME getIncludes(): Hibernate returns this as a collection of CGLibProxy$$DefinedTermBase objects
|
45
|
* which can't be cast to instances of T - can we explicitly initialize these terms using
|
46
|
* Hibernate.initialize() or ( ( PersistentCollection ) proxy ).forceInitialization(),
|
47
|
* does this imply a distinct load, and find methods in the dao?
|
48
|
*
|
49
|
* @see #getPartOf()
|
50
|
*/
|
51
|
public Set<T> getIncludes();
|
52
|
|
53
|
// public void setIncludes(Set<T> includes);
|
54
|
//
|
55
|
// public void addIncludes(T includes);
|
56
|
//
|
57
|
// public void removeIncludes(T includes);
|
58
|
|
59
|
/**
|
60
|
* Returns the media attached to this {@link IDefinedTerm term}
|
61
|
* @return
|
62
|
*/
|
63
|
public Set<Media> getMedia();
|
64
|
|
65
|
// public void setMedia(Set<Media> media);
|
66
|
//
|
67
|
// public void addMedia(Media media);
|
68
|
//
|
69
|
// public void removeMedia(Media media);
|
70
|
|
71
|
/* (non-Javadoc)
|
72
|
* @see eu.etaxonomy.cdm.model.common.IDefTerm#getVocabulary()
|
73
|
*/
|
74
|
// public TermVocabulary<T> getVocabulary();
|
75
|
|
76
|
/* (non-Javadoc)
|
77
|
* @see eu.etaxonomy.cdm.model.common.IDefTerm#setVocabulary(eu.etaxonomy.cdm.model.common.TermVocabulary)
|
78
|
*/
|
79
|
// public void setVocabulary(TermVocabulary<T> newVocabulary);
|
80
|
|
81
|
/**
|
82
|
* Returns the label of this term used (and unique) in the term's vocabulary.
|
83
|
* @see #setIdInVocabulary(String)
|
84
|
*/
|
85
|
public String getIdInVocabulary();
|
86
|
|
87
|
/**
|
88
|
* Sets the label of this term used (and unique) in the term's vocabulary.
|
89
|
* @see #getIdInVocabulary()
|
90
|
* @param idInVocabulary
|
91
|
*/
|
92
|
public void setIdInVocabulary(String idInVocabulary);
|
93
|
|
94
|
}
|