1
|
/**
|
2
|
* Copyright (C) 2009 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.reference.Reference;
|
15
|
|
16
|
|
17
|
public interface ISourceable<T extends IOriginalSource> {
|
18
|
|
19
|
/**
|
20
|
* Returns the set of original sources (citations) for this sourceable object
|
21
|
* @return
|
22
|
*/
|
23
|
public Set<T> getSources();
|
24
|
|
25
|
/**
|
26
|
* Adds a set of original sources (citations) for this sourceable object
|
27
|
* @return
|
28
|
*/
|
29
|
public void addSources(Set<T> sources);
|
30
|
/**
|
31
|
* Adds a source to this object
|
32
|
* @param source
|
33
|
*/
|
34
|
public void addSource(T source);
|
35
|
|
36
|
|
37
|
/**
|
38
|
* Adds a source that is newly created by its components. If all components except for the
|
39
|
* type are <code>null</null>
|
40
|
* no source is added.
|
41
|
* @param type the {@link OriginalSourceType type} of the source
|
42
|
* @param idInSource the id used in the source
|
43
|
* @param idNamespace the namespace for the id in the source
|
44
|
* @param citation the source as a {@link Reference reference}
|
45
|
* @param microReference the details (e.g. page number) in the reference
|
46
|
*/
|
47
|
public T addSource(OriginalSourceType type, String id, String idNamespace, Reference citation, String microCitation);
|
48
|
|
49
|
|
50
|
/**
|
51
|
* Removes a source from this object
|
52
|
* @param source
|
53
|
*/
|
54
|
public void removeSource(T source);
|
55
|
|
56
|
/**
|
57
|
* Adds a {@link IOriginalSource source} of {@link OriginalSourceType type} Import to this description element.
|
58
|
*
|
59
|
* @param idInSource the id used in the source
|
60
|
* @param idNamespace the namespace for the id in the source
|
61
|
* @param citation the source as a {@link Reference reference}
|
62
|
* @param microReference the details (e.g. page number) in the reference
|
63
|
*/
|
64
|
public T addImportSource(String id, String idNamespace, Reference<?> citation, String microCitation);
|
65
|
|
66
|
}
|