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>MO</shortname></source></value>
5 6
        <path>
6
            <location>
7
                <authorlocationcode>
8
                    <_join>
9
                        <1>$InstitutionCode</1>
10
                        <2>$CollectionCode</2>
11
                        <3>$CatalogNumber</3>
12
                    </_join>
13
                </authorlocationcode>
14
                <elevation_m>
15
                    <_avg>
16
                        <max>$MaximumElevation</max>
17
                        <min>$MinimumElevation</min>
18
                    </_avg>
19
                </elevation_m>
20
                <locationevent>
21
                    <taxonoccurrence>
22
                        <aggregateoccurrence>
23
                            <collectiondate>
24
                                <_date>
25
                                    <day>
26
                                        <_nullIf>
27
                                            <null>0</null>
28
                                            <type>float</type>
29
                                            <value>$DayCollected</value>
30
                                        </_nullIf>
31
                                    </day>
32
                                    <month>
33
                                        <_nullIf>
34
                                            <null>0</null>
35
                                            <type>float</type>
36
                                            <value>$MonthCollected</value>
37
                                        </_nullIf>
38
                                    </month>
39
                                    <year>
40
                                        <_nullIf>
41
                                            <null>0</null>
42
                                            <type>float</type>
43
                                            <value>$YearCollected</value>
44
                                        </_nullIf>
45
                                    </year>
46
                                </_date>
47
                            </collectiondate>
48
                            <count>$IndividualCount</count>
49
                            <notes>
50
                                <_alt>
51
                                    <0>$convertednotes</0>
52
                                    <1>$notes</1>
53
                                </_alt>
54
                            </notes>
55
                            <plantobservation>
56
                                <collectionnumber>$CollectorNumber</collectionnumber>
57
                                <specimenreplicate>
58
                                    <catalognumber_dwc>$CatalogNumber</catalognumber_dwc>
59
                                    <collectioncode_dwc>$CollectionCode</collectioncode_dwc>
60
                                    <institution_id>
61
                                        <sourcename>
62
                                            <matched_source_id><source><shortname>$InstitutionCode</shortname></source></matched_source_id>
63
                                            <name>$InstitutionCode</name>
64
                                        </sourcename>
65
                                    </institution_id>
66
                                </specimenreplicate>
67
                            </plantobservation>
68
                        </aggregateoccurrence>
69
                        <collector_id><party><fullname>$Collector</fullname></party></collector_id>
70
                        <taxondetermination>
71
                            <party_id><party><fullname>$IdentifiedBy</fullname></party></party_id>
72
                            <taxonverbatim_id>
73
                                <taxonverbatim>
74
                                    <taxonlabel_id>
75
                                        <taxonlabel>
76
                                            <matched_label_id>
7
            <_simplifyPath>
8
                <next>parent_id</next>
9
                <path>
10
                    <location>
11
                        <authorlocationcode>
12
                            <_join>
13
                                <1>$InstitutionCode</1>
14
                                <2>$CollectionCode</2>
15
                                <3>$CatalogNumber</3>
16
                            </_join>
17
                        </authorlocationcode>
18
                        <elevation_m>
19
                            <_avg>
20
                                <max>$MaximumElevation</max>
21
                                <min>$MinimumElevation</min>
22
                            </_avg>
23
                        </elevation_m>
24
                        <locationevent>
25
                            <taxonoccurrence>
26
                                <aggregateoccurrence>
27
                                    <collectiondate>
28
                                        <_date>
29
                                            <day>
30
                                                <_nullIf>
31
                                                    <null>0</null>
32
                                                    <type>float</type>
33
                                                    <value>$DayCollected</value>
34
                                                </_nullIf>
35
                                            </day>
36
                                            <month>
37
                                                <_nullIf>
38
                                                    <null>0</null>
39
                                                    <type>float</type>
40
                                                    <value>$MonthCollected</value>
41
                                                </_nullIf>
42
                                            </month>
43
                                            <year>
44
                                                <_nullIf>
45
                                                    <null>0</null>
46
                                                    <type>float</type>
47
                                                    <value>$YearCollected</value>
48
                                                </_nullIf>
49
                                            </year>
50
                                        </_date>
51
                                    </collectiondate>
52
                                    <count>$IndividualCount</count>
53
                                    <notes>
54
                                        <_alt>
55
                                            <0>$convertednotes</0>
56
                                            <1>$notes</1>
57
                                        </_alt>
58
                                    </notes>
59
                                    <plantobservation>
60
                                        <collectionnumber>$CollectorNumber</collectionnumber>
61
                                        <specimenreplicate>
62
                                            <catalognumber_dwc>$CatalogNumber</catalognumber_dwc>
63
                                            <collectioncode_dwc>$CollectionCode</collectioncode_dwc>
64
                                            <institution_id>
65
                                                <sourcename>
66
                                                    <matched_source_id><source><shortname>$InstitutionCode</shortname></source></matched_source_id>
67
                                                    <name>$InstitutionCode</name>
68
                                                </sourcename>
69
                                            </institution_id>
70
                                        </specimenreplicate>
71
                                    </plantobservation>
72
                                </aggregateoccurrence>
73
                                <collector_id><party><fullname>$Collector</fullname></party></collector_id>
74
                                <taxondetermination>
75
                                    <party_id><party><fullname>$IdentifiedBy</fullname></party></party_id>
76
                                    <taxonverbatim_id>
77
                                        <taxonverbatim>
78
                                            <taxonlabel_id>
77 79
                                                <taxonlabel>
78
                                                    <source_id><source><shortname>TNRS</shortname></source></source_id>
79
                                                    <taxonomicname>
80
                                                        <_join_words>
81
                                                            <1>
82
                                                                <_taxon_family_require_std>
83
                                                                    <family>
84
                                                                        <_nullIf>
85
                                                                            <null>$ScientificName</null>
86
                                                                            <value>$family</value>
87
                                                                        </_nullIf>
88
                                                                    </family>
89
                                                                </_taxon_family_require_std>
90
                                                            </1>
91
                                                            <2>
80
                                                    <matched_label_id>
81
                                                        <taxonlabel>
82
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
83
                                                            <taxonomicname>
92 84
                                                                <_join_words>
93 85
                                                                    <1>
94
                                                                        <_alt>
95
                                                                            <1>$ScientificName</1>
96
                                                                            <2>
97
                                                                                <_join_words>
98
                                                                                    <2>$genus</2>
99
                                                                                    <3>$species</3>
100
                                                                                    <4>$Subspecies</4>
101
                                                                                </_join_words>
102
                                                                            </2>
103
                                                                        </_alt>
86
                                                                        <_taxon_family_require_std>
87
                                                                            <family>
88
                                                                                <_nullIf>
89
                                                                                    <null>$ScientificName</null>
90
                                                                                    <value>$family</value>
91
                                                                                </_nullIf>
92
                                                                            </family>
93
                                                                        </_taxon_family_require_std>
104 94
                                                                    </1>
105
                                                                    <2>$ScientificNameAuthor</2>
95
                                                                    <2>
96
                                                                        <_join_words>
97
                                                                            <1>
98
                                                                                <_alt>
99
                                                                                    <1>$ScientificName</1>
100
                                                                                    <2>
101
                                                                                        <_join_words>
102
                                                                                            <2>$genus</2>
103
                                                                                            <3>$species</3>
104
                                                                                            <4>$Subspecies</4>
105
                                                                                        </_join_words>
106
                                                                                    </2>
107
                                                                                </_alt>
108
                                                                            </1>
109
                                                                            <2>$ScientificNameAuthor</2>
110
                                                                        </_join_words>
111
                                                                    </2>
106 112
                                                                </_join_words>
107
                                                            </2>
108
                                                        </_join_words>
109
                                                    </taxonomicname>
110
                                                </taxonlabel>
111
                                            </matched_label_id>
112
                                            <parent_id>
113
                                                <taxonlabel>
113
                                                            </taxonomicname>
114
                                                        </taxonlabel>
115
                                                    </matched_label_id>
114 116
                                                    <parent_id>
115 117
                                                        <taxonlabel>
116
                                                            <rank>cultivar</rank>
117 118
                                                            <parent_id>
118 119
                                                                <taxonlabel>
119
                                                                    <rank>forma</rank>
120
                                                                    <rank>cultivar</rank>
120 121
                                                                    <parent_id>
121 122
                                                                        <taxonlabel>
122
                                                                            <rank>variety</rank>
123
                                                                            <rank>forma</rank>
123 124
                                                                            <parent_id>
124 125
                                                                                <taxonlabel>
125
                                                                                    <rank>subspecies</rank>
126
                                                                                    <taxonepithet>$Subspecies</taxonepithet>
126
                                                                                    <rank>variety</rank>
127 127
                                                                                    <parent_id>
128 128
                                                                                        <taxonlabel>
129
                                                                                            <rank>species</rank>
130
                                                                                            <taxonepithet>$species</taxonepithet>
129
                                                                                            <rank>subspecies</rank>
130
                                                                                            <taxonepithet>$Subspecies</taxonepithet>
131 131
                                                                                            <parent_id>
132 132
                                                                                                <taxonlabel>
133
                                                                                                    <rank>genus</rank>
134
                                                                                                    <taxonepithet>$genus</taxonepithet>
133
                                                                                                    <rank>species</rank>
134
                                                                                                    <taxonepithet>$species</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>
......
171 177
                                                            </parent_id>
172 178
                                                        </taxonlabel>
173 179
                                                    </parent_id>
174
                                                </taxonlabel>
175
                                            </parent_id>
176
                                            <taxonomicname>
177
                                                <_join_words>
178
                                                    <1>
179
                                                        <_taxon_family_require_std>
180
                                                            <family>
181
                                                                <_nullIf>
182
                                                                    <null>$ScientificName</null>
183
                                                                    <value>$family</value>
184
                                                                </_nullIf>
185
                                                            </family>
186
                                                        </_taxon_family_require_std>
187
                                                    </1>
188
                                                    <2>
180
                                                    <taxonomicname>
189 181
                                                        <_join_words>
190 182
                                                            <1>
191
                                                                <_alt>
192
                                                                    <1>$ScientificName</1>
193
                                                                    <2>
194
                                                                        <_join_words>
195
                                                                            <2>$genus</2>
196
                                                                            <3>$species</3>
197
                                                                            <4>$Subspecies</4>
198
                                                                        </_join_words>
199
                                                                    </2>
200
                                                                </_alt>
183
                                                                <_taxon_family_require_std>
184
                                                                    <family>
185
                                                                        <_nullIf>
186
                                                                            <null>$ScientificName</null>
187
                                                                            <value>$family</value>
188
                                                                        </_nullIf>
189
                                                                    </family>
190
                                                                </_taxon_family_require_std>
201 191
                                                            </1>
202
                                                            <2>$ScientificNameAuthor</2>
192
                                                            <2>
193
                                                                <_join_words>
194
                                                                    <1>
195
                                                                        <_alt>
196
                                                                            <1>$ScientificName</1>
197
                                                                            <2>
198
                                                                                <_join_words>
199
                                                                                    <2>$genus</2>
200
                                                                                    <3>$species</3>
201
                                                                                    <4>$Subspecies</4>
202
                                                                                </_join_words>
203
                                                                            </2>
204
                                                                        </_alt>
205
                                                                    </1>
206
                                                                    <2>$ScientificNameAuthor</2>
207
                                                                </_join_words>
208
                                                            </2>
203 209
                                                        </_join_words>
204
                                                    </2>
205
                                                </_join_words>
206
                                            </taxonomicname>
207
                                        </taxonlabel>
208
                                    </taxonlabel_id>
209
                                    <author>$ScientificNameAuthor</author>
210
                                    <family>$family</family>
211
                                    <genus>$genus</genus>
212
                                    <specific_epithet>$species</specific_epithet>
213
                                    <taxonname>$ScientificName</taxonname>
214
                                </taxonverbatim>
215
                            </taxonverbatim_id>
216
                        </taxondetermination>
217
                    </taxonoccurrence>
218
                </locationevent>
219
                <locationnarrative>$Locality</locationnarrative>
220
                <locationplace>
221
                    <place_id>
222
                        <place>
223
                            <coordinates_id>
224
                                <coordinates>
225
                                    <latitude_deg>
226
                                        <_nullIf>
227
                                            <null>0</null>
228
                                            <type>float</type>
229
                                            <value>$latitude</value>
230
                                        </_nullIf>
231
                                    </latitude_deg>
232
                                    <longitude_deg>
233
                                        <_nullIf>
234
                                            <null>0</null>
235
                                            <type>float</type>
236
                                            <value>$longitude</value>
237
                                        </_nullIf>
238
                                    </longitude_deg>
239
                                </coordinates>
240
                            </coordinates_id>
241
                            <continent>$ContinentOcean</continent>
242
                            <country>$Country</country>
243
                            <county>$County</county>
244
                            <matched_place_id>
210
                                                    </taxonomicname>
211
                                                </taxonlabel>
212
                                            </taxonlabel_id>
213
                                            <author>$ScientificNameAuthor</author>
214
                                            <family>$family</family>
215
                                            <genus>$genus</genus>
216
                                            <specific_epithet>$species</specific_epithet>
217
                                            <taxonname>$ScientificName</taxonname>
218
                                        </taxonverbatim>
219
                                    </taxonverbatim_id>
220
                                </taxondetermination>
221
                            </taxonoccurrence>
222
                        </locationevent>
223
                        <locationnarrative>$Locality</locationnarrative>
224
                        <locationplace>
225
                            <place_id>
245 226
                                <place>
246
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
247 227
                                    <coordinates_id>
248 228
                                        <coordinates>
249
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
250 229
                                            <latitude_deg>
251 230
                                                <_nullIf>
252 231
                                                    <null>0</null>
......
263 242
                                            </longitude_deg>
264 243
                                        </coordinates>
265 244
                                    </coordinates_id>
245
                                    <continent>$ContinentOcean</continent>
266 246
                                    <country>$Country</country>
267 247
                                    <county>$County</county>
248
                                    <matched_place_id>
249
                                        <place>
250
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
251
                                            <coordinates_id>
252
                                                <coordinates>
253
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
254
                                                    <latitude_deg>
255
                                                        <_nullIf>
256
                                                            <null>0</null>
257
                                                            <type>float</type>
258
                                                            <value>$latitude</value>
259
                                                        </_nullIf>
260
                                                    </latitude_deg>
261
                                                    <longitude_deg>
262
                                                        <_nullIf>
263
                                                            <null>0</null>
264
                                                            <type>float</type>
265
                                                            <value>$longitude</value>
266
                                                        </_nullIf>
267
                                                    </longitude_deg>
268
                                                </coordinates>
269
                                            </coordinates_id>
270
                                            <country>$Country</country>
271
                                            <county>$County</county>
272
                                            <stateprovince>$StateProvince</stateprovince>
273
                                        </place>
274
                                    </matched_place_id>
268 275
                                    <stateprovince>$StateProvince</stateprovince>
269 276
                                </place>
270
                            </matched_place_id>
271
                            <stateprovince>$StateProvince</stateprovince>
272
                        </place>
273
                    </place_id>
274
                </locationplace>
275
            </location>
277
                            </place_id>
278
                        </locationplace>
279
                    </location>
280
                </path>
281
            </_simplifyPath>
276 282
        </path>
277
    </_simplifyPath>
283
    </_setDefault>
278 284
</VegBIEN>
279 285
Inserted 40 new rows into database

Also available in: Unified diff