4 package eu
.etaxonomy
.cdm
.model
.common
;
9 import javax
.persistence
.Transient
;
12 * The common interface which is implemented by {@link DefinedTermBase defined terms} and enumerations
13 * replacing fully {@link DefinedTermBase defined terms}.
16 * @created 14-Jul-1913
18 public interface ISimpleTerm
<T
extends ISimpleTerm
> {
21 public UUID
getUuid();
24 // public T getByUuid(UUID uuid);
28 * Returns the defined term this term is a kind of.
29 * Therefore the returned term is a generalization of <code>this</code> term
35 * Returns all defined terms this term is a direct generalization for.
36 * Therefore the returned terms are kind of <code>this</code> term.
38 public Set
<T
> getGeneralizationOf();
42 * Computes if <code>this</code> term is kind of the <code>ancestor</code> term.
43 * So the <code>ancestor</code> term is direct or indirect (recursive) generalization
44 * of <code>this</code> term.
45 * @param ancestor the potential ancestor term
47 * @see #getGeneralizationOf()
49 public boolean isKindOf(T ancestor
);
52 * Returns all defined terms this term is a generalization for.
53 * Therefore the returned terms are kind of <code>this</code> term.
54 * If parameter <code>recursive</code> is <code>false</code> only the
55 * direct descendants will be returned. If it is <code>true</code>
56 * the direct descendants and there recursive descendants (all descendants)
59 public Set
<T
> getGeneralizationOf(boolean recursive
);