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 |
<parent_id> |
|
3 |
<_simplifyPath id="-1"> |
|
4 |
<next>parent_id</next> |
|
5 |
<path> |
|
5 | 6 |
<location> |
6 |
<authorlocationcode>$PlotCode</authorlocationcode> |
|
7 |
<sourceaccessioncode>$PlotID</sourceaccessioncode> |
|
8 |
</location> |
|
9 |
</parent_id> |
|
10 |
<authorlocationcode>$Line</authorlocationcode> |
|
11 |
<locationevent> |
|
12 |
<obsenddate><_date><date><_dateRangeEnd><value>$census_date</value></_dateRangeEnd></date></_date></obsenddate> |
|
13 |
<obsstartdate><_date><date><_dateRangeStart><value>$census_date</value></_dateRangeStart></date></_date></obsstartdate> |
|
14 |
<taxonoccurrence> |
|
15 |
<aggregateoccurrence> |
|
16 |
<count>$NoInd</count> |
|
17 |
<cover>$cover_percent</cover> |
|
18 |
<definedvalue fkey="tablerecord_id"> |
|
19 |
<userdefined_id> |
|
20 |
<userdefined> |
|
21 |
<tablename>aggregateoccurrence</tablename> |
|
22 |
<userdefinedname>censusNo</userdefinedname> |
|
23 |
</userdefined> |
|
24 |
</userdefined_id> |
|
25 |
<definedvalue>$census_no</definedvalue> |
|
26 |
</definedvalue> |
|
27 |
<linecover>$intercept_cm</linecover> |
|
28 |
<notes>$Notes</notes> |
|
29 |
<plantobservation> |
|
30 |
<collectionnumber>$Ind</collectionnumber> |
|
31 |
<sourceaccessioncode>$PlotObsID</sourceaccessioncode> |
|
32 |
<specimenreplicate> |
|
33 |
<catalognumber_dwc> |
|
34 |
<_if name="if indirect voucher"> |
|
35 |
<cond> |
|
36 |
<_eq> |
|
37 |
<right>indirect</right> |
|
38 |
<left>$DetType</left> |
|
39 |
</_eq> |
|
40 |
</cond> |
|
41 |
<else> |
|
42 |
<_alt> |
|
43 |
<1>$coll_number</1> |
|
44 |
<2>$SourceVoucher</2> |
|
45 |
</_alt> |
|
46 |
</else> |
|
47 |
</_if> |
|
48 |
</catalognumber_dwc> |
|
49 |
</specimenreplicate> |
|
50 |
<stemobservation> |
|
7 |
<parent_id> |
|
8 |
<location> |
|
9 |
<authorlocationcode>$PlotCode</authorlocationcode> |
|
10 |
<sourceaccessioncode>$PlotID</sourceaccessioncode> |
|
11 |
</location> |
|
12 |
</parent_id> |
|
13 |
<authorlocationcode>$Line</authorlocationcode> |
|
14 |
<locationevent> |
|
15 |
<obsenddate><_date><date><_dateRangeEnd><value>$census_date</value></_dateRangeEnd></date></_date></obsenddate> |
|
16 |
<obsstartdate><_date><date><_dateRangeStart><value>$census_date</value></_dateRangeStart></date></_date></obsstartdate> |
|
17 |
<taxonoccurrence> |
|
18 |
<aggregateoccurrence> |
|
19 |
<count>$NoInd</count> |
|
20 |
<cover>$cover_percent</cover> |
|
51 | 21 |
<definedvalue fkey="tablerecord_id"> |
52 | 22 |
<userdefined_id> |
53 | 23 |
<userdefined> |
54 |
<tablename>stemobservation</tablename>
|
|
55 |
<userdefinedname>canopyForm</userdefinedname>
|
|
24 |
<tablename>aggregateoccurrence</tablename>
|
|
25 |
<userdefinedname>censusNo</userdefinedname>
|
|
56 | 26 |
</userdefined> |
57 | 27 |
</userdefined_id> |
58 |
<definedvalue>$canopy_form</definedvalue>
|
|
28 |
<definedvalue>$census_no</definedvalue>
|
|
59 | 29 |
</definedvalue> |
60 |
<definedvalue fkey="tablerecord_id"> |
|
61 |
<userdefined_id> |
|
62 |
<userdefined> |
|
63 |
<tablename>stemobservation</tablename> |
|
64 |
<userdefinedname>canopyPosition</userdefinedname> |
|
65 |
</userdefined> |
|
66 |
</userdefined_id> |
|
67 |
<definedvalue>$canopy_position</definedvalue> |
|
68 |
</definedvalue> |
|
69 |
<definedvalue fkey="tablerecord_id"> |
|
70 |
<userdefined_id> |
|
71 |
<userdefined> |
|
72 |
<tablename>stemobservation</tablename> |
|
73 |
<userdefinedname>lianaInfestation</userdefinedname> |
|
74 |
</userdefined> |
|
75 |
</userdefined_id> |
|
76 |
<definedvalue>$liana_infestation</definedvalue> |
|
77 |
</definedvalue> |
|
78 |
<diameterbreastheight>$temp_dbh</diameterbreastheight> |
|
79 |
<height>$height_m</height> |
|
80 |
<heightfirstbranch>$ht_first_branch_m</heightfirstbranch> |
|
81 |
<stemtag> |
|
82 |
<iscurrent> |
|
83 |
<_alt> |
|
84 |
<2>true</2> |
|
85 |
<1>false</1> |
|
86 |
</_alt> |
|
87 |
</iscurrent> |
|
88 |
<tag>$tag1</tag> |
|
89 |
</stemtag> |
|
90 |
<stemtag> |
|
91 |
<iscurrent>true</iscurrent> |
|
92 |
<tag>$tag2</tag> |
|
93 |
</stemtag> |
|
94 |
<xposition>$x_position</xposition> |
|
95 |
<yposition>$y_position</yposition> |
|
96 |
</stemobservation> |
|
97 |
</plantobservation> |
|
98 |
</aggregateoccurrence> |
|
99 |
<authortaxoncode>$Ind</authortaxoncode> |
|
100 |
<growthform> |
|
101 |
<_map> |
|
102 |
<T>tree</T> |
|
103 |
<Arbol>tree</Arbol> |
|
104 |
<palm>tree</palm> |
|
105 |
<H>hemiepiphyte</H> |
|
106 |
<Hemiepífito>hemiepiphyte</Hemiepífito> |
|
107 |
<L>liana</L> |
|
108 |
<l>liana</l> |
|
109 |
<L?>liana</L?> |
|
110 |
<Liana>liana</Liana> |
|
111 |
<E>epiphyte</E> |
|
112 |
<S>shrub</S> |
|
113 |
<Hb>herb</Hb> |
|
114 |
<vine-herbaceous>vine</vine-herbaceous> |
|
115 |
<graminoid>grass</graminoid> |
|
116 |
<rosette>forb</rosette> |
|
117 |
<*>*</*> |
|
118 |
<value>$Habit</value> |
|
119 |
</_map> |
|
120 |
</growthform> |
|
121 |
<sourceaccessioncode>$PlotObsID</sourceaccessioncode> |
|
122 |
<taxondetermination> |
|
123 |
<plantconcept_id> |
|
124 |
<plantconcept> |
|
125 |
<plantname_id> |
|
126 |
<_simplifyPath> |
|
127 |
<next>parent_id</next> |
|
128 |
<path> |
|
129 |
<plantname> |
|
130 |
<rank>binomial</rank> |
|
131 |
<parent_id> |
|
30 |
<linecover>$intercept_cm</linecover> |
|
31 |
<notes>$Notes</notes> |
|
32 |
<plantobservation> |
|
33 |
<collectionnumber>$Ind</collectionnumber> |
|
34 |
<sourceaccessioncode>$PlotObsID</sourceaccessioncode> |
|
35 |
<specimenreplicate> |
|
36 |
<catalognumber_dwc> |
|
37 |
<_if name="if indirect voucher"> |
|
38 |
<cond> |
|
39 |
<_eq> |
|
40 |
<right>indirect</right> |
|
41 |
<left>$DetType</left> |
|
42 |
</_eq> |
|
43 |
</cond> |
|
44 |
<else> |
|
45 |
<_alt> |
|
46 |
<1>$coll_number</1> |
|
47 |
<2>$SourceVoucher</2> |
|
48 |
</_alt> |
|
49 |
</else> |
|
50 |
</_if> |
|
51 |
</catalognumber_dwc> |
|
52 |
</specimenreplicate> |
|
53 |
<stemobservation> |
|
54 |
<definedvalue fkey="tablerecord_id"> |
|
55 |
<userdefined_id> |
|
56 |
<userdefined> |
|
57 |
<tablename>stemobservation</tablename> |
|
58 |
<userdefinedname>canopyForm</userdefinedname> |
|
59 |
</userdefined> |
|
60 |
</userdefined_id> |
|
61 |
<definedvalue>$canopy_form</definedvalue> |
|
62 |
</definedvalue> |
|
63 |
<definedvalue fkey="tablerecord_id"> |
|
64 |
<userdefined_id> |
|
65 |
<userdefined> |
|
66 |
<tablename>stemobservation</tablename> |
|
67 |
<userdefinedname>canopyPosition</userdefinedname> |
|
68 |
</userdefined> |
|
69 |
</userdefined_id> |
|
70 |
<definedvalue>$canopy_position</definedvalue> |
|
71 |
</definedvalue> |
|
72 |
<definedvalue fkey="tablerecord_id"> |
|
73 |
<userdefined_id> |
|
74 |
<userdefined> |
|
75 |
<tablename>stemobservation</tablename> |
|
76 |
<userdefinedname>lianaInfestation</userdefinedname> |
|
77 |
</userdefined> |
|
78 |
</userdefined_id> |
|
79 |
<definedvalue>$liana_infestation</definedvalue> |
|
80 |
</definedvalue> |
|
81 |
<diameterbreastheight>$temp_dbh</diameterbreastheight> |
|
82 |
<height>$height_m</height> |
|
83 |
<heightfirstbranch>$ht_first_branch_m</heightfirstbranch> |
|
84 |
<stemtag> |
|
85 |
<iscurrent> |
|
86 |
<_alt> |
|
87 |
<2>true</2> |
|
88 |
<1>false</1> |
|
89 |
</_alt> |
|
90 |
</iscurrent> |
|
91 |
<tag>$tag1</tag> |
|
92 |
</stemtag> |
|
93 |
<stemtag> |
|
94 |
<iscurrent>true</iscurrent> |
|
95 |
<tag>$tag2</tag> |
|
96 |
</stemtag> |
|
97 |
<xposition>$x_position</xposition> |
|
98 |
<yposition>$y_position</yposition> |
|
99 |
</stemobservation> |
|
100 |
</plantobservation> |
|
101 |
</aggregateoccurrence> |
|
102 |
<authortaxoncode>$Ind</authortaxoncode> |
|
103 |
<growthform> |
|
104 |
<_map> |
|
105 |
<T>tree</T> |
|
106 |
<Arbol>tree</Arbol> |
|
107 |
<palm>tree</palm> |
|
108 |
<H>hemiepiphyte</H> |
|
109 |
<Hemiepífito>hemiepiphyte</Hemiepífito> |
|
110 |
<L>liana</L> |
|
111 |
<l>liana</l> |
|
112 |
<L?>liana</L?> |
|
113 |
<Liana>liana</Liana> |
|
114 |
<E>epiphyte</E> |
|
115 |
<S>shrub</S> |
|
116 |
<Hb>herb</Hb> |
|
117 |
<vine-herbaceous>vine</vine-herbaceous> |
|
118 |
<graminoid>grass</graminoid> |
|
119 |
<rosette>forb</rosette> |
|
120 |
<*>*</*> |
|
121 |
<value>$Habit</value> |
|
122 |
</_map> |
|
123 |
</growthform> |
|
124 |
<sourceaccessioncode>$PlotObsID</sourceaccessioncode> |
|
125 |
<taxondetermination> |
|
126 |
<plantconcept_id> |
|
127 |
<plantconcept> |
|
128 |
<plantname_id> |
|
129 |
<_simplifyPath> |
|
130 |
<next>parent_id</next> |
|
131 |
<path> |
|
132 | 132 |
<plantname> |
133 |
<rank>authority</rank> |
|
134 |
<plantname>$auth</plantname> |
|
133 |
<rank>binomial</rank> |
|
135 | 134 |
<parent_id> |
136 | 135 |
<plantname> |
137 |
<rank>subspecies</rank> |
|
138 |
<plantname> |
|
139 |
<_name> |
|
140 |
<first>$infra_rank_1</first> |
|
141 |
<last>$infra_ep_1</last> |
|
142 |
</_name> |
|
143 |
</plantname> |
|
136 |
<rank>authority</rank> |
|
137 |
<plantname>$auth</plantname> |
|
144 | 138 |
<parent_id> |
145 | 139 |
<plantname> |
146 |
<rank>species</rank> |
|
147 |
<plantname>$Species</plantname> |
|
140 |
<rank>subspecies</rank> |
|
141 |
<plantname> |
|
142 |
<_name> |
|
143 |
<first>$infra_rank_1</first> |
|
144 |
<last>$infra_ep_1</last> |
|
145 |
</_name> |
|
146 |
</plantname> |
|
148 | 147 |
<parent_id> |
149 | 148 |
<plantname> |
150 |
<rank>genus</rank>
|
|
151 |
<plantname>$Genus</plantname>
|
|
149 |
<rank>species</rank>
|
|
150 |
<plantname>$Species</plantname>
|
|
152 | 151 |
<parent_id> |
153 | 152 |
<plantname> |
154 |
<rank>family</rank> |
|
155 |
<plantname>$Family</plantname> |
|
153 |
<rank>genus</rank> |
|
154 |
<plantname>$Genus</plantname> |
|
155 |
<parent_id> |
|
156 |
<plantname> |
|
157 |
<rank>family</rank> |
|
158 |
<plantname>$Family</plantname> |
|
159 |
</plantname> |
|
160 |
</parent_id> |
|
156 | 161 |
</plantname> |
157 | 162 |
</parent_id> |
158 | 163 |
</plantname> |
... | ... | |
162 | 167 |
</plantname> |
163 | 168 |
</parent_id> |
164 | 169 |
</plantname> |
165 |
</parent_id> |
|
166 |
</plantname> |
|
167 |
</path> |
|
168 |
</_simplifyPath> |
|
169 |
</plantname_id> |
|
170 |
</plantconcept> |
|
171 |
</plantconcept_id> |
|
172 |
<taxonfit>$cfaff</taxonfit> |
|
173 |
</taxondetermination> |
|
174 |
<taxondetermination> |
|
175 |
<isoriginal>true</isoriginal> |
|
176 |
<plantconcept_id> |
|
177 |
<plantconcept> |
|
178 |
<plantname_id> |
|
179 |
<_simplifyPath> |
|
180 |
<next>parent_id</next> |
|
181 |
<path> |
|
182 |
<plantname> |
|
183 |
<rank>binomial</rank> |
|
184 |
<parent_id> |
|
170 |
</path> |
|
171 |
</_simplifyPath> |
|
172 |
</plantname_id> |
|
173 |
</plantconcept> |
|
174 |
</plantconcept_id> |
|
175 |
<taxonfit>$cfaff</taxonfit> |
|
176 |
</taxondetermination> |
|
177 |
<taxondetermination> |
|
178 |
<isoriginal>true</isoriginal> |
|
179 |
<plantconcept_id> |
|
180 |
<plantconcept> |
|
181 |
<plantname_id> |
|
182 |
<_simplifyPath> |
|
183 |
<next>parent_id</next> |
|
184 |
<path> |
|
185 | 185 |
<plantname> |
186 |
<rank>authority</rank>
|
|
186 |
<rank>binomial</rank>
|
|
187 | 187 |
<parent_id> |
188 | 188 |
<plantname> |
189 |
<rank>subspecies</rank>
|
|
189 |
<rank>authority</rank>
|
|
190 | 190 |
<parent_id> |
191 | 191 |
<plantname> |
192 |
<rank>species</rank> |
|
193 |
<plantname>$OrigSpecies</plantname> |
|
192 |
<rank>subspecies</rank> |
|
194 | 193 |
<parent_id> |
195 | 194 |
<plantname> |
196 |
<rank>genus</rank>
|
|
197 |
<plantname>$OrigGenus</plantname>
|
|
195 |
<rank>species</rank>
|
|
196 |
<plantname>$OrigSpecies</plantname>
|
|
198 | 197 |
<parent_id> |
199 | 198 |
<plantname> |
200 |
<rank>family</rank> |
|
201 |
<plantname>$OrigFamily</plantname> |
|
199 |
<rank>genus</rank> |
|
200 |
<plantname>$OrigGenus</plantname> |
|
201 |
<parent_id> |
|
202 |
<plantname> |
|
203 |
<rank>family</rank> |
|
204 |
<plantname>$OrigFamily</plantname> |
|
205 |
</plantname> |
|
206 |
</parent_id> |
|
202 | 207 |
</plantname> |
203 | 208 |
</parent_id> |
204 | 209 |
</plantname> |
... | ... | |
208 | 213 |
</plantname> |
209 | 214 |
</parent_id> |
210 | 215 |
</plantname> |
211 |
</parent_id>
|
|
212 |
</plantname>
|
|
213 |
</path>
|
|
214 |
</_simplifyPath>
|
|
215 |
</plantname_id>
|
|
216 |
</plantconcept>
|
|
217 |
</plantconcept_id>
|
|
218 |
</taxondetermination>
|
|
219 |
<verbatimcollectorname>
|
|
220 |
<_name>
|
|
221 |
<first>$coll_firstname</first>
|
|
222 |
<last>$coll_lastname</last>
|
|
223 |
</_name>
|
|
224 |
</verbatimcollectorname>
|
|
225 |
<voucher>
|
|
226 |
<specimenreplicate_id>
|
|
227 |
<specimenreplicate>
|
|
228 |
<catalognumber_dwc>
|
|
229 |
<_if name="if indirect voucher">
|
|
230 |
<cond>
|
|
231 |
<_eq>
|
|
232 |
<right>indirect</right>
|
|
233 |
<left>$DetType</left>
|
|
234 |
</_eq>
|
|
235 |
</cond>
|
|
236 |
<then>
|
|
237 |
<_alt>
|
|
238 |
<1>$coll_number</1>
|
|
239 |
<2>$SourceVoucher</2>
|
|
240 |
</_alt>
|
|
241 |
</then>
|
|
242 |
</_if>
|
|
243 |
</catalognumber_dwc>
|
|
244 |
</specimenreplicate>
|
|
245 |
</specimenreplicate_id>
|
|
246 |
</voucher>
|
|
247 |
</taxonoccurrence>
|
|
248 |
</locationevent>
|
|
249 |
</location>
|
|
216 |
</path>
|
|
217 |
</_simplifyPath>
|
|
218 |
</plantname_id>
|
|
219 |
</plantconcept>
|
|
220 |
</plantconcept_id>
|
|
221 |
</taxondetermination>
|
|
222 |
<verbatimcollectorname>
|
|
223 |
<_name>
|
|
224 |
<first>$coll_firstname</first>
|
|
225 |
<last>$coll_lastname</last>
|
|
226 |
</_name>
|
|
227 |
</verbatimcollectorname>
|
|
228 |
<voucher>
|
|
229 |
<specimenreplicate_id>
|
|
230 |
<specimenreplicate>
|
|
231 |
<catalognumber_dwc>
|
|
232 |
<_if name="if indirect voucher">
|
|
233 |
<cond>
|
|
234 |
<_eq>
|
|
235 |
<right>indirect</right>
|
|
236 |
<left>$DetType</left>
|
|
237 |
</_eq>
|
|
238 |
</cond>
|
|
239 |
<then>
|
|
240 |
<_alt>
|
|
241 |
<1>$coll_number</1>
|
|
242 |
<2>$SourceVoucher</2>
|
|
243 |
</_alt>
|
|
244 |
</then>
|
|
245 |
</_if>
|
|
246 |
</catalognumber_dwc>
|
|
247 |
</specimenreplicate>
|
|
248 |
</specimenreplicate_id>
|
|
249 |
</voucher>
|
|
250 |
</taxonoccurrence>
|
|
251 |
</locationevent>
|
|
252 |
</location>
|
|
253 |
</path>
|
|
254 |
</_simplifyPath>
|
|
250 | 255 |
</VegBIEN> |
251 | 256 |
Inserted 42 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.