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>REMIB</shortname></source></value>
5 6
        <path>
6
            <location>
7
                <authorlocationcode>
8
                    <_join>
9
                        <1>$acronym</1>
10
                        <3>$accession_number</3>
11
                    </_join>
12
                </authorlocationcode>
13
                <locationevent>
14
                    <taxonoccurrence>
15
                        <aggregateoccurrence>
16
                            <collectiondate>
17
                                <_date>
18
                                    <day>
19
                                        <_nullIf>
20
                                            <null>0</null>
21
                                            <type>float</type>
22
                                            <value>$coll_day</value>
23
                                        </_nullIf>
24
                                    </day>
25
                                    <month>
26
                                        <_nullIf>
27
                                            <null>0</null>
28
                                            <type>float</type>
29
                                            <value>$coll_month</value>
30
                                        </_nullIf>
31
                                    </month>
32
                                    <year>
33
                                        <_nullIf>
34
                                            <null>0</null>
35
                                            <type>float</type>
36
                                            <value>$coll_year</value>
37
                                        </_nullIf>
38
                                    </year>
39
                                </_date>
40
                            </collectiondate>
41
                            <plantobservation>
42
                                <specimenreplicate>
43
                                    <catalognumber_dwc>$accession_number</catalognumber_dwc>
44
                                    <institution_id>
45
                                        <sourcename>
46
                                            <matched_source_id><source><shortname>$acronym</shortname></source></matched_source_id>
47
                                            <name>$acronym</name>
48
                                        </sourcename>
49
                                    </institution_id>
50
                                </specimenreplicate>
51
                            </plantobservation>
52
                        </aggregateoccurrence>
53
                        <collector_id><party><fullname>$collector</fullname></party></collector_id>
54
                        <taxondetermination>
55
                            <taxonverbatim_id>
56
                                <taxonverbatim>
57
                                    <taxonlabel_id>
58
                                        <taxonlabel>
59
                                            <matched_label_id>
7
            <_simplifyPath>
8
                <next>parent_id</next>
9
                <path>
10
                    <location>
11
                        <authorlocationcode>
12
                            <_join>
13
                                <1>$acronym</1>
14
                                <3>$accession_number</3>
15
                            </_join>
16
                        </authorlocationcode>
17
                        <locationevent>
18
                            <taxonoccurrence>
19
                                <aggregateoccurrence>
20
                                    <collectiondate>
21
                                        <_date>
22
                                            <day>
23
                                                <_nullIf>
24
                                                    <null>0</null>
25
                                                    <type>float</type>
26
                                                    <value>$coll_day</value>
27
                                                </_nullIf>
28
                                            </day>
29
                                            <month>
30
                                                <_nullIf>
31
                                                    <null>0</null>
32
                                                    <type>float</type>
33
                                                    <value>$coll_month</value>
34
                                                </_nullIf>
35
                                            </month>
36
                                            <year>
37
                                                <_nullIf>
38
                                                    <null>0</null>
39
                                                    <type>float</type>
40
                                                    <value>$coll_year</value>
41
                                                </_nullIf>
42
                                            </year>
43
                                        </_date>
44
                                    </collectiondate>
45
                                    <plantobservation>
46
                                        <specimenreplicate>
47
                                            <catalognumber_dwc>$accession_number</catalognumber_dwc>
48
                                            <institution_id>
49
                                                <sourcename>
50
                                                    <matched_source_id><source><shortname>$acronym</shortname></source></matched_source_id>
51
                                                    <name>$acronym</name>
52
                                                </sourcename>
53
                                            </institution_id>
54
                                        </specimenreplicate>
55
                                    </plantobservation>
56
                                </aggregateoccurrence>
57
                                <collector_id><party><fullname>$collector</fullname></party></collector_id>
58
                                <taxondetermination>
59
                                    <taxonverbatim_id>
60
                                        <taxonverbatim>
61
                                            <taxonlabel_id>
60 62
                                                <taxonlabel>
61
                                                    <source_id><source><shortname>TNRS</shortname></source></source_id>
62
                                                    <taxonomicname>
63
                                                        <_join_words>
64
                                                            <1><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></1>
65
                                                            <2>
63
                                                    <matched_label_id>
64
                                                        <taxonlabel>
65
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
66
                                                            <taxonomicname>
66 67
                                                                <_join_words>
67
                                                                    <2>$genus</2>
68
                                                                    <3>$specificEpithet</3>
68
                                                                    <1><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></1>
69
                                                                    <2>
70
                                                                        <_join_words>
71
                                                                            <2>$genus</2>
72
                                                                            <3>$specificEpithet</3>
73
                                                                        </_join_words>
74
                                                                    </2>
69 75
                                                                </_join_words>
70
                                                            </2>
71
                                                        </_join_words>
72
                                                    </taxonomicname>
73
                                                </taxonlabel>
74
                                            </matched_label_id>
75
                                            <parent_id>
76
                                                <taxonlabel>
76
                                                            </taxonomicname>
77
                                                        </taxonlabel>
78
                                                    </matched_label_id>
77 79
                                                    <parent_id>
78 80
                                                        <taxonlabel>
79
                                                            <rank>cultivar</rank>
80 81
                                                            <parent_id>
81 82
                                                                <taxonlabel>
82
                                                                    <rank>forma</rank>
83
                                                                    <rank>cultivar</rank>
83 84
                                                                    <parent_id>
84 85
                                                                        <taxonlabel>
85
                                                                            <rank>variety</rank>
86
                                                                            <rank>forma</rank>
86 87
                                                                            <parent_id>
87 88
                                                                                <taxonlabel>
88
                                                                                    <rank>subspecies</rank>
89
                                                                                    <rank>variety</rank>
89 90
                                                                                    <parent_id>
90 91
                                                                                        <taxonlabel>
91
                                                                                            <rank>species</rank>
92
                                                                                            <taxonepithet>$specificEpithet</taxonepithet>
92
                                                                                            <rank>subspecies</rank>
93 93
                                                                                            <parent_id>
94 94
                                                                                                <taxonlabel>
95
                                                                                                    <rank>genus</rank>
96
                                                                                                    <taxonepithet>$genus</taxonepithet>
95
                                                                                                    <rank>species</rank>
96
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
97 97
                                                                                                    <parent_id>
98 98
                                                                                                        <taxonlabel>
99
                                                                                                            <rank>family</rank>
100
                                                                                                            <taxonepithet>$family</taxonepithet>
99
                                                                                                            <rank>genus</rank>
100
                                                                                                            <taxonepithet>$genus</taxonepithet>
101
                                                                                                            <parent_id>
102
                                                                                                                <taxonlabel>
103
                                                                                                                    <rank>family</rank>
104
                                                                                                                    <taxonepithet>$family</taxonepithet>
105
                                                                                                                </taxonlabel>
106
                                                                                                            </parent_id>
101 107
                                                                                                        </taxonlabel>
102 108
                                                                                                    </parent_id>
103 109
                                                                                                </taxonlabel>
......
112 118
                                                            </parent_id>
113 119
                                                        </taxonlabel>
114 120
                                                    </parent_id>
115
                                                </taxonlabel>
116
                                            </parent_id>
117
                                            <taxonomicname>
118
                                                <_join_words>
119
                                                    <1><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></1>
120
                                                    <2>
121
                                                    <taxonomicname>
121 122
                                                        <_join_words>
122
                                                            <2>$genus</2>
123
                                                            <3>$specificEpithet</3>
123
                                                            <1><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></1>
124
                                                            <2>
125
                                                                <_join_words>
126
                                                                    <2>$genus</2>
127
                                                                    <3>$specificEpithet</3>
128
                                                                </_join_words>
129
                                                            </2>
124 130
                                                        </_join_words>
125
                                                    </2>
126
                                                </_join_words>
127
                                            </taxonomicname>
128
                                        </taxonlabel>
129
                                    </taxonlabel_id>
130
                                    <family>$family</family>
131
                                    <genus>$genus</genus>
132
                                    <specific_epithet>$specificEpithet</specific_epithet>
133
                                </taxonverbatim>
134
                            </taxonverbatim_id>
135
                        </taxondetermination>
136
                    </taxonoccurrence>
137
                </locationevent>
138
                <locationnarrative>
139
                    <_merge>
140
                        <1>$locality</1>
141
                        <3>
142
                            <_label>
143
                                <label>habitat</label>
144
                                <value>$habitat</value>
145
                            </_label>
146
                        </3>
147
                    </_merge>
148
                </locationnarrative>
149
                <locationplace>
150
                    <place_id>
151
                        <place>
152
                            <coordinates_id>
153
                                <coordinates>
154
                                    <latitude_deg>
155
                                        <_nullIf>
156
                                            <null>0</null>
157
                                            <type>float</type>
158
                                            <value>$lat_deg</value>
159
                                        </_nullIf>
160
                                    </latitude_deg>
161
                                    <longitude_deg>
162
                                        <_nullIf>
163
                                            <null>0</null>
164
                                            <type>float</type>
165
                                            <value>$long_deg</value>
166
                                        </_nullIf>
167
                                    </longitude_deg>
168
                                </coordinates>
169
                            </coordinates_id>
170
                            <country>$country</country>
171
                            <county>$county</county>
172
                            <matched_place_id>
131
                                                    </taxonomicname>
132
                                                </taxonlabel>
133
                                            </taxonlabel_id>
134
                                            <family>$family</family>
135
                                            <genus>$genus</genus>
136
                                            <specific_epithet>$specificEpithet</specific_epithet>
137
                                        </taxonverbatim>
138
                                    </taxonverbatim_id>
139
                                </taxondetermination>
140
                            </taxonoccurrence>
141
                        </locationevent>
142
                        <locationnarrative>
143
                            <_merge>
144
                                <1>$locality</1>
145
                                <3>
146
                                    <_label>
147
                                        <label>habitat</label>
148
                                        <value>$habitat</value>
149
                                    </_label>
150
                                </3>
151
                            </_merge>
152
                        </locationnarrative>
153
                        <locationplace>
154
                            <place_id>
173 155
                                <place>
174
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
175 156
                                    <coordinates_id>
176 157
                                        <coordinates>
177
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
178 158
                                            <latitude_deg>
179 159
                                                <_nullIf>
180 160
                                                    <null>0</null>
......
193 173
                                    </coordinates_id>
194 174
                                    <country>$country</country>
195 175
                                    <county>$county</county>
176
                                    <matched_place_id>
177
                                        <place>
178
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
179
                                            <coordinates_id>
180
                                                <coordinates>
181
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
182
                                                    <latitude_deg>
183
                                                        <_nullIf>
184
                                                            <null>0</null>
185
                                                            <type>float</type>
186
                                                            <value>$lat_deg</value>
187
                                                        </_nullIf>
188
                                                    </latitude_deg>
189
                                                    <longitude_deg>
190
                                                        <_nullIf>
191
                                                            <null>0</null>
192
                                                            <type>float</type>
193
                                                            <value>$long_deg</value>
194
                                                        </_nullIf>
195
                                                    </longitude_deg>
196
                                                </coordinates>
197
                                            </coordinates_id>
198
                                            <country>$country</country>
199
                                            <county>$county</county>
200
                                            <stateprovince>$state</stateprovince>
201
                                        </place>
202
                                    </matched_place_id>
196 203
                                    <stateprovince>$state</stateprovince>
197 204
                                </place>
198
                            </matched_place_id>
199
                            <stateprovince>$state</stateprovince>
200
                        </place>
201
                    </place_id>
202
                </locationplace>
203
            </location>
205
                            </place_id>
206
                        </locationplace>
207
                    </location>
208
                </path>
209
            </_simplifyPath>
204 210
        </path>
205
    </_simplifyPath>
211
    </_setDefault>
206 212
</VegBIEN>
207 213
Inserted 33 new rows into database

Also available in: Unified diff