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>TRTE</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>
141
                                                                                                                    <rank>family</rank>
142
                                                                                                                    <taxonepithet>$family</taxonepithet>
142 143
                                                                                                                    <parent_id>
143 144
                                                                                                                        <taxonlabel>
144
                                                                                                                            <rank>class</rank>
145
                                                                                                                            <rank>order</rank>
145 146
                                                                                                                            <parent_id>
146 147
                                                                                                                                <taxonlabel>
147
                                                                                                                                    <rank>phylum</rank>
148
                                                                                                                                    <rank>class</rank>
148 149
                                                                                                                                    <parent_id>
149 150
                                                                                                                                        <taxonlabel>
150
                                                                                                                                            <rank>kingdom</rank>
151
                                                                                                                                            <taxonepithet>$kingdom</taxonepithet>
151
                                                                                                                                            <rank>phylum</rank>
152
                                                                                                                                            <parent_id>
153
                                                                                                                                                <taxonlabel>
154
                                                                                                                                                    <rank>kingdom</rank>
155
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
156
                                                                                                                                                </taxonlabel>
157
                                                                                                                                            </parent_id>
152 158
                                                                                                                                        </taxonlabel>
153 159
                                                                                                                                    </parent_id>
154 160
                                                                                                                                </taxonlabel>
......
169 175
                                                                    </parent_id>
170 176
                                                                </taxonlabel>
171 177
                                                            </parent_id>
178
                                                            <taxonepithet>$infraspecificEpithet</taxonepithet>
172 179
                                                        </taxonlabel>
173 180
                                                    </parent_id>
174
                                                    <taxonepithet>$infraspecificEpithet</taxonepithet>
175
                                                </taxonlabel>
176
                                            </parent_id>
177
                                            <rank>$taxonRank</rank>
178
                                            <taxonomicname>
179
                                                <_join_words>
180
                                                    <1>
181
                                                        <_taxon_family_require_std>
182
                                                            <family>
183
                                                                <_nullIf>
184
                                                                    <null>$scientificName</null>
185
                                                                    <value>$family</value>
186
                                                                </_nullIf>
187
                                                            </family>
188
                                                        </_taxon_family_require_std>
189
                                                    </1>
190
                                                    <2>
191
                                                        <_alt>
192
                                                            <1>$scientificName</1>
181
                                                    <rank>$taxonRank</rank>
182
                                                    <taxonomicname>
183
                                                        <_join_words>
184
                                                            <1>
185
                                                                <_taxon_family_require_std>
186
                                                                    <family>
187
                                                                        <_nullIf>
188
                                                                            <null>$scientificName</null>
189
                                                                            <value>$family</value>
190
                                                                        </_nullIf>
191
                                                                    </family>
192
                                                                </_taxon_family_require_std>
193
                                                            </1>
193 194
                                                            <2>
194
                                                                <_join_words>
195
                                                                    <1>
195
                                                                <_alt>
196
                                                                    <1>$scientificName</1>
197
                                                                    <2>
196 198
                                                                        <_join_words>
197
                                                                            <2>$genus</2>
198
                                                                            <3>$specificEpithet</3>
199
                                                                            <5>
199
                                                                            <1>
200 200
                                                                                <_join_words>
201
                                                                                    <1>
202
                                                                                        <_if name="if has infraspecificEpithet">
203
                                                                                            <cond>$infraspecificEpithet</cond>
204
                                                                                            <then>$taxonRank</then>
205
                                                                                        </_if>
206
                                                                                    </1>
207
                                                                                    <2>$infraspecificEpithet</2>
201
                                                                                    <2>$genus</2>
202
                                                                                    <3>$specificEpithet</3>
203
                                                                                    <5>
204
                                                                                        <_join_words>
205
                                                                                            <1>
206
                                                                                                <_if name="if has infraspecificEpithet">
207
                                                                                                    <cond>$infraspecificEpithet</cond>
208
                                                                                                    <then>$taxonRank</then>
209
                                                                                                </_if>
210
                                                                                            </1>
211
                                                                                            <2>$infraspecificEpithet</2>
212
                                                                                        </_join_words>
213
                                                                                    </5>
208 214
                                                                                </_join_words>
209
                                                                            </5>
215
                                                                            </1>
216
                                                                            <2>$scientificNameAuthorship</2>
210 217
                                                                        </_join_words>
211
                                                                    </1>
212
                                                                    <2>$scientificNameAuthorship</2>
213
                                                                </_join_words>
218
                                                                    </2>
219
                                                                </_alt>
214 220
                                                            </2>
215
                                                        </_alt>
216
                                                    </2>
217
                                                </_join_words>
218
                                            </taxonomicname>
219
                                        </taxonlabel>
220
                                    </taxonlabel_id>
221
                                    <author>$scientificNameAuthorship</author>
222
                                    <family>$family</family>
223
                                    <genus>$genus</genus>
224
                                    <specific_epithet>$specificEpithet</specific_epithet>
225
                                    <taxonomicname>$scientificName</taxonomicname>
226
                                    <verbatimrank>$taxonRank</verbatimrank>
227
                                </taxonverbatim>
228
                            </taxonverbatim_id>
229
                            <determinationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></determinationdate>
230
                        </taxondetermination>
231
                    </taxonoccurrence>
232
                </locationevent>
233
                <locationnarrative>
234
                    <_merge>
235
                        <1>$locality</1>
236
                        <3>
237
                            <_label>
238
                                <label>habitat</label>
239
                                <value>$habitat</value>
240
                            </_label>
241
                        </3>
242
                    </_merge>
243
                </locationnarrative>
244
                <locationplace>
245
                    <place_id>
246
                        <place>
247
                            <coordinates_id>
248
                                <coordinates>
249
                                    <latitude_deg>
250
                                        <_nullIf>
251
                                            <null>0</null>
252
                                            <type>float</type>
253
                                            <value>$decimalLatitude</value>
254
                                        </_nullIf>
255
                                    </latitude_deg>
256
                                    <longitude_deg>
257
                                        <_nullIf>
258
                                            <null>0</null>
259
                                            <type>float</type>
260
                                            <value>$decimalLongitude</value>
261
                                        </_nullIf>
262
                                    </longitude_deg>
263
                                    <verbatimlatitude>$verbatimLatitude</verbatimlatitude>
264
                                    <verbatimlongitude>$verbatimLongitude</verbatimlongitude>
265
                                </coordinates>
266
                            </coordinates_id>
267
                            <country>$country</country>
268
                            <county>$county</county>
269
                            <matched_place_id>
221
                                                        </_join_words>
222
                                                    </taxonomicname>
223
                                                </taxonlabel>
224
                                            </taxonlabel_id>
225
                                            <author>$scientificNameAuthorship</author>
226
                                            <family>$family</family>
227
                                            <genus>$genus</genus>
228
                                            <specific_epithet>$specificEpithet</specific_epithet>
229
                                            <taxonomicname>$scientificName</taxonomicname>
230
                                            <verbatimrank>$taxonRank</verbatimrank>
231
                                        </taxonverbatim>
232
                                    </taxonverbatim_id>
233
                                    <determinationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></determinationdate>
234
                                </taxondetermination>
235
                            </taxonoccurrence>
236
                        </locationevent>
237
                        <locationnarrative>
238
                            <_merge>
239
                                <1>$locality</1>
240
                                <3>
241
                                    <_label>
242
                                        <label>habitat</label>
243
                                        <value>$habitat</value>
244
                                    </_label>
245
                                </3>
246
                            </_merge>
247
                        </locationnarrative>
248
                        <locationplace>
249
                            <place_id>
270 250
                                <place>
271
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
272 251
                                    <coordinates_id>
273 252
                                        <coordinates>
274
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
275 253
                                            <latitude_deg>
276 254
                                                <_nullIf>
277 255
                                                    <null>0</null>
......
286 264
                                                    <value>$decimalLongitude</value>
287 265
                                                </_nullIf>
288 266
                                            </longitude_deg>
267
                                            <verbatimlatitude>$verbatimLatitude</verbatimlatitude>
268
                                            <verbatimlongitude>$verbatimLongitude</verbatimlongitude>
289 269
                                        </coordinates>
290 270
                                    </coordinates_id>
291 271
                                    <country>$country</country>
292 272
                                    <county>$county</county>
273
                                    <matched_place_id>
274
                                        <place>
275
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
276
                                            <coordinates_id>
277
                                                <coordinates>
278
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
279
                                                    <latitude_deg>
280
                                                        <_nullIf>
281
                                                            <null>0</null>
282
                                                            <type>float</type>
283
                                                            <value>$decimalLatitude</value>
284
                                                        </_nullIf>
285
                                                    </latitude_deg>
286
                                                    <longitude_deg>
287
                                                        <_nullIf>
288
                                                            <null>0</null>
289
                                                            <type>float</type>
290
                                                            <value>$decimalLongitude</value>
291
                                                        </_nullIf>
292
                                                    </longitude_deg>
293
                                                </coordinates>
294
                                            </coordinates_id>
295
                                            <country>$country</country>
296
                                            <county>$county</county>
297
                                            <stateprovince>$stateProvince</stateprovince>
298
                                        </place>
299
                                    </matched_place_id>
293 300
                                    <stateprovince>$stateProvince</stateprovince>
294 301
                                </place>
295
                            </matched_place_id>
296
                            <stateprovince>$stateProvince</stateprovince>
297
                        </place>
298
                    </place_id>
299
                </locationplace>
300
                <verbatimelevation>$verbatimElevation</verbatimelevation>
301
            </location>
302
                            </place_id>
303
                        </locationplace>
304
                        <verbatimelevation>$verbatimElevation</verbatimelevation>
305
                    </location>
306
                </path>
307
            </_simplifyPath>
302 308
        </path>
303
    </_simplifyPath>
309
    </_setDefault>
304 310
</VegBIEN>
305 311
Inserted 35 new rows into database

Also available in: Unified diff