Project

General

Profile

Download (3.03 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> no source is added.
38
	 *
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 reference 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 reference, String microReference);
46

    
47
    /**
48
     * @param type
49
     * @param reference
50
     * @param microReference
51
     * @param originalInformation
52
     * @return the added source
53
     */
54
	public T addSource(OriginalSourceType type, Reference reference, String microReference, String originalInformation);
55

    
56
	/**
57
	 * Adds a source which links to another CDM object as source.
58
	 * @param target the target CDM source
59
	 * @return the aggregation source
60
	 */
61
	public T addAggregationSource(ICdmTarget target);
62

    
63
	/**
64
	 * Removes a source from this object
65
	 * @param source
66
	 */
67
	public void removeSource(T source);
68

    
69
    /**
70
     * Adds a {@link IOriginalSource source} of type {@link OriginalSourceType#Import}
71
     * to this object.
72
     *
73
     * @param idInSource the id used in the source
74
     * @param idNamespace the namespace for the id in the source
75
     * @param reference the source as a {@link Reference reference}
76
     * @param microReference the details (e.g. page number) in the reference
77
     */
78
	public T addImportSource(String id, String idNamespace, Reference reference, String microReference);
79

    
80
    /**
81
     * Adds a {@link IOriginalSource source} of type {@link OriginalSourceType#PrimaryTaxonomicSource}
82
     * to this object.
83
     *
84
     * @param reference the source as a {@link Reference reference}
85
     * @param microReference the details (e.g. page number) in the reference
86
     */
87
	public T addPrimaryTaxonomicSource(Reference reference, String microReference);
88

    
89
    /**
90
     * Adds a {@link IOriginalSource source} of type
91
     * {@link OriginalSourceType#PrimaryTaxonomicSource}
92
     * to this object.
93
     *
94
     * @param reference the source as a {@link Reference reference}
95
     */
96
	public T addPrimaryTaxonomicSource(Reference reference);
97

    
98
}
(25-25/41)