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.description;
|
11
|
|
12
|
import java.util.Set;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.common.IAnnotatableEntity;
|
15
|
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
|
16
|
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
|
17
|
|
18
|
/**
|
19
|
* This interface is a common interface for all classes which
|
20
|
* allow adding of {@link DescriptionBase descriptions}.
|
21
|
*
|
22
|
* NOTE: For now we let it inherit only from {@link IAnnotatableEntity}
|
23
|
* although all implementing classes are {@link IdentifiableEntity}.
|
24
|
* The reason is that we want to be careful as maybe in future
|
25
|
* we may also want to have {@link IAnnotatableEntity annotatable entities}
|
26
|
* with descriptions attached.
|
27
|
* However, if this causes problems we may let {@link IDescribable}
|
28
|
* inherit from {@link IIdentifiableEntity} in future.
|
29
|
*
|
30
|
* @author a.mueller
|
31
|
* @since 2013-12-02
|
32
|
*
|
33
|
*/
|
34
|
public interface IDescribable<T extends DescriptionBase<?>> extends IAnnotatableEntity {
|
35
|
|
36
|
/**
|
37
|
* Returns the the set of descriptions attached to <code>this</code>
|
38
|
* {@link IDescribable}.
|
39
|
* @return
|
40
|
*/
|
41
|
public Set<T> getDescriptions();
|
42
|
|
43
|
/**
|
44
|
* Adds a new description to the {@link #getDescriptions() set of descriptions}
|
45
|
* attached to <code>this</code> {@link IDescribable}.
|
46
|
* @param description
|
47
|
*/
|
48
|
public void addDescription(T description);
|
49
|
|
50
|
/**
|
51
|
* Removes one element from the set of {@link DescriptionBase descriptions} assigned
|
52
|
* to <i>this</i> {@link IDescribable}.
|
53
|
*
|
54
|
* @param description the description which should be removed
|
55
|
* @see #getDescriptions()
|
56
|
* @see #addDescription(TaxonDescription)
|
57
|
* @see eu.etaxonomy.cdm.model.description.TaxonDescription#getTaxon()
|
58
|
*/
|
59
|
public void removeDescription(T description);
|
60
|
|
61
|
}
|