Revision 4621
Added by Aaron Marcuse-Kubitza almost 12 years ago
test.xml.ref | ||
---|---|---|
1 | 1 |
Put template: |
2 | 2 |
<VegBIEN> |
3 |
<location id="-1">
|
|
4 |
<authorlocationcode>
|
|
5 |
<_alt>
|
|
6 |
<1>$id</1>
|
|
7 |
<2>
|
|
8 |
<_join>
|
|
9 |
<1>$institutionCode</1>
|
|
3 |
<_simplifyPath id="-1">
|
|
4 |
<next>parent_id</next>
|
|
5 |
<path>
|
|
6 |
<location>
|
|
7 |
<authorlocationcode>
|
|
8 |
<_alt>
|
|
9 |
<1>$id</1>
|
|
10 | 10 |
<2> |
11 | 11 |
<_join> |
12 |
<1>$collectionCode</1> |
|
13 |
<2>$collectionID</2> |
|
12 |
<1>$institutionCode</1> |
|
13 |
<2> |
|
14 |
<_join> |
|
15 |
<1>$collectionCode</1> |
|
16 |
<2>$collectionID</2> |
|
17 |
</_join> |
|
18 |
</2> |
|
19 |
<3>$catalogNumber</3> |
|
14 | 20 |
</_join> |
15 | 21 |
</2> |
16 |
<3>$catalogNumber</3> |
|
17 |
</_join> |
|
18 |
</2> |
|
19 |
</_alt> |
|
20 |
</authorlocationcode> |
|
21 |
<elevation> |
|
22 |
<_alt> |
|
23 |
<1> |
|
24 |
<_replace> |
|
25 |
<\bca\.?></\bca\.?> |
|
26 |
<value>$verbatimElevation</value> |
|
27 |
</_replace> |
|
28 |
</1> |
|
29 |
<2> |
|
30 |
<_avg> |
|
31 |
<max> |
|
22 |
</_alt> |
|
23 |
</authorlocationcode> |
|
24 |
<elevation> |
|
25 |
<_alt> |
|
26 |
<1> |
|
27 |
<_replace> |
|
28 |
<\bca\.?></\bca\.?> |
|
29 |
<value>$verbatimElevation</value> |
|
30 |
</_replace> |
|
31 |
</1> |
|
32 |
<2> |
|
33 |
<_avg> |
|
34 |
<max> |
|
35 |
<_units> |
|
36 |
<default>m</default> |
|
37 |
<to>m</to> |
|
38 |
<to></to> |
|
39 |
<value> |
|
40 |
<_replace> |
|
41 |
<\bca\.?></\bca\.?> |
|
42 |
<value>$maximumElevationInMeters</value> |
|
43 |
</_replace> |
|
44 |
</value> |
|
45 |
</_units> |
|
46 |
</max> |
|
47 |
<min> |
|
48 |
<_units> |
|
49 |
<default>m</default> |
|
50 |
<to>m</to> |
|
51 |
<to></to> |
|
52 |
<value> |
|
53 |
<_rangeStart> |
|
54 |
<value> |
|
55 |
<_replace> |
|
56 |
<\bca\.?></\bca\.?> |
|
57 |
<value>$minimumElevationInMeters</value> |
|
58 |
</_replace> |
|
59 |
</value> |
|
60 |
</_rangeStart> |
|
61 |
</value> |
|
62 |
</_units> |
|
63 |
</min> |
|
64 |
</_avg> |
|
65 |
</2> |
|
66 |
</_alt> |
|
67 |
</elevation> |
|
68 |
<elevationrange> |
|
69 |
<_range> |
|
70 |
<from> |
|
32 | 71 |
<_units> |
33 | 72 |
<default>m</default> |
34 | 73 |
<to>m</to> |
35 | 74 |
<to></to> |
36 | 75 |
<value> |
37 |
<_replace> |
|
38 |
<\bca\.?></\bca\.?> |
|
39 |
<value>$maximumElevationInMeters</value> |
|
40 |
</_replace> |
|
41 |
</value> |
|
42 |
</_units> |
|
43 |
</max> |
|
44 |
<min> |
|
45 |
<_units> |
|
46 |
<default>m</default> |
|
47 |
<to>m</to> |
|
48 |
<to></to> |
|
49 |
<value> |
|
50 | 76 |
<_rangeStart> |
51 | 77 |
<value> |
52 | 78 |
<_replace> |
... | ... | |
57 | 83 |
</_rangeStart> |
58 | 84 |
</value> |
59 | 85 |
</_units> |
60 |
</min> |
|
61 |
</_avg> |
|
62 |
</2> |
|
63 |
</_alt> |
|
64 |
</elevation> |
|
65 |
<elevationrange> |
|
66 |
<_range> |
|
67 |
<from> |
|
68 |
<_units> |
|
69 |
<default>m</default> |
|
70 |
<to>m</to> |
|
71 |
<to></to> |
|
72 |
<value> |
|
73 |
<_rangeStart> |
|
86 |
</from> |
|
87 |
<to> |
|
88 |
<_units> |
|
89 |
<default>m</default> |
|
90 |
<to>m</to> |
|
91 |
<to></to> |
|
74 | 92 |
<value> |
75 |
<_replace> |
|
76 |
<\bca\.?></\bca\.?> |
|
77 |
<value>$minimumElevationInMeters</value> |
|
78 |
</_replace> |
|
79 |
</value> |
|
80 |
</_rangeStart> |
|
81 |
</value> |
|
82 |
</_units> |
|
83 |
</from> |
|
84 |
<to> |
|
85 |
<_units> |
|
86 |
<default>m</default> |
|
87 |
<to>m</to> |
|
88 |
<to></to> |
|
89 |
<value> |
|
90 |
<_alt> |
|
91 |
<1> |
|
92 |
<_replace> |
|
93 |
<\bca\.?></\bca\.?> |
|
94 |
<value>$maximumElevationInMeters</value> |
|
95 |
</_replace> |
|
96 |
</1> |
|
97 |
<2> |
|
98 |
<_rangeEnd> |
|
99 |
<value> |
|
93 |
<_alt> |
|
94 |
<1> |
|
100 | 95 |
<_replace> |
101 | 96 |
<\bca\.?></\bca\.?> |
102 |
<value>$minimumElevationInMeters</value>
|
|
97 |
<value>$maximumElevationInMeters</value>
|
|
103 | 98 |
</_replace> |
104 |
</value> |
|
105 |
</_rangeEnd> |
|
106 |
</2> |
|
107 |
</_alt> |
|
108 |
</value> |
|
109 |
</_units> |
|
110 |
</to> |
|
111 |
</_range> |
|
112 |
</elevationrange> |
|
113 |
<locationdetermination> |
|
114 |
<coordsaccuracy><_noCV><value>$coordinateUncertaintyInMeters</value></_noCV></coordsaccuracy> |
|
115 |
<footprintgeometry_dwc>$footprintWKT</footprintgeometry_dwc> |
|
116 |
<latitude> |
|
117 |
<_alt> |
|
118 |
<1> |
|
119 |
<_nullIf> |
|
120 |
<null>0</null> |
|
121 |
<type>float</type> |
|
122 |
<value>$decimalLatitude</value> |
|
123 |
</_nullIf> |
|
124 |
</1> |
|
125 |
<2> |
|
126 |
<_nullIf> |
|
127 |
<null>0</null> |
|
128 |
<type>float</type> |
|
129 |
<value>$verbatimLatitude</value> |
|
130 |
</_nullIf> |
|
131 |
</2> |
|
132 |
</_alt> |
|
133 |
</latitude> |
|
134 |
<longitude> |
|
135 |
<_alt> |
|
136 |
<1> |
|
137 |
<_nullIf> |
|
138 |
<null>0</null> |
|
139 |
<type>float</type> |
|
140 |
<value>$decimalLongitude</value> |
|
141 |
</_nullIf> |
|
142 |
</1> |
|
143 |
<2> |
|
144 |
<_nullIf> |
|
145 |
<null>0</null> |
|
146 |
<type>float</type> |
|
147 |
<value>$verbatimLongitude</value> |
|
148 |
</_nullIf> |
|
149 |
</2> |
|
150 |
</_alt> |
|
151 |
</longitude> |
|
152 |
<namedplace_id> |
|
153 |
<_simplifyPath> |
|
154 |
<next>parent_id</next> |
|
155 |
<path> |
|
156 |
<namedplace> |
|
157 |
<rank>county</rank> |
|
158 |
<placename>$county</placename> |
|
159 |
<parent_id> |
|
99 |
</1> |
|
100 |
<2> |
|
101 |
<_rangeEnd> |
|
102 |
<value> |
|
103 |
<_replace> |
|
104 |
<\bca\.?></\bca\.?> |
|
105 |
<value>$minimumElevationInMeters</value> |
|
106 |
</_replace> |
|
107 |
</value> |
|
108 |
</_rangeEnd> |
|
109 |
</2> |
|
110 |
</_alt> |
|
111 |
</value> |
|
112 |
</_units> |
|
113 |
</to> |
|
114 |
</_range> |
|
115 |
</elevationrange> |
|
116 |
<locationdetermination> |
|
117 |
<coordsaccuracy><_noCV><value>$coordinateUncertaintyInMeters</value></_noCV></coordsaccuracy> |
|
118 |
<footprintgeometry_dwc>$footprintWKT</footprintgeometry_dwc> |
|
119 |
<latitude> |
|
120 |
<_alt> |
|
121 |
<1> |
|
122 |
<_nullIf> |
|
123 |
<null>0</null> |
|
124 |
<type>float</type> |
|
125 |
<value>$decimalLatitude</value> |
|
126 |
</_nullIf> |
|
127 |
</1> |
|
128 |
<2> |
|
129 |
<_nullIf> |
|
130 |
<null>0</null> |
|
131 |
<type>float</type> |
|
132 |
<value>$verbatimLatitude</value> |
|
133 |
</_nullIf> |
|
134 |
</2> |
|
135 |
</_alt> |
|
136 |
</latitude> |
|
137 |
<longitude> |
|
138 |
<_alt> |
|
139 |
<1> |
|
140 |
<_nullIf> |
|
141 |
<null>0</null> |
|
142 |
<type>float</type> |
|
143 |
<value>$decimalLongitude</value> |
|
144 |
</_nullIf> |
|
145 |
</1> |
|
146 |
<2> |
|
147 |
<_nullIf> |
|
148 |
<null>0</null> |
|
149 |
<type>float</type> |
|
150 |
<value>$verbatimLongitude</value> |
|
151 |
</_nullIf> |
|
152 |
</2> |
|
153 |
</_alt> |
|
154 |
</longitude> |
|
155 |
<namedplace_id> |
|
156 |
<_simplifyPath> |
|
157 |
<next>parent_id</next> |
|
158 |
<path> |
|
160 | 159 |
<namedplace> |
161 |
<rank>stateProvince</rank>
|
|
162 |
<placename>$stateProvince</placename>
|
|
160 |
<rank>county</rank>
|
|
161 |
<placename>$county</placename>
|
|
163 | 162 |
<parent_id> |
164 | 163 |
<namedplace> |
165 |
<rank>country</rank>
|
|
166 |
<placename>$country</placename>
|
|
164 |
<rank>stateProvince</rank>
|
|
165 |
<placename>$stateProvince</placename>
|
|
167 | 166 |
<parent_id> |
168 | 167 |
<namedplace> |
169 |
<rank>continent</rank> |
|
170 |
<placename>$continent</placename> |
|
168 |
<rank>country</rank> |
|
169 |
<placename>$country</placename> |
|
170 |
<parent_id> |
|
171 |
<namedplace> |
|
172 |
<rank>continent</rank> |
|
173 |
<placename>$continent</placename> |
|
174 |
</namedplace> |
|
175 |
</parent_id> |
|
171 | 176 |
</namedplace> |
172 | 177 |
</parent_id> |
173 | 178 |
</namedplace> |
174 | 179 |
</parent_id> |
175 | 180 |
</namedplace> |
176 |
</parent_id> |
|
177 |
</namedplace> |
|
178 |
</path> |
|
179 |
</_simplifyPath> |
|
180 |
</namedplace_id> |
|
181 |
</locationdetermination> |
|
182 |
<locationevent> |
|
183 |
<method_id><method><name>$samplingProtocol</name></method></method_id> |
|
184 |
<obsenddate><_date><date><_dateRangeEnd><value>$eventDate</value></_dateRangeEnd></date></_date></obsenddate> |
|
185 |
<obsstartdate><_date><date><_dateRangeStart><value>$eventDate</value></_dateRangeStart></date></_date></obsstartdate> |
|
186 |
<taxonoccurrence> |
|
187 |
<aggregateoccurrence> |
|
188 |
<count>$individualCount</count> |
|
189 |
<plantobservation> |
|
190 |
<definedvalue fkey="tablerecord_id"> |
|
191 |
<userdefined_id> |
|
192 |
<userdefined> |
|
193 |
<tablename>plantobservation</tablename> |
|
194 |
<userdefinedname>sex</userdefinedname> |
|
195 |
</userdefined> |
|
196 |
</userdefined_id> |
|
197 |
<definedvalue>$sex</definedvalue> |
|
198 |
</definedvalue> |
|
199 |
<specimenreplicate> |
|
200 |
<catalognumber_dwc>$catalogNumber</catalognumber_dwc> |
|
201 |
<collectioncode_dwc> |
|
202 |
<_join> |
|
203 |
<1>$collectionCode</1> |
|
204 |
<2>$collectionID</2> |
|
205 |
</_join> |
|
206 |
</collectioncode_dwc> |
|
207 |
<institution_id><party><organizationname>$institutionCode</organizationname></party></institution_id> |
|
208 |
<sourceaccessioncode>$id</sourceaccessioncode> |
|
209 |
</specimenreplicate> |
|
210 |
</plantobservation> |
|
211 |
</aggregateoccurrence> |
|
212 |
<authortaxoncode>$scientificName</authortaxoncode> |
|
213 |
<taxondetermination> |
|
214 |
<party_id> |
|
215 |
<party> |
|
216 |
<givenname><_namePart><first>$identifiedBy</first></_namePart></givenname> |
|
217 |
<middlename><_namePart><middle>$identifiedBy</middle></_namePart></middlename> |
|
218 |
<surname><_namePart><last>$identifiedBy</last></_namePart></surname> |
|
219 |
</party> |
|
220 |
</party_id> |
|
221 |
<plantconcept_id> |
|
222 |
<plantconcept> |
|
223 |
<plantname_id> |
|
224 |
<_simplifyPath> |
|
225 |
<next>parent_id</next> |
|
226 |
<path> |
|
227 |
<plantname> |
|
228 |
<rank>binomial</rank> |
|
229 |
<plantname>$scientificName</plantname> |
|
230 |
<parent_id> |
|
181 |
</path> |
|
182 |
</_simplifyPath> |
|
183 |
</namedplace_id> |
|
184 |
</locationdetermination> |
|
185 |
<locationevent> |
|
186 |
<method_id><method><name>$samplingProtocol</name></method></method_id> |
|
187 |
<obsenddate><_date><date><_dateRangeEnd><value>$eventDate</value></_dateRangeEnd></date></_date></obsenddate> |
|
188 |
<obsstartdate><_date><date><_dateRangeStart><value>$eventDate</value></_dateRangeStart></date></_date></obsstartdate> |
|
189 |
<taxonoccurrence> |
|
190 |
<aggregateoccurrence> |
|
191 |
<count>$individualCount</count> |
|
192 |
<plantobservation> |
|
193 |
<definedvalue fkey="tablerecord_id"> |
|
194 |
<userdefined_id> |
|
195 |
<userdefined> |
|
196 |
<tablename>plantobservation</tablename> |
|
197 |
<userdefinedname>sex</userdefinedname> |
|
198 |
</userdefined> |
|
199 |
</userdefined_id> |
|
200 |
<definedvalue>$sex</definedvalue> |
|
201 |
</definedvalue> |
|
202 |
<specimenreplicate> |
|
203 |
<catalognumber_dwc>$catalogNumber</catalognumber_dwc> |
|
204 |
<collectioncode_dwc> |
|
205 |
<_join> |
|
206 |
<1>$collectionCode</1> |
|
207 |
<2>$collectionID</2> |
|
208 |
</_join> |
|
209 |
</collectioncode_dwc> |
|
210 |
<institution_id><party><organizationname>$institutionCode</organizationname></party></institution_id> |
|
211 |
<sourceaccessioncode>$id</sourceaccessioncode> |
|
212 |
</specimenreplicate> |
|
213 |
</plantobservation> |
|
214 |
</aggregateoccurrence> |
|
215 |
<authortaxoncode>$scientificName</authortaxoncode> |
|
216 |
<taxondetermination> |
|
217 |
<party_id> |
|
218 |
<party> |
|
219 |
<givenname><_namePart><first>$identifiedBy</first></_namePart></givenname> |
|
220 |
<middlename><_namePart><middle>$identifiedBy</middle></_namePart></middlename> |
|
221 |
<surname><_namePart><last>$identifiedBy</last></_namePart></surname> |
|
222 |
</party> |
|
223 |
</party_id> |
|
224 |
<plantconcept_id> |
|
225 |
<plantconcept> |
|
226 |
<plantname_id> |
|
227 |
<_simplifyPath> |
|
228 |
<next>parent_id</next> |
|
229 |
<path> |
|
231 | 230 |
<plantname> |
232 |
<rank>authority</rank>
|
|
233 |
<plantname>$scientificNameAuthorship</plantname>
|
|
231 |
<rank>binomial</rank>
|
|
232 |
<plantname>$scientificName</plantname> |
|
234 | 233 |
<parent_id> |
235 | 234 |
<plantname> |
236 |
<rank>subspecies</rank> |
|
237 |
<plantname> |
|
238 |
<_name> |
|
239 |
<first>$taxonRank</first> |
|
240 |
<last>$infraspecificEpithet</last> |
|
241 |
</_name> |
|
242 |
</plantname> |
|
235 |
<rank>authority</rank> |
|
236 |
<plantname>$scientificNameAuthorship</plantname> |
|
243 | 237 |
<parent_id> |
244 | 238 |
<plantname> |
245 |
<rank>species</rank> |
|
246 |
<plantname>$specificEpithet</plantname> |
|
239 |
<rank>subspecies</rank> |
|
240 |
<plantname> |
|
241 |
<_name> |
|
242 |
<first>$taxonRank</first> |
|
243 |
<last>$infraspecificEpithet</last> |
|
244 |
</_name> |
|
245 |
</plantname> |
|
247 | 246 |
<parent_id> |
248 | 247 |
<plantname> |
249 |
<rank>genus</rank>
|
|
250 |
<plantname>$genus</plantname>
|
|
248 |
<rank>species</rank>
|
|
249 |
<plantname>$specificEpithet</plantname>
|
|
251 | 250 |
<parent_id> |
252 | 251 |
<plantname> |
253 |
<rank>family</rank>
|
|
254 |
<plantname>$family</plantname>
|
|
252 |
<rank>genus</rank>
|
|
253 |
<plantname>$genus</plantname>
|
|
255 | 254 |
<parent_id> |
256 | 255 |
<plantname> |
257 |
<rank>order</rank>
|
|
258 |
<plantname>$order</plantname>
|
|
256 |
<rank>family</rank>
|
|
257 |
<plantname>$family</plantname>
|
|
259 | 258 |
<parent_id> |
260 | 259 |
<plantname> |
261 |
<rank>class</rank>
|
|
262 |
<plantname>$class</plantname>
|
|
260 |
<rank>order</rank>
|
|
261 |
<plantname>$order</plantname>
|
|
263 | 262 |
<parent_id> |
264 | 263 |
<plantname> |
265 |
<rank>subkingdom</rank>
|
|
266 |
<plantname>$phylum</plantname>
|
|
264 |
<rank>class</rank>
|
|
265 |
<plantname>$class</plantname>
|
|
267 | 266 |
<parent_id> |
268 | 267 |
<plantname> |
269 |
<rank>kingdom</rank> |
|
270 |
<plantname>$kingdom</plantname> |
|
268 |
<rank>subkingdom</rank> |
|
269 |
<plantname>$phylum</plantname> |
|
270 |
<parent_id> |
|
271 |
<plantname> |
|
272 |
<rank>kingdom</rank> |
|
273 |
<plantname>$kingdom</plantname> |
|
274 |
</plantname> |
|
275 |
</parent_id> |
|
271 | 276 |
</plantname> |
272 | 277 |
</parent_id> |
273 | 278 |
</plantname> |
... | ... | |
285 | 290 |
</plantname> |
286 | 291 |
</parent_id> |
287 | 292 |
</plantname> |
288 |
</parent_id>
|
|
289 |
</plantname>
|
|
290 |
</path>
|
|
291 |
</_simplifyPath>
|
|
292 |
</plantname_id>
|
|
293 |
</plantconcept>
|
|
294 |
</plantconcept_id>
|
|
295 |
<determinationdate><_date><date><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></date></_date></determinationdate>
|
|
296 |
<taxonfit>$identificationQualifier</taxonfit>
|
|
297 |
</taxondetermination>
|
|
298 |
<verbatimcollectorname>$recordedBy</verbatimcollectorname>
|
|
299 |
</taxonoccurrence>
|
|
300 |
</locationevent>
|
|
301 |
<locationnarrative>
|
|
302 |
<_merge>
|
|
303 |
<1>$locality</1>
|
|
304 |
<3>
|
|
305 |
<_label>
|
|
306 |
<label>habitat</label>
|
|
307 |
<value>$habitat</value>
|
|
308 |
</_label>
|
|
309 |
</3>
|
|
310 |
</_merge>
|
|
311 |
</locationnarrative>
|
|
312 |
</location>
|
|
293 |
</path>
|
|
294 |
</_simplifyPath>
|
|
295 |
</plantname_id>
|
|
296 |
</plantconcept>
|
|
297 |
</plantconcept_id>
|
|
298 |
<determinationdate><_date><date><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></date></_date></determinationdate>
|
|
299 |
<taxonfit>$identificationQualifier</taxonfit>
|
|
300 |
</taxondetermination>
|
|
301 |
<verbatimcollectorname>$recordedBy</verbatimcollectorname>
|
|
302 |
</taxonoccurrence>
|
|
303 |
</locationevent>
|
|
304 |
<locationnarrative>
|
|
305 |
<_merge>
|
|
306 |
<1>$locality</1>
|
|
307 |
<3>
|
|
308 |
<_label>
|
|
309 |
<label>habitat</label>
|
|
310 |
<value>$habitat</value>
|
|
311 |
</_label>
|
|
312 |
</3>
|
|
313 |
</_merge>
|
|
314 |
</locationnarrative>
|
|
315 |
</location>
|
|
316 |
</path>
|
|
317 |
</_simplifyPath>
|
|
313 | 318 |
</VegBIEN> |
314 | 319 |
Inserted 35 new rows into database |
Also available in: Unified diff
mappings/VegCore-VegBIEN.csv: Added /_simplifyPath:[next=parent_id]/path to root so the returned subplot location will be its parent location if there is no subplot name or ID (indicating that that particular plot did not have subplots). Note that this also causes the parent_id forwarding effect to occur for all other tables containing parent_id, which will help prevent similar issues with subplot events, etc. This will hopefully fix the SALVIAS.plotObservations bug where some organisms did not have a subplot #, causing the subplot location to become NULL and causing the corresponding locationevent rows not to match the locationevent_unique_within_location index filter condition (which requires a parent_id), which caused multiple output table pkeys to be returned for those rows, violating the locationevent_pkeys temp table's primary key.