Project

General

Profile

Download (2.55 KB) Statistics
| Branch: | Tag: | Revision:
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.reference;
11

    
12
import java.util.Set;
13

    
14

    
15
public interface ISourceable<T extends IOriginalSource> {
16

    
17
	/**
18
	 * Returns the set of original sources (citations) for this sourceable object
19
	 * @return
20
	 */
21
	public Set<T> getSources();
22

    
23
	/**
24
	 * Adds a set of original sources (citations) for this sourceable object
25
	 * @return
26
	 */
27
	public void addSources(Set<T> sources);
28
	/**
29
	 * Adds a source to this object
30
	 * @param source
31
	 */
32
	public void addSource(T source);
33

    
34

    
35
	/**
36
	 * Adds a source that is newly created by its components. If all components except for the
37
	 * type are <code>null</null>
38
	 * no source is added.
39
     * @param type the {@link OriginalSourceType type} of the source
40
     * @param idInSource the id used in the source
41
     * @param idNamespace the namespace for the id in the source
42
     * @param citation the source as a {@link Reference reference}
43
     * @param microReference the details (e.g. page number) in the reference
44
	 */
45
	public T addSource(OriginalSourceType type, String id, String idNamespace, Reference citation, String microCitation);
46

    
47

    
48
	/**
49
	 * Removes a source from this object
50
	 * @param source
51
	 */
52
	public void removeSource(T source);
53

    
54
    /**
55
     * Adds a {@link IOriginalSource source} of type {@link OriginalSourceType#Import}
56
     * to this object.
57
     *
58
     * @param idInSource the id used in the source
59
     * @param idNamespace the namespace for the id in the source
60
     * @param citation the source as a {@link Reference reference}
61
     * @param microReference the details (e.g. page number) in the reference
62
     */
63
	public T addImportSource(String id, String idNamespace, Reference citation, String microCitation);
64

    
65
    /**
66
     * Adds a {@link IOriginalSource source} of type {@link OriginalSourceType#PrimaryTaxonomicSource}
67
     * to this object.
68
     *
69
     * @param citation the source as a {@link Reference reference}
70
     * @param microReference the details (e.g. page number) in the reference
71
     */
72
	public T addPrimaryTaxonomicSource(Reference citation, String microCitation);
73

    
74
    /**
75
     * Adds a {@link IOriginalSource source} of type
76
     * {@link OriginalSourceType#PrimaryTaxonomicSource}
77
     * to this object.
78
     *
79
     * @param citation the source as a {@link Reference reference}
80
     */
81
	public T addPrimaryTaxonomicSource(Reference citation);
82

    
83
}
(23-23/37)