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