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>JBM</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><_avg><min>$minimumElevationInMeters</min></_avg></elevation_m>
25
                <locationevent>
26
                    <obsenddate><_dateRangeEnd><value>$eventDate</value></_dateRangeEnd></obsenddate>
27
                    <obsstartdate><_dateRangeStart><value>$eventDate</value></_dateRangeStart></obsstartdate>
28
                    <taxonoccurrence>
29
                        <aggregateoccurrence>
30
                            <plantobservation>
31
                                <collectionnumber>$recordNumber</collectionnumber>
32
                                <definedvalue fkey="tablerecord_id">
33
                                    <userdefined_id>
34
                                        <userdefined>
35
                                            <tablename>plantobservation</tablename>
36
                                            <userdefinedname>sex</userdefinedname>
37
                                        </userdefined>
38
                                    </userdefined_id>
39
                                    <definedvalue>$sex</definedvalue>
40
                                </definedvalue>
41
                                <specimenreplicate>
42
                                    <catalognumber_dwc>$catalogNumber</catalognumber_dwc>
43
                                    <collectioncode_dwc>
44
                                        <_join>
45
                                            <1>$collectionCode</1>
46
                                            <2>$collectionID</2>
47
                                        </_join>
48
                                    </collectioncode_dwc>
49
                                    <institution_id>
50
                                        <sourcename>
51
                                            <matched_source_id><source><shortname>$institutionCode</shortname></source></matched_source_id>
52
                                            <name>$institutionCode</name>
53
                                        </sourcename>
54
                                    </institution_id>
55
                                    <sourceaccessioncode>$id</sourceaccessioncode>
56
                                </specimenreplicate>
57
                            </plantobservation>
58
                        </aggregateoccurrence>
59
                        <collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
60
                        <sourceaccessioncode>$id</sourceaccessioncode>
61
                        <taxondetermination>
62
                            <taxonverbatim_id>
63
                                <taxonverbatim>
64
                                    <taxonlabel_id>
65
                                        <taxonlabel>
66
                                            <matched_label_id>
26
                            </_alt>
27
                        </authorlocationcode>
28
                        <elevation_m><_avg><min>$minimumElevationInMeters</min></_avg></elevation_m>
29
                        <locationevent>
30
                            <obsenddate><_dateRangeEnd><value>$eventDate</value></_dateRangeEnd></obsenddate>
31
                            <obsstartdate><_dateRangeStart><value>$eventDate</value></_dateRangeStart></obsstartdate>
32
                            <taxonoccurrence>
33
                                <aggregateoccurrence>
34
                                    <plantobservation>
35
                                        <collectionnumber>$recordNumber</collectionnumber>
36
                                        <definedvalue fkey="tablerecord_id">
37
                                            <userdefined_id>
38
                                                <userdefined>
39
                                                    <tablename>plantobservation</tablename>
40
                                                    <userdefinedname>sex</userdefinedname>
41
                                                </userdefined>
42
                                            </userdefined_id>
43
                                            <definedvalue>$sex</definedvalue>
44
                                        </definedvalue>
45
                                        <specimenreplicate>
46
                                            <catalognumber_dwc>$catalogNumber</catalognumber_dwc>
47
                                            <collectioncode_dwc>
48
                                                <_join>
49
                                                    <1>$collectionCode</1>
50
                                                    <2>$collectionID</2>
51
                                                </_join>
52
                                            </collectioncode_dwc>
53
                                            <institution_id>
54
                                                <sourcename>
55
                                                    <matched_source_id><source><shortname>$institutionCode</shortname></source></matched_source_id>
56
                                                    <name>$institutionCode</name>
57
                                                </sourcename>
58
                                            </institution_id>
59
                                            <sourceaccessioncode>$id</sourceaccessioncode>
60
                                        </specimenreplicate>
61
                                    </plantobservation>
62
                                </aggregateoccurrence>
63
                                <collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
64
                                <sourceaccessioncode>$id</sourceaccessioncode>
65
                                <taxondetermination>
66
                                    <taxonverbatim_id>
67
                                        <taxonverbatim>
68
                                            <taxonlabel_id>
67 69
                                                <taxonlabel>
68
                                                    <source_id><source><shortname>TNRS</shortname></source></source_id>
69
                                                    <taxonomicname>
70
                                                        <_join_words>
71
                                                            <1>
72
                                                                <_taxon_family_require_std>
73
                                                                    <family>
74
                                                                        <_nullIf>
75
                                                                            <null>$scientificName</null>
76
                                                                            <value>$family</value>
77
                                                                        </_nullIf>
78
                                                                    </family>
79
                                                                </_taxon_family_require_std>
80
                                                            </1>
81
                                                            <2>
82
                                                                <_alt>
83
                                                                    <1>$scientificName</1>
70
                                                    <matched_label_id>
71
                                                        <taxonlabel>
72
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
73
                                                            <taxonomicname>
74
                                                                <_join_words>
75
                                                                    <1>
76
                                                                        <_taxon_family_require_std>
77
                                                                            <family>
78
                                                                                <_nullIf>
79
                                                                                    <null>$scientificName</null>
80
                                                                                    <value>$family</value>
81
                                                                                </_nullIf>
82
                                                                            </family>
83
                                                                        </_taxon_family_require_std>
84
                                                                    </1>
84 85
                                                                    <2>
85
                                                                        <_join_words>
86
                                                                            <2>$genus</2>
87
                                                                            <3>$specificEpithet</3>
88
                                                                        </_join_words>
86
                                                                        <_alt>
87
                                                                            <1>$scientificName</1>
88
                                                                            <2>
89
                                                                                <_join_words>
90
                                                                                    <2>$genus</2>
91
                                                                                    <3>$specificEpithet</3>
92
                                                                                </_join_words>
93
                                                                            </2>
94
                                                                        </_alt>
89 95
                                                                    </2>
90
                                                                </_alt>
91
                                                            </2>
92
                                                        </_join_words>
93
                                                    </taxonomicname>
94
                                                </taxonlabel>
95
                                            </matched_label_id>
96
                                            <parent_id>
97
                                                <taxonlabel>
96
                                                                </_join_words>
97
                                                            </taxonomicname>
98
                                                        </taxonlabel>
99
                                                    </matched_label_id>
98 100
                                                    <parent_id>
99 101
                                                        <taxonlabel>
100
                                                            <rank>cultivar</rank>
101 102
                                                            <parent_id>
102 103
                                                                <taxonlabel>
103
                                                                    <rank>forma</rank>
104
                                                                    <rank>cultivar</rank>
104 105
                                                                    <parent_id>
105 106
                                                                        <taxonlabel>
106
                                                                            <rank>variety</rank>
107
                                                                            <rank>forma</rank>
107 108
                                                                            <parent_id>
108 109
                                                                                <taxonlabel>
109
                                                                                    <rank>subspecies</rank>
110
                                                                                    <rank>variety</rank>
110 111
                                                                                    <parent_id>
111 112
                                                                                        <taxonlabel>
112
                                                                                            <rank>species</rank>
113
                                                                                            <taxonepithet>$specificEpithet</taxonepithet>
113
                                                                                            <rank>subspecies</rank>
114 114
                                                                                            <parent_id>
115 115
                                                                                                <taxonlabel>
116
                                                                                                    <rank>genus</rank>
117
                                                                                                    <taxonepithet>$genus</taxonepithet>
116
                                                                                                    <rank>species</rank>
117
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
118 118
                                                                                                    <parent_id>
119 119
                                                                                                        <taxonlabel>
120
                                                                                                            <rank>family</rank>
121
                                                                                                            <taxonepithet>$family</taxonepithet>
120
                                                                                                            <rank>genus</rank>
121
                                                                                                            <taxonepithet>$genus</taxonepithet>
122 122
                                                                                                            <parent_id>
123 123
                                                                                                                <taxonlabel>
124
                                                                                                                    <rank>order</rank>
125
                                                                                                                    <taxonepithet>$order</taxonepithet>
124
                                                                                                                    <rank>family</rank>
125
                                                                                                                    <taxonepithet>$family</taxonepithet>
126 126
                                                                                                                    <parent_id>
127 127
                                                                                                                        <taxonlabel>
128
                                                                                                                            <rank>class</rank>
128
                                                                                                                            <rank>order</rank>
129
                                                                                                                            <taxonepithet>$order</taxonepithet>
129 130
                                                                                                                            <parent_id>
130 131
                                                                                                                                <taxonlabel>
131
                                                                                                                                    <rank>phylum</rank>
132
                                                                                                                                    <rank>class</rank>
132 133
                                                                                                                                    <parent_id>
133 134
                                                                                                                                        <taxonlabel>
134
                                                                                                                                            <rank>kingdom</rank>
135
                                                                                                                                            <taxonepithet>$kingdom</taxonepithet>
135
                                                                                                                                            <rank>phylum</rank>
136
                                                                                                                                            <parent_id>
137
                                                                                                                                                <taxonlabel>
138
                                                                                                                                                    <rank>kingdom</rank>
139
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
140
                                                                                                                                                </taxonlabel>
141
                                                                                                                                            </parent_id>
136 142
                                                                                                                                        </taxonlabel>
137 143
                                                                                                                                    </parent_id>
138 144
                                                                                                                                </taxonlabel>
......
155 161
                                                            </parent_id>
156 162
                                                        </taxonlabel>
157 163
                                                    </parent_id>
158
                                                </taxonlabel>
159
                                            </parent_id>
160
                                            <taxonomicname>
161
                                                <_join_words>
162
                                                    <1>
163
                                                        <_taxon_family_require_std>
164
                                                            <family>
165
                                                                <_nullIf>
166
                                                                    <null>$scientificName</null>
167
                                                                    <value>$family</value>
168
                                                                </_nullIf>
169
                                                            </family>
170
                                                        </_taxon_family_require_std>
171
                                                    </1>
172
                                                    <2>
173
                                                        <_alt>
174
                                                            <1>$scientificName</1>
164
                                                    <taxonomicname>
165
                                                        <_join_words>
166
                                                            <1>
167
                                                                <_taxon_family_require_std>
168
                                                                    <family>
169
                                                                        <_nullIf>
170
                                                                            <null>$scientificName</null>
171
                                                                            <value>$family</value>
172
                                                                        </_nullIf>
173
                                                                    </family>
174
                                                                </_taxon_family_require_std>
175
                                                            </1>
175 176
                                                            <2>
176
                                                                <_join_words>
177
                                                                    <2>$genus</2>
178
                                                                    <3>$specificEpithet</3>
179
                                                                </_join_words>
177
                                                                <_alt>
178
                                                                    <1>$scientificName</1>
179
                                                                    <2>
180
                                                                        <_join_words>
181
                                                                            <2>$genus</2>
182
                                                                            <3>$specificEpithet</3>
183
                                                                        </_join_words>
184
                                                                    </2>
185
                                                                </_alt>
180 186
                                                            </2>
181
                                                        </_alt>
182
                                                    </2>
183
                                                </_join_words>
184
                                            </taxonomicname>
185
                                        </taxonlabel>
186
                                    </taxonlabel_id>
187
                                    <family>$family</family>
188
                                    <genus>$genus</genus>
189
                                    <specific_epithet>$specificEpithet</specific_epithet>
190
                                    <taxonomicname>$scientificName</taxonomicname>
191
                                </taxonverbatim>
192
                            </taxonverbatim_id>
193
                        </taxondetermination>
194
                    </taxonoccurrence>
195
                </locationevent>
196
                <locationnarrative>
197
                    <_merge>
198
                        <1>$locality</1>
199
                        <3>
200
                            <_label>
201
                                <label>habitat</label>
202
                                <value>$habitat</value>
203
                            </_label>
204
                        </3>
205
                    </_merge>
206
                </locationnarrative>
207
                <locationplace>
208
                    <place_id>
209
                        <place>
210
                            <coordinates_id>
211
                                <coordinates>
212
                                    <coordsaccuracy_m><_noCV><value>$coordinateUncertaintyInMeters</value></_noCV></coordsaccuracy_m>
213
                                    <latitude_deg>
214
                                        <_nullIf>
215
                                            <null>0</null>
216
                                            <type>float</type>
217
                                            <value>$decimalLatitude</value>
218
                                        </_nullIf>
219
                                    </latitude_deg>
220
                                    <longitude_deg>
221
                                        <_nullIf>
222
                                            <null>0</null>
223
                                            <type>float</type>
224
                                            <value>$decimalLongitude</value>
225
                                        </_nullIf>
226
                                    </longitude_deg>
227
                                    <verbatimlatitude>$verbatimLatitude</verbatimlatitude>
228
                                    <verbatimlongitude>$verbatimLongitude</verbatimlongitude>
229
                                </coordinates>
230
                            </coordinates_id>
231
                            <country>$country</country>
232
                            <county>$county</county>
233
                            <matched_place_id>
187
                                                        </_join_words>
188
                                                    </taxonomicname>
189
                                                </taxonlabel>
190
                                            </taxonlabel_id>
191
                                            <family>$family</family>
192
                                            <genus>$genus</genus>
193
                                            <specific_epithet>$specificEpithet</specific_epithet>
194
                                            <taxonomicname>$scientificName</taxonomicname>
195
                                        </taxonverbatim>
196
                                    </taxonverbatim_id>
197
                                </taxondetermination>
198
                            </taxonoccurrence>
199
                        </locationevent>
200
                        <locationnarrative>
201
                            <_merge>
202
                                <1>$locality</1>
203
                                <3>
204
                                    <_label>
205
                                        <label>habitat</label>
206
                                        <value>$habitat</value>
207
                                    </_label>
208
                                </3>
209
                            </_merge>
210
                        </locationnarrative>
211
                        <locationplace>
212
                            <place_id>
234 213
                                <place>
235
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
236 214
                                    <coordinates_id>
237 215
                                        <coordinates>
238
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
216
                                            <coordsaccuracy_m><_noCV><value>$coordinateUncertaintyInMeters</value></_noCV></coordsaccuracy_m>
239 217
                                            <latitude_deg>
240 218
                                                <_nullIf>
241 219
                                                    <null>0</null>
......
250 228
                                                    <value>$decimalLongitude</value>
251 229
                                                </_nullIf>
252 230
                                            </longitude_deg>
231
                                            <verbatimlatitude>$verbatimLatitude</verbatimlatitude>
232
                                            <verbatimlongitude>$verbatimLongitude</verbatimlongitude>
253 233
                                        </coordinates>
254 234
                                    </coordinates_id>
255 235
                                    <country>$country</country>
256 236
                                    <county>$county</county>
237
                                    <matched_place_id>
238
                                        <place>
239
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
240
                                            <coordinates_id>
241
                                                <coordinates>
242
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
243
                                                    <latitude_deg>
244
                                                        <_nullIf>
245
                                                            <null>0</null>
246
                                                            <type>float</type>
247
                                                            <value>$decimalLatitude</value>
248
                                                        </_nullIf>
249
                                                    </latitude_deg>
250
                                                    <longitude_deg>
251
                                                        <_nullIf>
252
                                                            <null>0</null>
253
                                                            <type>float</type>
254
                                                            <value>$decimalLongitude</value>
255
                                                        </_nullIf>
256
                                                    </longitude_deg>
257
                                                </coordinates>
258
                                            </coordinates_id>
259
                                            <country>$country</country>
260
                                            <county>$county</county>
261
                                            <stateprovince>$stateProvince</stateprovince>
262
                                        </place>
263
                                    </matched_place_id>
257 264
                                    <stateprovince>$stateProvince</stateprovince>
258 265
                                </place>
259
                            </matched_place_id>
260
                            <stateprovince>$stateProvince</stateprovince>
261
                        </place>
262
                    </place_id>
263
                </locationplace>
264
            </location>
266
                            </place_id>
267
                        </locationplace>
268
                    </location>
269
                </path>
270
            </_simplifyPath>
265 271
        </path>
266
    </_simplifyPath>
272
    </_setDefault>
267 273
</VegBIEN>
268 274
Inserted 38 new rows into database

Also available in: Unified diff