Project

General

Profile

« Previous | Next » 

Revision 6403

mappings/VegCore-VegBIEN.csv: Set the source_id col_default to the datasource name using the new _setDefault() built-in function and _env()

View differences:

test.xml.ref
1 1
Put template:
2 2
<VegBIEN>
3
    <_simplifyPath id="-1">
4
        <next>parent_id</next>
3
    <_setDefault id="-1">
4
        <col>source_id</col>
5
        <value><source><shortname>QFA</shortname></source></value>
5 6
        <path>
6
            <location>
7
                <authorlocationcode>
8
                    <_alt>
9
                        <1>$id</1>
10
                        <2>
11
                            <_join>
12
                                <1>$institutionCode</1>
7
            <_simplifyPath>
8
                <next>parent_id</next>
9
                <path>
10
                    <location>
11
                        <authorlocationcode>
12
                            <_alt>
13
                                <1>$id</1>
13 14
                                <2>
14 15
                                    <_join>
15
                                        <1>$collectionCode</1>
16
                                        <2>$collectionID</2>
16
                                        <1>$institutionCode</1>
17
                                        <2>
18
                                            <_join>
19
                                                <1>$collectionCode</1>
20
                                                <2>$collectionID</2>
21
                                            </_join>
22
                                        </2>
23
                                        <3>$catalogNumber</3>
17 24
                                    </_join>
18 25
                                </2>
19
                                <3>$catalogNumber</3>
20
                            </_join>
21
                        </2>
22
                    </_alt>
23
                </authorlocationcode>
24
                <elevation_m>
25
                    <_units>
26
                        <to>m</to>
27
                        <to></to>
28
                        <value>$verbatimElevation</value>
29
                    </_units>
30
                </elevation_m>
31
                <locationevent>
32
                    <obsenddate><_dateRangeEnd><value>$eventDate</value></_dateRangeEnd></obsenddate>
33
                    <obsstartdate><_dateRangeStart><value>$eventDate</value></_dateRangeStart></obsstartdate>
34
                    <taxonoccurrence>
35
                        <aggregateoccurrence>
36
                            <plantobservation>
37
                                <collectionnumber>$recordNumber</collectionnumber>
38
                                <specimenreplicate>
39
                                    <catalognumber_dwc>$catalogNumber</catalognumber_dwc>
40
                                    <collectioncode_dwc>
41
                                        <_join>
42
                                            <1>$collectionCode</1>
43
                                            <2>$collectionID</2>
44
                                        </_join>
45
                                    </collectioncode_dwc>
46
                                    <institution_id>
47
                                        <sourcename>
48
                                            <matched_source_id><source><shortname>$institutionCode</shortname></source></matched_source_id>
49
                                            <name>$institutionCode</name>
50
                                        </sourcename>
51
                                    </institution_id>
52
                                    <sourceaccessioncode>$id</sourceaccessioncode>
53
                                </specimenreplicate>
54
                            </plantobservation>
55
                        </aggregateoccurrence>
56
                        <collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
57
                        <iscultivated>
58
                            <_map>
59
                                <cultivated>t</cultivated>
60
                                <wild>f</wild>
61
                                <*></*>
62
                                <value>$establishmentMeans</value>
63
                            </_map>
64
                        </iscultivated>
65
                        <isnative>
66
                            <_map>
67
                                <native>t</native>
68
                                <exotic>f</exotic>
69
                                <*></*>
70
                                <value>$establishmentMeans</value>
71
                            </_map>
72
                        </isnative>
73
                        <sourceaccessioncode>$id</sourceaccessioncode>
74
                        <taxondetermination>
75
                            <party_id><party><fullname>$identifiedBy</fullname></party></party_id>
76
                            <taxonverbatim_id>
77
                                <taxonverbatim>
78
                                    <taxonlabel_id>
79
                                        <taxonlabel>
80
                                            <matched_label_id>
26
                            </_alt>
27
                        </authorlocationcode>
28
                        <elevation_m>
29
                            <_units>
30
                                <to>m</to>
31
                                <to></to>
32
                                <value>$verbatimElevation</value>
33
                            </_units>
34
                        </elevation_m>
35
                        <locationevent>
36
                            <obsenddate><_dateRangeEnd><value>$eventDate</value></_dateRangeEnd></obsenddate>
37
                            <obsstartdate><_dateRangeStart><value>$eventDate</value></_dateRangeStart></obsstartdate>
38
                            <taxonoccurrence>
39
                                <aggregateoccurrence>
40
                                    <plantobservation>
41
                                        <collectionnumber>$recordNumber</collectionnumber>
42
                                        <specimenreplicate>
43
                                            <catalognumber_dwc>$catalogNumber</catalognumber_dwc>
44
                                            <collectioncode_dwc>
45
                                                <_join>
46
                                                    <1>$collectionCode</1>
47
                                                    <2>$collectionID</2>
48
                                                </_join>
49
                                            </collectioncode_dwc>
50
                                            <institution_id>
51
                                                <sourcename>
52
                                                    <matched_source_id><source><shortname>$institutionCode</shortname></source></matched_source_id>
53
                                                    <name>$institutionCode</name>
54
                                                </sourcename>
55
                                            </institution_id>
56
                                            <sourceaccessioncode>$id</sourceaccessioncode>
57
                                        </specimenreplicate>
58
                                    </plantobservation>
59
                                </aggregateoccurrence>
60
                                <collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
61
                                <iscultivated>
62
                                    <_map>
63
                                        <cultivated>t</cultivated>
64
                                        <wild>f</wild>
65
                                        <*></*>
66
                                        <value>$establishmentMeans</value>
67
                                    </_map>
68
                                </iscultivated>
69
                                <isnative>
70
                                    <_map>
71
                                        <native>t</native>
72
                                        <exotic>f</exotic>
73
                                        <*></*>
74
                                        <value>$establishmentMeans</value>
75
                                    </_map>
76
                                </isnative>
77
                                <sourceaccessioncode>$id</sourceaccessioncode>
78
                                <taxondetermination>
79
                                    <party_id><party><fullname>$identifiedBy</fullname></party></party_id>
80
                                    <taxonverbatim_id>
81
                                        <taxonverbatim>
82
                                            <taxonlabel_id>
81 83
                                                <taxonlabel>
82
                                                    <source_id><source><shortname>TNRS</shortname></source></source_id>
83
                                                    <taxonomicname>
84
                                                        <_join_words>
85
                                                            <1>
86
                                                                <_taxon_family_require_std>
87
                                                                    <family>
88
                                                                        <_nullIf>
89
                                                                            <null>$scientificName</null>
90
                                                                            <value>$family</value>
91
                                                                        </_nullIf>
92
                                                                    </family>
93
                                                                </_taxon_family_require_std>
94
                                                            </1>
95
                                                            <2>
96
                                                                <_alt>
97
                                                                    <1>$scientificName</1>
84
                                                    <matched_label_id>
85
                                                        <taxonlabel>
86
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
87
                                                            <taxonomicname>
88
                                                                <_join_words>
89
                                                                    <1>
90
                                                                        <_taxon_family_require_std>
91
                                                                            <family>
92
                                                                                <_nullIf>
93
                                                                                    <null>$scientificName</null>
94
                                                                                    <value>$family</value>
95
                                                                                </_nullIf>
96
                                                                            </family>
97
                                                                        </_taxon_family_require_std>
98
                                                                    </1>
98 99
                                                                    <2>
99
                                                                        <_join_words>
100
                                                                            <1>
100
                                                                        <_alt>
101
                                                                            <1>$scientificName</1>
102
                                                                            <2>
101 103
                                                                                <_join_words>
102
                                                                                    <2>$genus</2>
103
                                                                                    <3>$specificEpithet</3>
104
                                                                                    <5>
104
                                                                                    <1>
105 105
                                                                                        <_join_words>
106
                                                                                            <1>
107
                                                                                                <_if name="if has infraspecificEpithet">
108
                                                                                                    <cond>$infraspecificEpithet</cond>
109
                                                                                                    <then>$taxonRank</then>
110
                                                                                                </_if>
111
                                                                                            </1>
112
                                                                                            <2>$infraspecificEpithet</2>
106
                                                                                            <2>$genus</2>
107
                                                                                            <3>$specificEpithet</3>
108
                                                                                            <5>
109
                                                                                                <_join_words>
110
                                                                                                    <1>
111
                                                                                                        <_if name="if has infraspecificEpithet">
112
                                                                                                            <cond>$infraspecificEpithet</cond>
113
                                                                                                            <then>$taxonRank</then>
114
                                                                                                        </_if>
115
                                                                                                    </1>
116
                                                                                                    <2>$infraspecificEpithet</2>
117
                                                                                                </_join_words>
118
                                                                                            </5>
113 119
                                                                                        </_join_words>
114
                                                                                    </5>
120
                                                                                    </1>
121
                                                                                    <2>$scientificNameAuthorship</2>
115 122
                                                                                </_join_words>
116
                                                                            </1>
117
                                                                            <2>$scientificNameAuthorship</2>
118
                                                                        </_join_words>
123
                                                                            </2>
124
                                                                        </_alt>
119 125
                                                                    </2>
120
                                                                </_alt>
121
                                                            </2>
122
                                                        </_join_words>
123
                                                    </taxonomicname>
124
                                                </taxonlabel>
125
                                            </matched_label_id>
126
                                            <creationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></creationdate>
127
                                            <parent_id>
128
                                                <taxonlabel>
129
                                                    <rank>$taxonRank</rank>
130
                                                    <taxonverbatim><verbatimrank>$taxonRank</verbatimrank></taxonverbatim>
126
                                                                </_join_words>
127
                                                            </taxonomicname>
128
                                                        </taxonlabel>
129
                                                    </matched_label_id>
130
                                                    <creationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></creationdate>
131 131
                                                    <parent_id>
132 132
                                                        <taxonlabel>
133
                                                            <rank>cultivar</rank>
133
                                                            <rank>$taxonRank</rank>
134
                                                            <taxonverbatim><verbatimrank>$taxonRank</verbatimrank></taxonverbatim>
134 135
                                                            <parent_id>
135 136
                                                                <taxonlabel>
136
                                                                    <rank>forma</rank>
137
                                                                    <rank>cultivar</rank>
137 138
                                                                    <parent_id>
138 139
                                                                        <taxonlabel>
139
                                                                            <rank>variety</rank>
140
                                                                            <rank>forma</rank>
140 141
                                                                            <parent_id>
141 142
                                                                                <taxonlabel>
142
                                                                                    <rank>subspecies</rank>
143
                                                                                    <rank>variety</rank>
143 144
                                                                                    <parent_id>
144 145
                                                                                        <taxonlabel>
145
                                                                                            <rank>species</rank>
146
                                                                                            <taxonepithet>$specificEpithet</taxonepithet>
146
                                                                                            <rank>subspecies</rank>
147 147
                                                                                            <parent_id>
148 148
                                                                                                <taxonlabel>
149
                                                                                                    <rank>genus</rank>
150
                                                                                                    <taxonepithet>$genus</taxonepithet>
149
                                                                                                    <rank>species</rank>
150
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
151 151
                                                                                                    <parent_id>
152 152
                                                                                                        <taxonlabel>
153
                                                                                                            <rank>family</rank>
154
                                                                                                            <taxonepithet>$family</taxonepithet>
153
                                                                                                            <rank>genus</rank>
154
                                                                                                            <taxonepithet>$genus</taxonepithet>
155 155
                                                                                                            <parent_id>
156 156
                                                                                                                <taxonlabel>
157
                                                                                                                    <rank>order</rank>
157
                                                                                                                    <rank>family</rank>
158
                                                                                                                    <taxonepithet>$family</taxonepithet>
158 159
                                                                                                                    <parent_id>
159 160
                                                                                                                        <taxonlabel>
160
                                                                                                                            <rank>class</rank>
161
                                                                                                                            <rank>order</rank>
161 162
                                                                                                                            <parent_id>
162 163
                                                                                                                                <taxonlabel>
163
                                                                                                                                    <rank>phylum</rank>
164
                                                                                                                                    <rank>class</rank>
164 165
                                                                                                                                    <parent_id>
165 166
                                                                                                                                        <taxonlabel>
166
                                                                                                                                            <rank>kingdom</rank>
167
                                                                                                                                            <taxonepithet>$kingdom</taxonepithet>
167
                                                                                                                                            <rank>phylum</rank>
168
                                                                                                                                            <parent_id>
169
                                                                                                                                                <taxonlabel>
170
                                                                                                                                                    <rank>kingdom</rank>
171
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
172
                                                                                                                                                </taxonlabel>
173
                                                                                                                                            </parent_id>
168 174
                                                                                                                                        </taxonlabel>
169 175
                                                                                                                                    </parent_id>
170 176
                                                                                                                                </taxonlabel>
......
185 191
                                                                    </parent_id>
186 192
                                                                </taxonlabel>
187 193
                                                            </parent_id>
194
                                                            <taxonepithet>$infraspecificEpithet</taxonepithet>
188 195
                                                        </taxonlabel>
189 196
                                                    </parent_id>
190
                                                    <taxonepithet>$infraspecificEpithet</taxonepithet>
191
                                                </taxonlabel>
192
                                            </parent_id>
193
                                            <rank>$taxonRank</rank>
194
                                            <taxonomicname>
195
                                                <_join_words>
196
                                                    <1>
197
                                                        <_taxon_family_require_std>
198
                                                            <family>
199
                                                                <_nullIf>
200
                                                                    <null>$scientificName</null>
201
                                                                    <value>$family</value>
202
                                                                </_nullIf>
203
                                                            </family>
204
                                                        </_taxon_family_require_std>
205
                                                    </1>
206
                                                    <2>
207
                                                        <_alt>
208
                                                            <1>$scientificName</1>
197
                                                    <rank>$taxonRank</rank>
198
                                                    <taxonomicname>
199
                                                        <_join_words>
200
                                                            <1>
201
                                                                <_taxon_family_require_std>
202
                                                                    <family>
203
                                                                        <_nullIf>
204
                                                                            <null>$scientificName</null>
205
                                                                            <value>$family</value>
206
                                                                        </_nullIf>
207
                                                                    </family>
208
                                                                </_taxon_family_require_std>
209
                                                            </1>
209 210
                                                            <2>
210
                                                                <_join_words>
211
                                                                    <1>
211
                                                                <_alt>
212
                                                                    <1>$scientificName</1>
213
                                                                    <2>
212 214
                                                                        <_join_words>
213
                                                                            <2>$genus</2>
214
                                                                            <3>$specificEpithet</3>
215
                                                                            <5>
215
                                                                            <1>
216 216
                                                                                <_join_words>
217
                                                                                    <1>
218
                                                                                        <_if name="if has infraspecificEpithet">
219
                                                                                            <cond>$infraspecificEpithet</cond>
220
                                                                                            <then>$taxonRank</then>
221
                                                                                        </_if>
222
                                                                                    </1>
223
                                                                                    <2>$infraspecificEpithet</2>
217
                                                                                    <2>$genus</2>
218
                                                                                    <3>$specificEpithet</3>
219
                                                                                    <5>
220
                                                                                        <_join_words>
221
                                                                                            <1>
222
                                                                                                <_if name="if has infraspecificEpithet">
223
                                                                                                    <cond>$infraspecificEpithet</cond>
224
                                                                                                    <then>$taxonRank</then>
225
                                                                                                </_if>
226
                                                                                            </1>
227
                                                                                            <2>$infraspecificEpithet</2>
228
                                                                                        </_join_words>
229
                                                                                    </5>
224 230
                                                                                </_join_words>
225
                                                                            </5>
231
                                                                            </1>
232
                                                                            <2>$scientificNameAuthorship</2>
226 233
                                                                        </_join_words>
227
                                                                    </1>
228
                                                                    <2>$scientificNameAuthorship</2>
229
                                                                </_join_words>
234
                                                                    </2>
235
                                                                </_alt>
230 236
                                                            </2>
231
                                                        </_alt>
232
                                                    </2>
233
                                                </_join_words>
234
                                            </taxonomicname>
235
                                        </taxonlabel>
236
                                    </taxonlabel_id>
237
                                    <author>$scientificNameAuthorship</author>
238
                                    <family>$family</family>
239
                                    <genus>$genus</genus>
240
                                    <specific_epithet>$specificEpithet</specific_epithet>
241
                                    <taxonomicname>$scientificName</taxonomicname>
242
                                    <verbatimrank>$taxonRank</verbatimrank>
243
                                </taxonverbatim>
244
                            </taxonverbatim_id>
245
                            <determinationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></determinationdate>
246
                            <taxonfit>$identificationQualifier</taxonfit>
247
                        </taxondetermination>
248
                    </taxonoccurrence>
249
                </locationevent>
250
                <locationnarrative>
251
                    <_merge>
252
                        <1>$locality</1>
253
                        <3>
254
                            <_label>
255
                                <label>habitat</label>
256
                                <value>$habitat</value>
257
                            </_label>
258
                        </3>
259
                    </_merge>
260
                </locationnarrative>
261
                <locationplace>
262
                    <place_id>
263
                        <place>
264
                            <coordinates_id>
265
                                <coordinates>
266
                                    <latitude_deg>
267
                                        <_nullIf>
268
                                            <null>0</null>
269
                                            <type>float</type>
270
                                            <value>$decimalLatitude</value>
271
                                        </_nullIf>
272
                                    </latitude_deg>
273
                                    <longitude_deg>
274
                                        <_nullIf>
275
                                            <null>0</null>
276
                                            <type>float</type>
277
                                            <value>$decimalLongitude</value>
278
                                        </_nullIf>
279
                                    </longitude_deg>
280
                                    <verbatimlatitude>$verbatimLatitude</verbatimlatitude>
281
                                    <verbatimlongitude>$verbatimLongitude</verbatimlongitude>
282
                                </coordinates>
283
                            </coordinates_id>
284
                            <country>$country</country>
285
                            <matched_place_id>
237
                                                        </_join_words>
238
                                                    </taxonomicname>
239
                                                </taxonlabel>
240
                                            </taxonlabel_id>
241
                                            <author>$scientificNameAuthorship</author>
242
                                            <family>$family</family>
243
                                            <genus>$genus</genus>
244
                                            <specific_epithet>$specificEpithet</specific_epithet>
245
                                            <taxonomicname>$scientificName</taxonomicname>
246
                                            <verbatimrank>$taxonRank</verbatimrank>
247
                                        </taxonverbatim>
248
                                    </taxonverbatim_id>
249
                                    <determinationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></determinationdate>
250
                                    <taxonfit>$identificationQualifier</taxonfit>
251
                                </taxondetermination>
252
                            </taxonoccurrence>
253
                        </locationevent>
254
                        <locationnarrative>
255
                            <_merge>
256
                                <1>$locality</1>
257
                                <3>
258
                                    <_label>
259
                                        <label>habitat</label>
260
                                        <value>$habitat</value>
261
                                    </_label>
262
                                </3>
263
                            </_merge>
264
                        </locationnarrative>
265
                        <locationplace>
266
                            <place_id>
286 267
                                <place>
287
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
288 268
                                    <coordinates_id>
289 269
                                        <coordinates>
290
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
291 270
                                            <latitude_deg>
292 271
                                                <_nullIf>
293 272
                                                    <null>0</null>
......
302 281
                                                    <value>$decimalLongitude</value>
303 282
                                                </_nullIf>
304 283
                                            </longitude_deg>
284
                                            <verbatimlatitude>$verbatimLatitude</verbatimlatitude>
285
                                            <verbatimlongitude>$verbatimLongitude</verbatimlongitude>
305 286
                                        </coordinates>
306 287
                                    </coordinates_id>
307 288
                                    <country>$country</country>
289
                                    <matched_place_id>
290
                                        <place>
291
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
292
                                            <coordinates_id>
293
                                                <coordinates>
294
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
295
                                                    <latitude_deg>
296
                                                        <_nullIf>
297
                                                            <null>0</null>
298
                                                            <type>float</type>
299
                                                            <value>$decimalLatitude</value>
300
                                                        </_nullIf>
301
                                                    </latitude_deg>
302
                                                    <longitude_deg>
303
                                                        <_nullIf>
304
                                                            <null>0</null>
305
                                                            <type>float</type>
306
                                                            <value>$decimalLongitude</value>
307
                                                        </_nullIf>
308
                                                    </longitude_deg>
309
                                                </coordinates>
310
                                            </coordinates_id>
311
                                            <country>$country</country>
312
                                            <stateprovince>$stateProvince</stateprovince>
313
                                        </place>
314
                                    </matched_place_id>
308 315
                                    <stateprovince>$stateProvince</stateprovince>
309 316
                                </place>
310
                            </matched_place_id>
311
                            <stateprovince>$stateProvince</stateprovince>
312
                        </place>
313
                    </place_id>
314
                </locationplace>
315
                <verbatimelevation>$verbatimElevation</verbatimelevation>
316
            </location>
317
                            </place_id>
318
                        </locationplace>
319
                        <verbatimelevation>$verbatimElevation</verbatimelevation>
320
                    </location>
321
                </path>
322
            </_simplifyPath>
317 323
        </path>
318
    </_simplifyPath>
324
    </_setDefault>
319 325
</VegBIEN>
320 326
Inserted 47 new rows into database

Also available in: Unified diff