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.common;
|
11
|
|
12
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
13
|
|
14
|
/**
|
15
|
* An original source can be used in different ways.<BR>
|
16
|
* 1.) As a referencing system. The original source holds all information about the reference,
|
17
|
* the microReference (page, figure, ...), the identifier used in the source for the referenced object in the
|
18
|
* reference, a namespace that makes this identifier unique, the original name string that in
|
19
|
* general stores the representation of the referenced object within the source (if the string representation
|
20
|
* in the source differs from that one unsed in the CDM object)
|
21
|
*
|
22
|
* 2.) Dataprovenance: When importing data from another datasource important information like the identifier
|
23
|
* and it's namespace (e.g. tablename) as well as the datasource itself maybe stored in an original source.
|
24
|
* E.g. when importing SDD data here you may store the filename and the id used in the SDD file here.
|
25
|
*
|
26
|
* Starting with v3.3 we started to let this class be influenced by the PROV Ontology
|
27
|
* (http://www.w3.org/TR/2013/NOTE-prov-overview-20130430/). It may move further in this direction in
|
28
|
* future.
|
29
|
* The above mentioned ways to use the Original Source are now related to different activity types
|
30
|
* (http://www.w3.org/TR/2013/REC-prov-dm-20130430/#term-Activity) in PROV.
|
31
|
*
|
32
|
*
|
33
|
* @author a.mueller
|
34
|
* @since 18.09.2009
|
35
|
*/
|
36
|
public interface IOriginalSource<T extends ISourceable> {
|
37
|
|
38
|
/*************** GETTER /SETTER ************************************/
|
39
|
|
40
|
|
41
|
/**
|
42
|
* Returns the {@link OriginalSourceType type} of the source. The type defines the relationship
|
43
|
* between the current data and the original data.
|
44
|
* @see OriginalSourceType
|
45
|
* @return the type of the source
|
46
|
*/
|
47
|
public OriginalSourceType getType();
|
48
|
|
49
|
/**
|
50
|
* @see #getType()
|
51
|
* @param type the type to be set
|
52
|
*/
|
53
|
public void setType(OriginalSourceType type);
|
54
|
|
55
|
/**
|
56
|
* Returns the (unique) identifier used in the source.
|
57
|
* If the identifier is not unique, {@link #getIdNamespace() namespace} should be defined.
|
58
|
* The namespace together with the identifier should be unique.
|
59
|
* @return the identifier used in the source.
|
60
|
*/
|
61
|
public String getIdInSource();
|
62
|
|
63
|
/**
|
64
|
* @see #getIdInSource()
|
65
|
* @param idInSource
|
66
|
*/
|
67
|
public void setIdInSource(String idInSource);
|
68
|
|
69
|
/**
|
70
|
* Returns the id namespace. The id namespace is a String that further defines the origin of
|
71
|
* the original record. In the combination with the id it should be unique within one a source.
|
72
|
* E.g. if a record comes from table ABC and has the id 345, 'ABC' is a suitable namespace and the
|
73
|
* combination of 'ABC' and 345 is a unique id for this source.
|
74
|
* The namespace is meant to distinguish import records that come from two different tables, elements, objects, ...
|
75
|
* and end up in the same CDM class. In this case the id may not be enough to identify the original record.
|
76
|
* @return the idNamespace
|
77
|
*/
|
78
|
public String getIdNamespace();
|
79
|
|
80
|
/**
|
81
|
* @see #getIdNamespace()
|
82
|
* @param idNamespace the idNamespace to set
|
83
|
*/
|
84
|
public void setIdNamespace(String idNamespace);
|
85
|
|
86
|
/**
|
87
|
* Returns the micro citation of the according citation. This may be a String
|
88
|
* defining a page or a page range, a figure in a citation, etc.
|
89
|
* Examples: 'p.345', 'pp.345-367', 'fig. 3a', ...
|
90
|
* @return
|
91
|
*/
|
92
|
public String getCitationMicroReference();
|
93
|
|
94
|
/**
|
95
|
* @see #getCitationMicroReference()
|
96
|
* @param microCitation
|
97
|
*/
|
98
|
public void setCitationMicroReference(String microCitation);
|
99
|
|
100
|
|
101
|
/**
|
102
|
* Returns the citation.
|
103
|
* @return
|
104
|
*/
|
105
|
public Reference getCitation();
|
106
|
|
107
|
/**
|
108
|
* @see #getCitation()
|
109
|
* @param citation
|
110
|
*/
|
111
|
public void setCitation(Reference citation);
|
112
|
|
113
|
}
|