1 |
a2457359
|
Andreas Müller
|
/**
|
2 |
508e0188
|
Andreas Müller
|
* Copyright (C) 2007 EDIT
|
3 |
9a80354f
|
Patric Plitzner
|
* European Distributed Institute of Taxonomy
|
4 |
508e0188
|
Andreas Müller
|
* http://www.e-taxonomy.eu
|
5 |
9a80354f
|
Patric Plitzner
|
*
|
6 |
508e0188
|
Andreas Müller
|
* 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 |
a2457359
|
Andreas Müller
|
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 |
9a80354f
|
Patric Plitzner
|
*
|
22 |
a2457359
|
Andreas Müller
|
* NOTE: For now we let it inherit only from {@link IAnnotatableEntity}
|
23 |
|
|
* although all implementing classes are {@link IdentifiableEntity}.
|
24 |
9a80354f
|
Patric Plitzner
|
* The reason is that we want to be careful as maybe in future
|
25 |
a2457359
|
Andreas Müller
|
* 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 |
9a80354f
|
Patric Plitzner
|
*
|
30 |
a2457359
|
Andreas Müller
|
* @author a.mueller
|
31 |
|
|
* @created 2013-12-02
|
32 |
|
|
*
|
33 |
|
|
*/
|
34 |
|
|
public interface IDescribable<T extends DescriptionBase<?>> extends IAnnotatableEntity {
|
35 |
|
|
|
36 |
508e0188
|
Andreas Müller
|
/**
|
37 |
|
|
* Returns the the set of descriptions attached to <code>this</code>
|
38 |
|
|
* {@link IDescribable}.
|
39 |
|
|
* @return
|
40 |
|
|
*/
|
41 |
a2457359
|
Andreas Müller
|
public Set<T> getDescriptions();
|
42 |
9a80354f
|
Patric Plitzner
|
|
43 |
508e0188
|
Andreas Müller
|
/**
|
44 |
9a80354f
|
Patric Plitzner
|
* Adds a new description to the {@link #getDescriptions() set of descriptions}
|
45 |
508e0188
|
Andreas Müller
|
* attached to <code>this</code> {@link IDescribable}.
|
46 |
|
|
* @param description
|
47 |
|
|
*/
|
48 |
a2457359
|
Andreas Müller
|
public void addDescription(T description);
|
49 |
9a80354f
|
Patric Plitzner
|
|
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 |
a2457359
|
Andreas Müller
|
}
|