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>HIBG</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
                        <sourceaccessioncode>$id</sourceaccessioncode>
58
                        <taxondetermination>
59
                            <party_id><party><fullname>$identifiedBy</fullname></party></party_id>
60
                            <taxonverbatim_id>
61
                                <taxonverbatim>
62
                                    <taxonlabel_id>
63
                                        <taxonlabel>
64
                                            <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
                                <sourceaccessioncode>$id</sourceaccessioncode>
62
                                <taxondetermination>
63
                                    <party_id><party><fullname>$identifiedBy</fullname></party></party_id>
64
                                    <taxonverbatim_id>
65
                                        <taxonverbatim>
66
                                            <taxonlabel_id>
65 67
                                                <taxonlabel>
66
                                                    <source_id><source><shortname>TNRS</shortname></source></source_id>
67
                                                    <taxonomicname>
68
                                                        <_join_words>
69
                                                            <1>
70
                                                                <_taxon_family_require_std>
71
                                                                    <family>
72
                                                                        <_nullIf>
73
                                                                            <null>$scientificName</null>
74
                                                                            <value>$family</value>
75
                                                                        </_nullIf>
76
                                                                    </family>
77
                                                                </_taxon_family_require_std>
78
                                                            </1>
79
                                                            <2>
80
                                                                <_alt>
81
                                                                    <1>$scientificName</1>
68
                                                    <matched_label_id>
69
                                                        <taxonlabel>
70
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
71
                                                            <taxonomicname>
72
                                                                <_join_words>
73
                                                                    <1>
74
                                                                        <_taxon_family_require_std>
75
                                                                            <family>
76
                                                                                <_nullIf>
77
                                                                                    <null>$scientificName</null>
78
                                                                                    <value>$family</value>
79
                                                                                </_nullIf>
80
                                                                            </family>
81
                                                                        </_taxon_family_require_std>
82
                                                                    </1>
82 83
                                                                    <2>
83
                                                                        <_join_words>
84
                                                                            <1>
84
                                                                        <_alt>
85
                                                                            <1>$scientificName</1>
86
                                                                            <2>
85 87
                                                                                <_join_words>
86
                                                                                    <2>$genus</2>
87
                                                                                    <3>$specificEpithet</3>
88
                                                                                    <5>
88
                                                                                    <1>
89 89
                                                                                        <_join_words>
90
                                                                                            <1>
91
                                                                                                <_if name="if has infraspecificEpithet">
92
                                                                                                    <cond>$infraspecificEpithet</cond>
93
                                                                                                    <then>$taxonRank</then>
94
                                                                                                </_if>
95
                                                                                            </1>
96
                                                                                            <2>$infraspecificEpithet</2>
90
                                                                                            <2>$genus</2>
91
                                                                                            <3>$specificEpithet</3>
92
                                                                                            <5>
93
                                                                                                <_join_words>
94
                                                                                                    <1>
95
                                                                                                        <_if name="if has infraspecificEpithet">
96
                                                                                                            <cond>$infraspecificEpithet</cond>
97
                                                                                                            <then>$taxonRank</then>
98
                                                                                                        </_if>
99
                                                                                                    </1>
100
                                                                                                    <2>$infraspecificEpithet</2>
101
                                                                                                </_join_words>
102
                                                                                            </5>
97 103
                                                                                        </_join_words>
98
                                                                                    </5>
104
                                                                                    </1>
105
                                                                                    <2>$scientificNameAuthorship</2>
99 106
                                                                                </_join_words>
100
                                                                            </1>
101
                                                                            <2>$scientificNameAuthorship</2>
102
                                                                        </_join_words>
107
                                                                            </2>
108
                                                                        </_alt>
103 109
                                                                    </2>
104
                                                                </_alt>
105
                                                            </2>
106
                                                        </_join_words>
107
                                                    </taxonomicname>
108
                                                </taxonlabel>
109
                                            </matched_label_id>
110
                                            <creationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></creationdate>
111
                                            <parent_id>
112
                                                <taxonlabel>
113
                                                    <rank>$taxonRank</rank>
114
                                                    <taxonverbatim><verbatimrank>$taxonRank</verbatimrank></taxonverbatim>
110
                                                                </_join_words>
111
                                                            </taxonomicname>
112
                                                        </taxonlabel>
113
                                                    </matched_label_id>
114
                                                    <creationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></creationdate>
115 115
                                                    <parent_id>
116 116
                                                        <taxonlabel>
117
                                                            <rank>cultivar</rank>
117
                                                            <rank>$taxonRank</rank>
118
                                                            <taxonverbatim><verbatimrank>$taxonRank</verbatimrank></taxonverbatim>
118 119
                                                            <parent_id>
119 120
                                                                <taxonlabel>
120
                                                                    <rank>forma</rank>
121
                                                                    <rank>cultivar</rank>
121 122
                                                                    <parent_id>
122 123
                                                                        <taxonlabel>
123
                                                                            <rank>variety</rank>
124
                                                                            <rank>forma</rank>
124 125
                                                                            <parent_id>
125 126
                                                                                <taxonlabel>
126
                                                                                    <rank>subspecies</rank>
127
                                                                                    <rank>variety</rank>
127 128
                                                                                    <parent_id>
128 129
                                                                                        <taxonlabel>
129
                                                                                            <rank>species</rank>
130
                                                                                            <taxonepithet>$specificEpithet</taxonepithet>
130
                                                                                            <rank>subspecies</rank>
131 131
                                                                                            <parent_id>
132 132
                                                                                                <taxonlabel>
133
                                                                                                    <rank>genus</rank>
134
                                                                                                    <taxonepithet>$genus</taxonepithet>
133
                                                                                                    <rank>species</rank>
134
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
135 135
                                                                                                    <parent_id>
136 136
                                                                                                        <taxonlabel>
137
                                                                                                            <rank>family</rank>
138
                                                                                                            <taxonepithet>$family</taxonepithet>
137
                                                                                                            <rank>genus</rank>
138
                                                                                                            <taxonepithet>$genus</taxonepithet>
139 139
                                                                                                            <parent_id>
140 140
                                                                                                                <taxonlabel>
141
                                                                                                                    <rank>order</rank>
142
                                                                                                                    <taxonepithet>$order</taxonepithet>
141
                                                                                                                    <rank>family</rank>
142
                                                                                                                    <taxonepithet>$family</taxonepithet>
143 143
                                                                                                                    <parent_id>
144 144
                                                                                                                        <taxonlabel>
145
                                                                                                                            <rank>class</rank>
146
                                                                                                                            <taxonepithet>$class</taxonepithet>
145
                                                                                                                            <rank>order</rank>
146
                                                                                                                            <taxonepithet>$order</taxonepithet>
147 147
                                                                                                                            <parent_id>
148 148
                                                                                                                                <taxonlabel>
149
                                                                                                                                    <rank>phylum</rank>
150
                                                                                                                                    <taxonepithet>$phylum</taxonepithet>
149
                                                                                                                                    <rank>class</rank>
150
                                                                                                                                    <taxonepithet>$class</taxonepithet>
151 151
                                                                                                                                    <parent_id>
152 152
                                                                                                                                        <taxonlabel>
153
                                                                                                                                            <rank>kingdom</rank>
154
                                                                                                                                            <taxonepithet>$kingdom</taxonepithet>
153
                                                                                                                                            <rank>phylum</rank>
154
                                                                                                                                            <taxonepithet>$phylum</taxonepithet>
155
                                                                                                                                            <parent_id>
156
                                                                                                                                                <taxonlabel>
157
                                                                                                                                                    <rank>kingdom</rank>
158
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
159
                                                                                                                                                </taxonlabel>
160
                                                                                                                                            </parent_id>
155 161
                                                                                                                                        </taxonlabel>
156 162
                                                                                                                                    </parent_id>
157 163
                                                                                                                                </taxonlabel>
......
172 178
                                                                    </parent_id>
173 179
                                                                </taxonlabel>
174 180
                                                            </parent_id>
181
                                                            <taxonepithet>$infraspecificEpithet</taxonepithet>
175 182
                                                        </taxonlabel>
176 183
                                                    </parent_id>
177
                                                    <taxonepithet>$infraspecificEpithet</taxonepithet>
178
                                                </taxonlabel>
179
                                            </parent_id>
180
                                            <rank>$taxonRank</rank>
181
                                            <taxonomicname>
182
                                                <_join_words>
183
                                                    <1>
184
                                                        <_taxon_family_require_std>
185
                                                            <family>
186
                                                                <_nullIf>
187
                                                                    <null>$scientificName</null>
188
                                                                    <value>$family</value>
189
                                                                </_nullIf>
190
                                                            </family>
191
                                                        </_taxon_family_require_std>
192
                                                    </1>
193
                                                    <2>
194
                                                        <_alt>
195
                                                            <1>$scientificName</1>
184
                                                    <rank>$taxonRank</rank>
185
                                                    <taxonomicname>
186
                                                        <_join_words>
187
                                                            <1>
188
                                                                <_taxon_family_require_std>
189
                                                                    <family>
190
                                                                        <_nullIf>
191
                                                                            <null>$scientificName</null>
192
                                                                            <value>$family</value>
193
                                                                        </_nullIf>
194
                                                                    </family>
195
                                                                </_taxon_family_require_std>
196
                                                            </1>
196 197
                                                            <2>
197
                                                                <_join_words>
198
                                                                    <1>
198
                                                                <_alt>
199
                                                                    <1>$scientificName</1>
200
                                                                    <2>
199 201
                                                                        <_join_words>
200
                                                                            <2>$genus</2>
201
                                                                            <3>$specificEpithet</3>
202
                                                                            <5>
202
                                                                            <1>
203 203
                                                                                <_join_words>
204
                                                                                    <1>
205
                                                                                        <_if name="if has infraspecificEpithet">
206
                                                                                            <cond>$infraspecificEpithet</cond>
207
                                                                                            <then>$taxonRank</then>
208
                                                                                        </_if>
209
                                                                                    </1>
210
                                                                                    <2>$infraspecificEpithet</2>
204
                                                                                    <2>$genus</2>
205
                                                                                    <3>$specificEpithet</3>
206
                                                                                    <5>
207
                                                                                        <_join_words>
208
                                                                                            <1>
209
                                                                                                <_if name="if has infraspecificEpithet">
210
                                                                                                    <cond>$infraspecificEpithet</cond>
211
                                                                                                    <then>$taxonRank</then>
212
                                                                                                </_if>
213
                                                                                            </1>
214
                                                                                            <2>$infraspecificEpithet</2>
215
                                                                                        </_join_words>
216
                                                                                    </5>
211 217
                                                                                </_join_words>
212
                                                                            </5>
218
                                                                            </1>
219
                                                                            <2>$scientificNameAuthorship</2>
213 220
                                                                        </_join_words>
214
                                                                    </1>
215
                                                                    <2>$scientificNameAuthorship</2>
216
                                                                </_join_words>
221
                                                                    </2>
222
                                                                </_alt>
217 223
                                                            </2>
218
                                                        </_alt>
219
                                                    </2>
220
                                                </_join_words>
221
                                            </taxonomicname>
222
                                        </taxonlabel>
223
                                    </taxonlabel_id>
224
                                    <author>$scientificNameAuthorship</author>
225
                                    <family>$family</family>
226
                                    <genus>$genus</genus>
227
                                    <specific_epithet>$specificEpithet</specific_epithet>
228
                                    <taxonomicname>$scientificName</taxonomicname>
229
                                    <verbatimrank>$taxonRank</verbatimrank>
230
                                </taxonverbatim>
231
                            </taxonverbatim_id>
232
                            <determinationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></determinationdate>
233
                        </taxondetermination>
234
                    </taxonoccurrence>
235
                </locationevent>
236
                <locationnarrative>
237
                    <_merge>
238
                        <1>$locality</1>
239
                        <3>
240
                            <_label>
241
                                <label>habitat</label>
242
                                <value>$habitat</value>
243
                            </_label>
244
                        </3>
245
                    </_merge>
246
                </locationnarrative>
247
                <locationplace>
248
                    <place_id>
249
                        <place>
250
                            <coordinates_id>
251
                                <coordinates>
252
                                    <latitude_deg>
253
                                        <_nullIf>
254
                                            <null>0</null>
255
                                            <type>float</type>
256
                                            <value>$decimalLatitude</value>
257
                                        </_nullIf>
258
                                    </latitude_deg>
259
                                    <longitude_deg>
260
                                        <_nullIf>
261
                                            <null>0</null>
262
                                            <type>float</type>
263
                                            <value>$decimalLongitude</value>
264
                                        </_nullIf>
265
                                    </longitude_deg>
266
                                </coordinates>
267
                            </coordinates_id>
268
                            <continent>$continent</continent>
269
                            <country>$country</country>
270
                            <county>$county</county>
271
                            <matched_place_id>
224
                                                        </_join_words>
225
                                                    </taxonomicname>
226
                                                </taxonlabel>
227
                                            </taxonlabel_id>
228
                                            <author>$scientificNameAuthorship</author>
229
                                            <family>$family</family>
230
                                            <genus>$genus</genus>
231
                                            <specific_epithet>$specificEpithet</specific_epithet>
232
                                            <taxonomicname>$scientificName</taxonomicname>
233
                                            <verbatimrank>$taxonRank</verbatimrank>
234
                                        </taxonverbatim>
235
                                    </taxonverbatim_id>
236
                                    <determinationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></determinationdate>
237
                                </taxondetermination>
238
                            </taxonoccurrence>
239
                        </locationevent>
240
                        <locationnarrative>
241
                            <_merge>
242
                                <1>$locality</1>
243
                                <3>
244
                                    <_label>
245
                                        <label>habitat</label>
246
                                        <value>$habitat</value>
247
                                    </_label>
248
                                </3>
249
                            </_merge>
250
                        </locationnarrative>
251
                        <locationplace>
252
                            <place_id>
272 253
                                <place>
273
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
274 254
                                    <coordinates_id>
275 255
                                        <coordinates>
276
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
277 256
                                            <latitude_deg>
278 257
                                                <_nullIf>
279 258
                                                    <null>0</null>
......
290 269
                                            </longitude_deg>
291 270
                                        </coordinates>
292 271
                                    </coordinates_id>
272
                                    <continent>$continent</continent>
293 273
                                    <country>$country</country>
294 274
                                    <county>$county</county>
275
                                    <matched_place_id>
276
                                        <place>
277
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
278
                                            <coordinates_id>
279
                                                <coordinates>
280
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
281
                                                    <latitude_deg>
282
                                                        <_nullIf>
283
                                                            <null>0</null>
284
                                                            <type>float</type>
285
                                                            <value>$decimalLatitude</value>
286
                                                        </_nullIf>
287
                                                    </latitude_deg>
288
                                                    <longitude_deg>
289
                                                        <_nullIf>
290
                                                            <null>0</null>
291
                                                            <type>float</type>
292
                                                            <value>$decimalLongitude</value>
293
                                                        </_nullIf>
294
                                                    </longitude_deg>
295
                                                </coordinates>
296
                                            </coordinates_id>
297
                                            <country>$country</country>
298
                                            <county>$county</county>
299
                                            <stateprovince>$stateProvince</stateprovince>
300
                                        </place>
301
                                    </matched_place_id>
295 302
                                    <stateprovince>$stateProvince</stateprovince>
296 303
                                </place>
297
                            </matched_place_id>
298
                            <stateprovince>$stateProvince</stateprovince>
299
                        </place>
300
                    </place_id>
301
                </locationplace>
302
                <verbatimelevation>$verbatimElevation</verbatimelevation>
303
            </location>
304
                            </place_id>
305
                        </locationplace>
306
                        <verbatimelevation>$verbatimElevation</verbatimelevation>
307
                    </location>
308
                </path>
309
            </_simplifyPath>
304 310
        </path>
305
    </_simplifyPath>
311
    </_setDefault>
306 312
</VegBIEN>
307 313
Inserted 39 new rows into database

Also available in: Unified diff