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
        <parent_id>
3
    <_simplifyPath id="-1">
4
        <next>parent_id</next>
5
        <path>
5 6
            <location>
6
                <authorlocationcode>$Inventory name</authorlocationcode>
7
                <sourceaccessioncode>$Inventory code</sourceaccessioncode>
8
            </location>
9
        </parent_id>
10
        <authorlocationcode>$Number of subplot</authorlocationcode>
11
        <locationevent>
12
            <project_id><project><projectname>$Expedition</projectname></project></project_id>
13
            <taxonoccurrence>
14
                <aggregateoccurrence>
15
                    <notes>$Observations</notes>
16
                    <plantobservation>
17
                        <collectionnumber>$Tree number</collectionnumber>
18
                        <specimenreplicate><catalognumber_dwc>$Specimen</catalognumber_dwc></specimenreplicate>
19
                        <stemobservation>
20
                            <authorstemcode>$Trunk</authorstemcode>
21
                            <definedvalue fkey="tablerecord_id">
22
                                <userdefined_id>
23
                                    <userdefined>
24
                                        <tablename>stemobservation</tablename>
25
                                        <userdefinedname>lianaInfestation</userdefinedname>
26
                                    </userdefined>
27
                                </userdefined_id>
28
                                <definedvalue>$Liana presence</definedvalue>
29
                            </definedvalue>
30
                            <diameterbreastheight>$Diameter</diameterbreastheight>
31
                            <height>$Total height</height>
32
                            <stemtag>
33
                                <iscurrent>true</iscurrent>
34
                                <tag>$Tag number</tag>
35
                            </stemtag>
36
                            <xposition>$Subplot X</xposition>
37
                            <yposition>$Subplot Y</yposition>
38
                        </stemobservation>
39
                    </plantobservation>
40
                </aggregateoccurrence>
41
                <authortaxoncode>
42
                    <_alt>
43
                        <1>$Tree number</1>
44
                        <2>$Specie+autor</2>
45
                    </_alt>
46
                </authortaxoncode>
47
                <growthform>
48
                    <_map>
49
                        <T>tree</T>
50
                        <Arbol>tree</Arbol>
51
                        <palm>tree</palm>
52
                        <H>hemiepiphyte</H>
53
                        <Hemiepífito>hemiepiphyte</Hemiepífito>
54
                        <L>liana</L>
55
                        <l>liana</l>
56
                        <L?>liana</L?>
57
                        <Liana>liana</Liana>
58
                        <E>epiphyte</E>
59
                        <S>shrub</S>
60
                        <Hb>herb</Hb>
61
                        <vine-herbaceous>vine</vine-herbaceous>
62
                        <graminoid>grass</graminoid>
63
                        <rosette>forb</rosette>
64
                        <*>*</*>
65
                        <value>$Habit</value>
66
                    </_map>
67
                </growthform>
68
                <taxondetermination>
69
                    <party_id>
70
                        <party>
71
                            <givenname><_namePart><first>$Determined by</first></_namePart></givenname>
72
                            <middlename><_namePart><middle>$Determined by</middle></_namePart></middlename>
73
                            <surname><_namePart><last>$Determined by</last></_namePart></surname>
74
                        </party>
75
                    </party_id>
76
                    <plantconcept_id>
77
                        <plantconcept>
78
                            <plantname_id>
79
                                <_simplifyPath>
80
                                    <next>parent_id</next>
81
                                    <path>
82
                                        <plantname>
83
                                            <rank>binomial</rank>
84
                                            <plantname>$Specie+autor</plantname>
85
                                            <parent_id>
7
                <parent_id>
8
                    <location>
9
                        <authorlocationcode>$Inventory name</authorlocationcode>
10
                        <sourceaccessioncode>$Inventory code</sourceaccessioncode>
11
                    </location>
12
                </parent_id>
13
                <authorlocationcode>$Number of subplot</authorlocationcode>
14
                <locationevent>
15
                    <project_id><project><projectname>$Expedition</projectname></project></project_id>
16
                    <taxonoccurrence>
17
                        <aggregateoccurrence>
18
                            <notes>$Observations</notes>
19
                            <plantobservation>
20
                                <collectionnumber>$Tree number</collectionnumber>
21
                                <specimenreplicate><catalognumber_dwc>$Specimen</catalognumber_dwc></specimenreplicate>
22
                                <stemobservation>
23
                                    <authorstemcode>$Trunk</authorstemcode>
24
                                    <definedvalue fkey="tablerecord_id">
25
                                        <userdefined_id>
26
                                            <userdefined>
27
                                                <tablename>stemobservation</tablename>
28
                                                <userdefinedname>lianaInfestation</userdefinedname>
29
                                            </userdefined>
30
                                        </userdefined_id>
31
                                        <definedvalue>$Liana presence</definedvalue>
32
                                    </definedvalue>
33
                                    <diameterbreastheight>$Diameter</diameterbreastheight>
34
                                    <height>$Total height</height>
35
                                    <stemtag>
36
                                        <iscurrent>true</iscurrent>
37
                                        <tag>$Tag number</tag>
38
                                    </stemtag>
39
                                    <xposition>$Subplot X</xposition>
40
                                    <yposition>$Subplot Y</yposition>
41
                                </stemobservation>
42
                            </plantobservation>
43
                        </aggregateoccurrence>
44
                        <authortaxoncode>
45
                            <_alt>
46
                                <1>$Tree number</1>
47
                                <2>$Specie+autor</2>
48
                            </_alt>
49
                        </authortaxoncode>
50
                        <growthform>
51
                            <_map>
52
                                <T>tree</T>
53
                                <Arbol>tree</Arbol>
54
                                <palm>tree</palm>
55
                                <H>hemiepiphyte</H>
56
                                <Hemiepífito>hemiepiphyte</Hemiepífito>
57
                                <L>liana</L>
58
                                <l>liana</l>
59
                                <L?>liana</L?>
60
                                <Liana>liana</Liana>
61
                                <E>epiphyte</E>
62
                                <S>shrub</S>
63
                                <Hb>herb</Hb>
64
                                <vine-herbaceous>vine</vine-herbaceous>
65
                                <graminoid>grass</graminoid>
66
                                <rosette>forb</rosette>
67
                                <*>*</*>
68
                                <value>$Habit</value>
69
                            </_map>
70
                        </growthform>
71
                        <taxondetermination>
72
                            <party_id>
73
                                <party>
74
                                    <givenname><_namePart><first>$Determined by</first></_namePart></givenname>
75
                                    <middlename><_namePart><middle>$Determined by</middle></_namePart></middlename>
76
                                    <surname><_namePart><last>$Determined by</last></_namePart></surname>
77
                                </party>
78
                            </party_id>
79
                            <plantconcept_id>
80
                                <plantconcept>
81
                                    <plantname_id>
82
                                        <_simplifyPath>
83
                                            <next>parent_id</next>
84
                                            <path>
86 85
                                                <plantname>
87
                                                    <rank>authority</rank>
88
                                                    <plantname>$Autor (revised)</plantname>
86
                                                    <rank>binomial</rank>
87
                                                    <plantname>$Specie+autor</plantname>
89 88
                                                    <parent_id>
90 89
                                                        <plantname>
91
                                                            <rank>subspecies</rank>
90
                                                            <rank>authority</rank>
91
                                                            <plantname>$Autor (revised)</plantname>
92 92
                                                            <parent_id>
93 93
                                                                <plantname>
94
                                                                    <rank>species</rank>
95
                                                                    <plantname>$Specific epithet</plantname>
94
                                                                    <rank>subspecies</rank>
96 95
                                                                    <parent_id>
97 96
                                                                        <plantname>
98
                                                                            <rank>genus</rank>
99
                                                                            <plantname>$Genera</plantname>
97
                                                                            <rank>species</rank>
98
                                                                            <plantname>$Specific epithet</plantname>
100 99
                                                                            <parent_id>
101 100
                                                                                <plantname>
102
                                                                                    <rank>family</rank>
103
                                                                                    <plantname>$Family (revised)</plantname>
101
                                                                                    <rank>genus</rank>
102
                                                                                    <plantname>$Genera</plantname>
103
                                                                                    <parent_id>
104
                                                                                        <plantname>
105
                                                                                            <rank>family</rank>
106
                                                                                            <plantname>$Family (revised)</plantname>
107
                                                                                        </plantname>
108
                                                                                    </parent_id>
104 109
                                                                                </plantname>
105 110
                                                                            </parent_id>
106 111
                                                                        </plantname>
......
110 115
                                                        </plantname>
111 116
                                                    </parent_id>
112 117
                                                </plantname>
113
                                            </parent_id>
114
                                        </plantname>
115
                                    </path>
116
                                </_simplifyPath>
117
                            </plantname_id>
118
                        </plantconcept>
119
                    </plantconcept_id>
120
                    <taxonfit>$Qualifier</taxonfit>
121
                </taxondetermination>
122
                <taxondetermination>
123
                    <isoriginal>true</isoriginal>
124
                    <plantconcept_id>
125
                        <plantconcept>
126
                            <plantname_id>
127
                                <_simplifyPath>
128
                                    <next>parent_id</next>
129
                                    <path>
130
                                        <plantname>
131
                                            <rank>binomial</rank>
132
                                            <parent_id>
118
                                            </path>
119
                                        </_simplifyPath>
120
                                    </plantname_id>
121
                                </plantconcept>
122
                            </plantconcept_id>
123
                            <taxonfit>$Qualifier</taxonfit>
124
                        </taxondetermination>
125
                        <taxondetermination>
126
                            <isoriginal>true</isoriginal>
127
                            <plantconcept_id>
128
                                <plantconcept>
129
                                    <plantname_id>
130
                                        <_simplifyPath>
131
                                            <next>parent_id</next>
132
                                            <path>
133 133
                                                <plantname>
134
                                                    <rank>authority</rank>
134
                                                    <rank>binomial</rank>
135 135
                                                    <parent_id>
136 136
                                                        <plantname>
137
                                                            <rank>subspecies</rank>
137
                                                            <rank>authority</rank>
138 138
                                                            <parent_id>
139 139
                                                                <plantname>
140
                                                                    <rank>species</rank>
140
                                                                    <rank>subspecies</rank>
141 141
                                                                    <parent_id>
142 142
                                                                        <plantname>
143
                                                                            <rank>genus</rank>
144
                                                                            <plantname>$Field name</plantname>
143
                                                                            <rank>species</rank>
145 144
                                                                            <parent_id>
146 145
                                                                                <plantname>
147
                                                                                    <rank>family</rank>
148
                                                                                    <plantname>$Field family</plantname>
146
                                                                                    <rank>genus</rank>
147
                                                                                    <plantname>$Field name</plantname>
148
                                                                                    <parent_id>
149
                                                                                        <plantname>
150
                                                                                            <rank>family</rank>
151
                                                                                            <plantname>$Field family</plantname>
152
                                                                                        </plantname>
153
                                                                                    </parent_id>
149 154
                                                                                </plantname>
150 155
                                                                            </parent_id>
151 156
                                                                        </plantname>
......
155 160
                                                        </plantname>
156 161
                                                    </parent_id>
157 162
                                                </plantname>
158
                                            </parent_id>
159
                                        </plantname>
160
                                    </path>
161
                                </_simplifyPath>
162
                            </plantname_id>
163
                        </plantconcept>
164
                    </plantconcept_id>
165
                </taxondetermination>
166
                <verbatimcollectorname>$Index collector</verbatimcollectorname>
167
            </taxonoccurrence>
168
        </locationevent>
169
    </location>
163
                                            </path>
164
                                        </_simplifyPath>
165
                                    </plantname_id>
166
                                </plantconcept>
167
                            </plantconcept_id>
168
                        </taxondetermination>
169
                        <verbatimcollectorname>$Index collector</verbatimcollectorname>
170
                    </taxonoccurrence>
171
                </locationevent>
172
            </location>
173
        </path>
174
    </_simplifyPath>
170 175
</VegBIEN>
171 176
Inserted 40 new rows into database

Also available in: Unified diff