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>UNCC</shortname></source></value>
5 6
        <path>
6
            <location>
7
                <authorlocationcode>$accession</authorlocationcode>
8
                <locationevent>
9
                    <taxonoccurrence>
10
                        <aggregateoccurrence>
11
                            <collectiondate>
12
                                <_date>
13
                                    <day>
14
                                        <_nullIf>
15
                                            <null>0</null>
16
                                            <type>float</type>
17
                                            <value>$collday</value>
18
                                        </_nullIf>
19
                                    </day>
20
                                    <month>
21
                                        <_nullIf>
22
                                            <null>0</null>
23
                                            <type>float</type>
24
                                            <value>$collmonth</value>
25
                                        </_nullIf>
26
                                    </month>
27
                                    <year>
28
                                        <_nullIf>
29
                                            <null>0</null>
30
                                            <type>float</type>
31
                                            <value>$collyear</value>
32
                                        </_nullIf>
33
                                    </year>
34
                                </_date>
35
                            </collectiondate>
36
                            <notes>
37
                                <_join>
38
                                    <1>$comment1</1>
39
                                    <2>$comment2</2>
40
                                    <3>$comment3</3>
41
                                    <4>$comment4</4>
42
                                    <5>
43
                                        <_label>
44
                                            <label>campus</label>
45
                                            <value>$campus</value>
46
                                        </_label>
47
                                    </5>
48
                                    <6>
49
                                        <_label>
50
                                            <label>loaned to</label>
51
                                            <value>$loanto</value>
52
                                        </_label>
53
                                    </6>
54
                                    <7>
55
                                        <_label>
56
                                            <label>in or out</label>
57
                                            <value>$inorout</value>
58
                                        </_label>
59
                                    </7>
60
                                </_join>
61
                            </notes>
62
                            <plantobservation>
63
                                <collectionnumber>$collectno</collectionnumber>
64
                                <specimenreplicate>
65
                                    <institution_id>
66
                                        <sourcename>
67
                                            <matched_source_id><source><shortname>$herbarium</shortname></source></matched_source_id>
68
                                            <name>$herbarium</name>
69
                                        </sourcename>
70
                                    </institution_id>
71
                                    <sourceaccessioncode>$accession</sourceaccessioncode>
72
                                </specimenreplicate>
73
                            </plantobservation>
74
                        </aggregateoccurrence>
75
                        <collector_id>
76
                            <party>
77
                                <fullname>
78
                                    <_join>
79
                                        <1>$collector</1>
80
                                        <2>$collector1</2>
81
                                        <3>$collector2</3>
82
                                        <4>$collector3</4>
83
                                    </_join>
84
                                </fullname>
85
                            </party>
86
                        </collector_id>
87
                        <iscultivated>$cultivated</iscultivated>
88
                        <sourceaccessioncode>$accession</sourceaccessioncode>
89
                        <taxondetermination>
90
                            <taxonverbatim_id>
91
                                <taxonverbatim>
92
                                    <taxonlabel_id>
93
                                        <taxonlabel>
94
                                            <matched_label_id>
7
            <_simplifyPath>
8
                <next>parent_id</next>
9
                <path>
10
                    <location>
11
                        <authorlocationcode>$accession</authorlocationcode>
12
                        <locationevent>
13
                            <taxonoccurrence>
14
                                <aggregateoccurrence>
15
                                    <collectiondate>
16
                                        <_date>
17
                                            <day>
18
                                                <_nullIf>
19
                                                    <null>0</null>
20
                                                    <type>float</type>
21
                                                    <value>$collday</value>
22
                                                </_nullIf>
23
                                            </day>
24
                                            <month>
25
                                                <_nullIf>
26
                                                    <null>0</null>
27
                                                    <type>float</type>
28
                                                    <value>$collmonth</value>
29
                                                </_nullIf>
30
                                            </month>
31
                                            <year>
32
                                                <_nullIf>
33
                                                    <null>0</null>
34
                                                    <type>float</type>
35
                                                    <value>$collyear</value>
36
                                                </_nullIf>
37
                                            </year>
38
                                        </_date>
39
                                    </collectiondate>
40
                                    <notes>
41
                                        <_join>
42
                                            <1>$comment1</1>
43
                                            <2>$comment2</2>
44
                                            <3>$comment3</3>
45
                                            <4>$comment4</4>
46
                                            <5>
47
                                                <_label>
48
                                                    <label>campus</label>
49
                                                    <value>$campus</value>
50
                                                </_label>
51
                                            </5>
52
                                            <6>
53
                                                <_label>
54
                                                    <label>loaned to</label>
55
                                                    <value>$loanto</value>
56
                                                </_label>
57
                                            </6>
58
                                            <7>
59
                                                <_label>
60
                                                    <label>in or out</label>
61
                                                    <value>$inorout</value>
62
                                                </_label>
63
                                            </7>
64
                                        </_join>
65
                                    </notes>
66
                                    <plantobservation>
67
                                        <collectionnumber>$collectno</collectionnumber>
68
                                        <specimenreplicate>
69
                                            <institution_id>
70
                                                <sourcename>
71
                                                    <matched_source_id><source><shortname>$herbarium</shortname></source></matched_source_id>
72
                                                    <name>$herbarium</name>
73
                                                </sourcename>
74
                                            </institution_id>
75
                                            <sourceaccessioncode>$accession</sourceaccessioncode>
76
                                        </specimenreplicate>
77
                                    </plantobservation>
78
                                </aggregateoccurrence>
79
                                <collector_id>
80
                                    <party>
81
                                        <fullname>
82
                                            <_join>
83
                                                <1>$collector</1>
84
                                                <2>$collector1</2>
85
                                                <3>$collector2</3>
86
                                                <4>$collector3</4>
87
                                            </_join>
88
                                        </fullname>
89
                                    </party>
90
                                </collector_id>
91
                                <iscultivated>$cultivated</iscultivated>
92
                                <sourceaccessioncode>$accession</sourceaccessioncode>
93
                                <taxondetermination>
94
                                    <taxonverbatim_id>
95
                                        <taxonverbatim>
96
                                            <taxonlabel_id>
95 97
                                                <taxonlabel>
96
                                                    <source_id><source><shortname>TNRS</shortname></source></source_id>
98
                                                    <matched_label_id>
99
                                                        <taxonlabel>
100
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
101
                                                            <taxonomicname>
102
                                                                <_join_words>
103
                                                                    <1>
104
                                                                        <_taxon_family_require_std>
105
                                                                            <family>
106
                                                                                <_nullIf>
107
                                                                                    <null>$SciName</null>
108
                                                                                    <value>$family</value>
109
                                                                                </_nullIf>
110
                                                                            </family>
111
                                                                        </_taxon_family_require_std>
112
                                                                    </1>
113
                                                                    <2>
114
                                                                        <_join_words>
115
                                                                            <1>
116
                                                                                <_alt>
117
                                                                                    <1>$SciName</1>
118
                                                                                    <2>
119
                                                                                        <_join_words>
120
                                                                                            <2>$genus</2>
121
                                                                                            <3>$species</3>
122
                                                                                            <5>
123
                                                                                                <_join_words>
124
                                                                                                    <1>
125
                                                                                                        <_if name="if has infraspecificEpithet">
126
                                                                                                            <cond>$infraname</cond>
127
                                                                                                            <then>
128
                                                                                                                <_alt>
129
                                                                                                                    <1>$usdaRank</1>
130
                                                                                                                    <2>$infrarank</2>
131
                                                                                                                </_alt>
132
                                                                                                            </then>
133
                                                                                                        </_if>
134
                                                                                                    </1>
135
                                                                                                    <2>$infraname</2>
136
                                                                                                </_join_words>
137
                                                                                            </5>
138
                                                                                        </_join_words>
139
                                                                                    </2>
140
                                                                                </_alt>
141
                                                                            </1>
142
                                                                            <2>$authors</2>
143
                                                                        </_join_words>
144
                                                                    </2>
145
                                                                </_join_words>
146
                                                            </taxonomicname>
147
                                                        </taxonlabel>
148
                                                    </matched_label_id>
149
                                                    <parent_id>
150
                                                        <taxonlabel>
151
                                                            <rank>
152
                                                                <_alt>
153
                                                                    <1>$usdaRank</1>
154
                                                                    <2>$infrarank</2>
155
                                                                </_alt>
156
                                                            </rank>
157
                                                            <taxonverbatim>
158
                                                                <verbatimrank>
159
                                                                    <_alt>
160
                                                                        <1>$usdaRank</1>
161
                                                                        <2>$infrarank</2>
162
                                                                    </_alt>
163
                                                                </verbatimrank>
164
                                                            </taxonverbatim>
165
                                                            <parent_id>
166
                                                                <taxonlabel>
167
                                                                    <rank>cultivar</rank>
168
                                                                    <parent_id>
169
                                                                        <taxonlabel>
170
                                                                            <rank>forma</rank>
171
                                                                            <parent_id>
172
                                                                                <taxonlabel>
173
                                                                                    <rank>variety</rank>
174
                                                                                    <parent_id>
175
                                                                                        <taxonlabel>
176
                                                                                            <rank>subspecies</rank>
177
                                                                                            <parent_id>
178
                                                                                                <taxonlabel>
179
                                                                                                    <rank>species</rank>
180
                                                                                                    <taxonepithet>$species</taxonepithet>
181
                                                                                                    <parent_id>
182
                                                                                                        <taxonlabel>
183
                                                                                                            <rank>genus</rank>
184
                                                                                                            <taxonepithet>$genus</taxonepithet>
185
                                                                                                            <parent_id>
186
                                                                                                                <taxonlabel>
187
                                                                                                                    <rank>family</rank>
188
                                                                                                                    <taxonepithet>$family</taxonepithet>
189
                                                                                                                </taxonlabel>
190
                                                                                                            </parent_id>
191
                                                                                                        </taxonlabel>
192
                                                                                                    </parent_id>
193
                                                                                                </taxonlabel>
194
                                                                                            </parent_id>
195
                                                                                        </taxonlabel>
196
                                                                                    </parent_id>
197
                                                                                </taxonlabel>
198
                                                                            </parent_id>
199
                                                                        </taxonlabel>
200
                                                                    </parent_id>
201
                                                                </taxonlabel>
202
                                                            </parent_id>
203
                                                            <taxonepithet>$infraname</taxonepithet>
204
                                                        </taxonlabel>
205
                                                    </parent_id>
206
                                                    <rank>
207
                                                        <_alt>
208
                                                            <1>$usdaRank</1>
209
                                                            <2>$infrarank</2>
210
                                                        </_alt>
211
                                                    </rank>
97 212
                                                    <taxonomicname>
98 213
                                                        <_join_words>
99 214
                                                            <1>
......
141 256
                                                        </_join_words>
142 257
                                                    </taxonomicname>
143 258
                                                </taxonlabel>
144
                                            </matched_label_id>
145
                                            <parent_id>
146
                                                <taxonlabel>
147
                                                    <rank>
148
                                                        <_alt>
149
                                                            <1>$usdaRank</1>
150
                                                            <2>$infrarank</2>
151
                                                        </_alt>
152
                                                    </rank>
153
                                                    <taxonverbatim>
154
                                                        <verbatimrank>
155
                                                            <_alt>
156
                                                                <1>$usdaRank</1>
157
                                                                <2>$infrarank</2>
158
                                                            </_alt>
159
                                                        </verbatimrank>
160
                                                    </taxonverbatim>
161
                                                    <parent_id>
162
                                                        <taxonlabel>
163
                                                            <rank>cultivar</rank>
164
                                                            <parent_id>
165
                                                                <taxonlabel>
166
                                                                    <rank>forma</rank>
167
                                                                    <parent_id>
168
                                                                        <taxonlabel>
169
                                                                            <rank>variety</rank>
170
                                                                            <parent_id>
171
                                                                                <taxonlabel>
172
                                                                                    <rank>subspecies</rank>
173
                                                                                    <parent_id>
174
                                                                                        <taxonlabel>
175
                                                                                            <rank>species</rank>
176
                                                                                            <taxonepithet>$species</taxonepithet>
177
                                                                                            <parent_id>
178
                                                                                                <taxonlabel>
179
                                                                                                    <rank>genus</rank>
180
                                                                                                    <taxonepithet>$genus</taxonepithet>
181
                                                                                                    <parent_id>
182
                                                                                                        <taxonlabel>
183
                                                                                                            <rank>family</rank>
184
                                                                                                            <taxonepithet>$family</taxonepithet>
185
                                                                                                        </taxonlabel>
186
                                                                                                    </parent_id>
187
                                                                                                </taxonlabel>
188
                                                                                            </parent_id>
189
                                                                                        </taxonlabel>
190
                                                                                    </parent_id>
191
                                                                                </taxonlabel>
192
                                                                            </parent_id>
193
                                                                        </taxonlabel>
194
                                                                    </parent_id>
195
                                                                </taxonlabel>
196
                                                            </parent_id>
197
                                                        </taxonlabel>
198
                                                    </parent_id>
199
                                                    <taxonepithet>$infraname</taxonepithet>
200
                                                </taxonlabel>
201
                                            </parent_id>
202
                                            <rank>
259
                                            </taxonlabel_id>
260
                                            <author>$authors</author>
261
                                            <family>$family</family>
262
                                            <genus>$genus</genus>
263
                                            <specific_epithet>$species</specific_epithet>
264
                                            <taxonname>$SciName</taxonname>
265
                                            <verbatimrank>
203 266
                                                <_alt>
204 267
                                                    <1>$usdaRank</1>
205 268
                                                    <2>$infrarank</2>
206 269
                                                </_alt>
207
                                            </rank>
208
                                            <taxonomicname>
209
                                                <_join_words>
210
                                                    <1>
211
                                                        <_taxon_family_require_std>
212
                                                            <family>
213
                                                                <_nullIf>
214
                                                                    <null>$SciName</null>
215
                                                                    <value>$family</value>
216
                                                                </_nullIf>
217
                                                            </family>
218
                                                        </_taxon_family_require_std>
219
                                                    </1>
220
                                                    <2>
221
                                                        <_join_words>
222
                                                            <1>
223
                                                                <_alt>
224
                                                                    <1>$SciName</1>
225
                                                                    <2>
226
                                                                        <_join_words>
227
                                                                            <2>$genus</2>
228
                                                                            <3>$species</3>
229
                                                                            <5>
230
                                                                                <_join_words>
231
                                                                                    <1>
232
                                                                                        <_if name="if has infraspecificEpithet">
233
                                                                                            <cond>$infraname</cond>
234
                                                                                            <then>
235
                                                                                                <_alt>
236
                                                                                                    <1>$usdaRank</1>
237
                                                                                                    <2>$infrarank</2>
238
                                                                                                </_alt>
239
                                                                                            </then>
240
                                                                                        </_if>
241
                                                                                    </1>
242
                                                                                    <2>$infraname</2>
243
                                                                                </_join_words>
244
                                                                            </5>
245
                                                                        </_join_words>
246
                                                                    </2>
247
                                                                </_alt>
248
                                                            </1>
249
                                                            <2>$authors</2>
250
                                                        </_join_words>
251
                                                    </2>
252
                                                </_join_words>
253
                                            </taxonomicname>
254
                                        </taxonlabel>
255
                                    </taxonlabel_id>
256
                                    <author>$authors</author>
257
                                    <family>$family</family>
258
                                    <genus>$genus</genus>
259
                                    <specific_epithet>$species</specific_epithet>
260
                                    <taxonname>$SciName</taxonname>
261
                                    <verbatimrank>
262
                                        <_alt>
263
                                            <1>$usdaRank</1>
264
                                            <2>$infrarank</2>
265
                                        </_alt>
266
                                    </verbatimrank>
267
                                </taxonverbatim>
268
                            </taxonverbatim_id>
269
                        </taxondetermination>
270
                    </taxonoccurrence>
271
                </locationevent>
272
                <locationnarrative>
273
                    <_merge>
274
                        <1>$locality</1>
275
                        <3>
276
                            <_label>
277
                                <label>habitat</label>
278
                                <value>$habitat</value>
279
                            </_label>
280
                        </3>
281
                    </_merge>
282
                </locationnarrative>
283
                <locationplace>
284
                    <place_id>
285
                        <place>
286
                            <country>$country</country>
287
                            <county>$county</county>
288
                            <matched_place_id>
270
                                            </verbatimrank>
271
                                        </taxonverbatim>
272
                                    </taxonverbatim_id>
273
                                </taxondetermination>
274
                            </taxonoccurrence>
275
                        </locationevent>
276
                        <locationnarrative>
277
                            <_merge>
278
                                <1>$locality</1>
279
                                <3>
280
                                    <_label>
281
                                        <label>habitat</label>
282
                                        <value>$habitat</value>
283
                                    </_label>
284
                                </3>
285
                            </_merge>
286
                        </locationnarrative>
287
                        <locationplace>
288
                            <place_id>
289 289
                                <place>
290
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
291 290
                                    <country>$country</country>
292 291
                                    <county>$county</county>
292
                                    <matched_place_id>
293
                                        <place>
294
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
295
                                            <country>$country</country>
296
                                            <county>$county</county>
297
                                            <stateprovince>$state</stateprovince>
298
                                        </place>
299
                                    </matched_place_id>
293 300
                                    <stateprovince>$state</stateprovince>
294 301
                                </place>
295
                            </matched_place_id>
296
                            <stateprovince>$state</stateprovince>
297
                        </place>
298
                    </place_id>
299
                </locationplace>
300
            </location>
302
                            </place_id>
303
                        </locationplace>
304
                    </location>
305
                </path>
306
            </_simplifyPath>
301 307
        </path>
302
    </_simplifyPath>
308
    </_setDefault>
303 309
</VegBIEN>
304 310
Inserted 29 new rows into database

Also available in: Unified diff