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

Also available in: Unified diff