Project

General

Profile

« Previous | Next » 

Revision 4621

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.

View differences:

test.xml.ref
1 1
Put template:
2 2
<VegBIEN>
3
    <location id="-1">
4
        <authorlocationcode>$Inventory name</authorlocationcode>
5
        <sourceaccessioncode>$Inventory code</sourceaccessioncode>
6
        <area>$Area</area>
7
        <elevation>
8
            <_alt>
9
                <1>
10
                    <_replace>
11
                        <\bca\.?></\bca\.?>
12
                        <value>$Altitude</value>
13
                    </_replace>
14
                </1>
15
                <2>
16
                    <_avg>
17
                        <min>
3
    <_simplifyPath id="-1">
4
        <next>parent_id</next>
5
        <path>
6
            <location>
7
                <authorlocationcode>$Inventory name</authorlocationcode>
8
                <sourceaccessioncode>$Inventory code</sourceaccessioncode>
9
                <area>$Area</area>
10
                <elevation>
11
                    <_alt>
12
                        <1>
13
                            <_replace>
14
                                <\bca\.?></\bca\.?>
15
                                <value>$Altitude</value>
16
                            </_replace>
17
                        </1>
18
                        <2>
19
                            <_avg>
20
                                <min>
21
                                    <_units>
22
                                        <default>m</default>
23
                                        <to>m</to>
24
                                        <to></to>
25
                                        <value>
26
                                            <_rangeStart>
27
                                                <value>
28
                                                    <_replace>
29
                                                        <\bca\.?></\bca\.?>
30
                                                        <value>$Minimum altitude</value>
31
                                                    </_replace>
32
                                                </value>
33
                                            </_rangeStart>
34
                                        </value>
35
                                    </_units>
36
                                </min>
37
                            </_avg>
38
                        </2>
39
                    </_alt>
40
                </elevation>
41
                <elevationrange>
42
                    <_range>
43
                        <from>
18 44
                            <_units>
19 45
                                <default>m</default>
20 46
                                <to>m</to>
......
30 56
                                    </_rangeStart>
31 57
                                </value>
32 58
                            </_units>
33
                        </min>
34
                    </_avg>
35
                </2>
36
            </_alt>
37
        </elevation>
38
        <elevationrange>
39
            <_range>
40
                <from>
41
                    <_units>
42
                        <default>m</default>
43
                        <to>m</to>
44
                        <to></to>
45
                        <value>
46
                            <_rangeStart>
59
                        </from>
60
                        <to>
61
                            <_units>
62
                                <default>m</default>
63
                                <to>m</to>
64
                                <to></to>
47 65
                                <value>
48
                                    <_replace>
49
                                        <\bca\.?></\bca\.?>
50
                                        <value>$Minimum altitude</value>
51
                                    </_replace>
66
                                    <_rangeEnd>
67
                                        <value>
68
                                            <_replace>
69
                                                <\bca\.?></\bca\.?>
70
                                                <value>$Minimum altitude</value>
71
                                            </_replace>
72
                                        </value>
73
                                    </_rangeEnd>
52 74
                                </value>
53
                            </_rangeStart>
54
                        </value>
55
                    </_units>
56
                </from>
57
                <to>
58
                    <_units>
59
                        <default>m</default>
60
                        <to>m</to>
61
                        <to></to>
75
                            </_units>
76
                        </to>
77
                    </_range>
78
                </elevationrange>
79
                <landform>$Topographical situation</landform>
80
                <locationdetermination>
81
                    <latitude>
82
                        <_alt>
83
                            <1>
84
                                <_nullIf>
85
                                    <null>0</null>
86
                                    <type>float</type>
87
                                    <value>$Latitude</value>
88
                                </_nullIf>
89
                            </1>
90
                            <2>
91
                                <_nullIf>
92
                                    <null>0</null>
93
                                    <type>float</type>
94
                                    <value>$Latitude (DMS)</value>
95
                                </_nullIf>
96
                            </2>
97
                        </_alt>
98
                    </latitude>
99
                    <longitude>
100
                        <_alt>
101
                            <1>
102
                                <_nullIf>
103
                                    <null>0</null>
104
                                    <type>float</type>
105
                                    <value>$Longitude</value>
106
                                </_nullIf>
107
                            </1>
108
                            <2>
109
                                <_nullIf>
110
                                    <null>0</null>
111
                                    <type>float</type>
112
                                    <value>$Longitude (DMS)</value>
113
                                </_nullIf>
114
                            </2>
115
                        </_alt>
116
                    </longitude>
117
                </locationdetermination>
118
                <locationevent>
119
                    <project_id>
120
                        <project>
121
                            <projectname>$Expedition name</projectname>
122
                            <sourceaccessioncode>$Expedition number</sourceaccessioncode>
123
                        </project>
124
                    </project_id>
125
                    <commclass>
126
                        <commdetermination>
127
                            <commconcept_id>
128
                                <commconcept>
129
                                    <commname_id><commname><commname>$Vegetation type</commname></commname></commname_id>
130
                                    <commdescription>$Locality description</commdescription>
131
                                </commconcept>
132
                            </commconcept_id>
133
                        </commdetermination>
134
                    </commclass>
135
                    <obsenddate><_date><date><_dateRangeEnd><value>$First evaluation</value></_dateRangeEnd></date></_date></obsenddate>
136
                    <obsstartdate><_date><date><_dateRangeStart><value>$First evaluation</value></_dateRangeStart></date></_date></obsstartdate>
137
                    <soilobs>
138
                        <acidity>$Acidez intercambiable (ISRIC 11&#8211;cmolc/Kg&#8211;0.05)</acidity>
139
                        <calcium>$Calcio intercambiable (WSP S-5,10&#8211;cmolc/Kg&#8211;0.016)</calcium>
140
                        <carbon>$Carb&#243;n Org&#225;nico (WSP S-9,10&#8211;%&#8211;0.06)</carbon>
141
                        <cationexchangecapacity>$CIC (ISRIC 11&#8211;cmolc/Kg&#8211;0.05)</cationexchangecapacity>
142
                        <clay>$Arcilla (DIN 18 123&#8211;%&#8211;1)</clay>
143
                        <conductivity>$Conductividad electrica (ASPT 6&#8211;&#181;S/cm&#8211; 1 - 10000)</conductivity>
144
                        <magnesium>$Magnesio intercambiable (WSP S-5,10&#8211;cmolc/Kg&#8211;0.00083)</magnesium>
145
                        <nitrogen>$Nitr&#243;geno total (ISRIC 6&#8211;%&#8211;0.0014)</nitrogen>
146
                        <organic>$Materia Org&#225;nica (WSP S-9,10&#8211;%&#8211;0.1)</organic>
147
                        <ph>$pH acuoso (ISRIC 4&#8211;&#8211; 1 - 14)</ph>
148
                        <phosphorus>$F&#243;sforo disponible (ISRIC 14-2&#8211;mg/Kg&#8211;1.5)</phosphorus>
149
                        <potassium>$Potasio intercambiable (WSP S-5,10&#8211;cmolc/Kg&#8211;0.0053)</potassium>
150
                        <sand>$Arena (DIN 18 123&#8211;%&#8211;2.5)</sand>
151
                        <silt>$Limo (DIN 18 123&#8211;%&#8211;1)</silt>
152
                        <sodium>$Sodio intercambiable (WSP S-5,10&#8211;cmolc/Kg&#8211;0.00083)</sodium>
153
                        <texture>$Textural class</texture>
154
                    </soilobs>
155
                </locationevent>
156
                <locationnarrative>$Locality</locationnarrative>
157
                <notespublic>$Observaciones</notespublic>
158
                <slopeaspect>
159
                    <_compass>
62 160
                        <value>
63
                            <_rangeEnd>
64
                                <value>
65
                                    <_replace>
66
                                        <\bca\.?></\bca\.?>
67
                                        <value>$Minimum altitude</value>
68
                                    </_replace>
69
                                </value>
70
                            </_rangeEnd>
161
                            <_alt>
162
                                <1>$Direction</1>
163
                                <2>$Orientaci&#243;n/exposicion</2>
164
                            </_alt>
71 165
                        </value>
72
                    </_units>
73
                </to>
74
            </_range>
75
        </elevationrange>
76
        <landform>$Topographical situation</landform>
77
        <locationdetermination>
78
            <latitude>
79
                <_alt>
80
                    <1>
81
                        <_nullIf>
82
                            <null>0</null>
83
                            <type>float</type>
84
                            <value>$Latitude</value>
85
                        </_nullIf>
86
                    </1>
87
                    <2>
88
                        <_nullIf>
89
                            <null>0</null>
90
                            <type>float</type>
91
                            <value>$Latitude (DMS)</value>
92
                        </_nullIf>
93
                    </2>
94
                </_alt>
95
            </latitude>
96
            <longitude>
97
                <_alt>
98
                    <1>
99
                        <_nullIf>
100
                            <null>0</null>
101
                            <type>float</type>
102
                            <value>$Longitude</value>
103
                        </_nullIf>
104
                    </1>
105
                    <2>
106
                        <_nullIf>
107
                            <null>0</null>
108
                            <type>float</type>
109
                            <value>$Longitude (DMS)</value>
110
                        </_nullIf>
111
                    </2>
112
                </_alt>
113
            </longitude>
114
        </locationdetermination>
115
        <locationevent>
116
            <project_id>
117
                <project>
118
                    <projectname>$Expedition name</projectname>
119
                    <sourceaccessioncode>$Expedition number</sourceaccessioncode>
120
                </project>
121
            </project_id>
122
            <commclass>
123
                <commdetermination>
124
                    <commconcept_id>
125
                        <commconcept>
126
                            <commname_id><commname><commname>$Vegetation type</commname></commname></commname_id>
127
                            <commdescription>$Locality description</commdescription>
128
                        </commconcept>
129
                    </commconcept_id>
130
                </commdetermination>
131
            </commclass>
132
            <obsenddate><_date><date><_dateRangeEnd><value>$First evaluation</value></_dateRangeEnd></date></_date></obsenddate>
133
            <obsstartdate><_date><date><_dateRangeStart><value>$First evaluation</value></_dateRangeStart></date></_date></obsstartdate>
134
            <soilobs>
135
                <acidity>$Acidez intercambiable (ISRIC 11&#8211;cmolc/Kg&#8211;0.05)</acidity>
136
                <calcium>$Calcio intercambiable (WSP S-5,10&#8211;cmolc/Kg&#8211;0.016)</calcium>
137
                <carbon>$Carb&#243;n Org&#225;nico (WSP S-9,10&#8211;%&#8211;0.06)</carbon>
138
                <cationexchangecapacity>$CIC (ISRIC 11&#8211;cmolc/Kg&#8211;0.05)</cationexchangecapacity>
139
                <clay>$Arcilla (DIN 18 123&#8211;%&#8211;1)</clay>
140
                <conductivity>$Conductividad electrica (ASPT 6&#8211;&#181;S/cm&#8211; 1 - 10000)</conductivity>
141
                <magnesium>$Magnesio intercambiable (WSP S-5,10&#8211;cmolc/Kg&#8211;0.00083)</magnesium>
142
                <nitrogen>$Nitr&#243;geno total (ISRIC 6&#8211;%&#8211;0.0014)</nitrogen>
143
                <organic>$Materia Org&#225;nica (WSP S-9,10&#8211;%&#8211;0.1)</organic>
144
                <ph>$pH acuoso (ISRIC 4&#8211;&#8211; 1 - 14)</ph>
145
                <phosphorus>$F&#243;sforo disponible (ISRIC 14-2&#8211;mg/Kg&#8211;1.5)</phosphorus>
146
                <potassium>$Potasio intercambiable (WSP S-5,10&#8211;cmolc/Kg&#8211;0.0053)</potassium>
147
                <sand>$Arena (DIN 18 123&#8211;%&#8211;2.5)</sand>
148
                <silt>$Limo (DIN 18 123&#8211;%&#8211;1)</silt>
149
                <sodium>$Sodio intercambiable (WSP S-5,10&#8211;cmolc/Kg&#8211;0.00083)</sodium>
150
                <texture>$Textural class</texture>
151
            </soilobs>
152
        </locationevent>
153
        <locationnarrative>$Locality</locationnarrative>
154
        <notespublic>$Observaciones</notespublic>
155
        <slopeaspect>
156
            <_compass>
157
                <value>
158
                    <_alt>
159
                        <1>$Direction</1>
160
                        <2>$Orientaci&#243;n/exposicion</2>
161
                    </_alt>
162
                </value>
163
            </_compass>
164
        </slopeaspect>
165
        <slopegradient>$Slope</slopegradient>
166
    </location>
166
                    </_compass>
167
                </slopeaspect>
168
                <slopegradient>$Slope</slopegradient>
169
            </location>
170
        </path>
171
    </_simplifyPath>
167 172
</VegBIEN>
168 173
Inserted 19 new rows into database

Also available in: Unified diff