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>FIA</shortname></source></value>
5 6
        <path>
6
            <location>
7
                <sourceaccessioncode>$PlotCD</sourceaccessioncode>
8
                <locationevent>
9
                    <taxonoccurrence>
10
                        <aggregateoccurrence>
11
                            <collectiondate>
12
                                <_date>
13
                                    <day>
14
                                        <_nullIf>
15
                                            <null>0</null>
16
                                            <type>float</type>
17
                                            <value>$MeasDay</value>
18
                                        </_nullIf>
19
                                    </day>
20
                                    <month>
21
                                        <_nullIf>
22
                                            <null>0</null>
23
                                            <type>float</type>
24
                                            <value>$MeasMon</value>
25
                                        </_nullIf>
26
                                    </month>
27
                                    <year>
28
                                        <_nullIf>
29
                                            <null>0</null>
30
                                            <type>float</type>
31
                                            <value>$MeasYear</value>
32
                                        </_nullIf>
33
                                    </year>
34
                                </_date>
35
                            </collectiondate>
36
                            <plantobservation>
37
                                <stemobservation>
38
                                    <basaldiameter_m>$BasalDiameter</basaldiameter_m>
39
                                    <diameterbreastheight_m><_in_to_m><value>$DBH</value></_in_to_m></diameterbreastheight_m>
40
                                    <height_m><_ft_to_m><value>$Height</value></_ft_to_m></height_m>
41
                                    <tag>$TreeTag</tag>
42
                                </stemobservation>
43
                            </plantobservation>
44
                        </aggregateoccurrence>
45
                        <authortaxoncode>$TreeTag</authortaxoncode>
46
                        <taxondetermination>
47
                            <taxonverbatim_id>
48
                                <taxonverbatim>
49
                                    <taxonlabel_id>
50
                                        <taxonlabel>
51
                                            <matched_label_id>
7
            <_simplifyPath>
8
                <next>parent_id</next>
9
                <path>
10
                    <location>
11
                        <sourceaccessioncode>$PlotCD</sourceaccessioncode>
12
                        <locationevent>
13
                            <taxonoccurrence>
14
                                <aggregateoccurrence>
15
                                    <collectiondate>
16
                                        <_date>
17
                                            <day>
18
                                                <_nullIf>
19
                                                    <null>0</null>
20
                                                    <type>float</type>
21
                                                    <value>$MeasDay</value>
22
                                                </_nullIf>
23
                                            </day>
24
                                            <month>
25
                                                <_nullIf>
26
                                                    <null>0</null>
27
                                                    <type>float</type>
28
                                                    <value>$MeasMon</value>
29
                                                </_nullIf>
30
                                            </month>
31
                                            <year>
32
                                                <_nullIf>
33
                                                    <null>0</null>
34
                                                    <type>float</type>
35
                                                    <value>$MeasYear</value>
36
                                                </_nullIf>
37
                                            </year>
38
                                        </_date>
39
                                    </collectiondate>
40
                                    <plantobservation>
41
                                        <stemobservation>
42
                                            <basaldiameter_m>$BasalDiameter</basaldiameter_m>
43
                                            <diameterbreastheight_m><_in_to_m><value>$DBH</value></_in_to_m></diameterbreastheight_m>
44
                                            <height_m><_ft_to_m><value>$Height</value></_ft_to_m></height_m>
45
                                            <tag>$TreeTag</tag>
46
                                        </stemobservation>
47
                                    </plantobservation>
48
                                </aggregateoccurrence>
49
                                <authortaxoncode>$TreeTag</authortaxoncode>
50
                                <taxondetermination>
51
                                    <taxonverbatim_id>
52
                                        <taxonverbatim>
53
                                            <taxonlabel_id>
52 54
                                                <taxonlabel>
53
                                                    <source_id><source><shortname>TNRS</shortname></source></source_id>
54
                                                    <taxonomicname>
55
                                                        <_join_words>
56
                                                            <2>$Genus</2>
57
                                                            <3>$SpecificEpithet</3>
58
                                                        </_join_words>
59
                                                    </taxonomicname>
60
                                                </taxonlabel>
61
                                            </matched_label_id>
62
                                            <parent_id>
63
                                                <taxonlabel>
55
                                                    <matched_label_id>
56
                                                        <taxonlabel>
57
                                                            <source_id><source><shortname>TNRS</shortname></source></source_id>
58
                                                            <taxonomicname>
59
                                                                <_join_words>
60
                                                                    <2>$Genus</2>
61
                                                                    <3>$SpecificEpithet</3>
62
                                                                </_join_words>
63
                                                            </taxonomicname>
64
                                                        </taxonlabel>
65
                                                    </matched_label_id>
64 66
                                                    <parent_id>
65 67
                                                        <taxonlabel>
66
                                                            <rank>cultivar</rank>
67 68
                                                            <parent_id>
68 69
                                                                <taxonlabel>
69
                                                                    <rank>forma</rank>
70
                                                                    <rank>cultivar</rank>
70 71
                                                                    <parent_id>
71 72
                                                                        <taxonlabel>
72
                                                                            <rank>variety</rank>
73
                                                                            <rank>forma</rank>
73 74
                                                                            <parent_id>
74 75
                                                                                <taxonlabel>
75
                                                                                    <rank>subspecies</rank>
76
                                                                                    <rank>variety</rank>
76 77
                                                                                    <parent_id>
77 78
                                                                                        <taxonlabel>
78
                                                                                            <rank>species</rank>
79
                                                                                            <taxonepithet>$SpecificEpithet</taxonepithet>
79
                                                                                            <rank>subspecies</rank>
80 80
                                                                                            <parent_id>
81 81
                                                                                                <taxonlabel>
82
                                                                                                    <rank>genus</rank>
83
                                                                                                    <taxonepithet>$Genus</taxonepithet>
82
                                                                                                    <rank>species</rank>
83
                                                                                                    <taxonepithet>$SpecificEpithet</taxonepithet>
84
                                                                                                    <parent_id>
85
                                                                                                        <taxonlabel>
86
                                                                                                            <rank>genus</rank>
87
                                                                                                            <taxonepithet>$Genus</taxonepithet>
88
                                                                                                        </taxonlabel>
89
                                                                                                    </parent_id>
84 90
                                                                                                </taxonlabel>
85 91
                                                                                            </parent_id>
86 92
                                                                                        </taxonlabel>
......
93 99
                                                            </parent_id>
94 100
                                                        </taxonlabel>
95 101
                                                    </parent_id>
102
                                                    <taxonomicname>
103
                                                        <_join_words>
104
                                                            <2>$Genus</2>
105
                                                            <3>$SpecificEpithet</3>
106
                                                        </_join_words>
107
                                                    </taxonomicname>
96 108
                                                </taxonlabel>
97
                                            </parent_id>
98
                                            <taxonomicname>
99
                                                <_join_words>
100
                                                    <2>$Genus</2>
101
                                                    <3>$SpecificEpithet</3>
102
                                                </_join_words>
103
                                            </taxonomicname>
104
                                        </taxonlabel>
105
                                    </taxonlabel_id>
106
                                    <genus>$Genus</genus>
107
                                    <specific_epithet>$SpecificEpithet</specific_epithet>
108
                                </taxonverbatim>
109
                            </taxonverbatim_id>
110
                        </taxondetermination>
111
                    </taxonoccurrence>
112
                </locationevent>
113
                <locationplace>
114
                    <place_id>
115
                        <place>
116
                            <coordinates_id>
117
                                <coordinates>
118
                                    <latitude_deg>
119
                                        <_nullIf>
120
                                            <null>0</null>
121
                                            <type>float</type>
122
                                            <value>$DecimalLatitude</value>
123
                                        </_nullIf>
124
                                    </latitude_deg>
125
                                    <longitude_deg>
126
                                        <_nullIf>
127
                                            <null>0</null>
128
                                            <type>float</type>
129
                                            <value>$DecimalLongitude</value>
130
                                        </_nullIf>
131
                                    </longitude_deg>
132
                                </coordinates>
133
                            </coordinates_id>
134
                            <county>$County</county>
135
                            <matched_place_id>
109
                                            </taxonlabel_id>
110
                                            <genus>$Genus</genus>
111
                                            <specific_epithet>$SpecificEpithet</specific_epithet>
112
                                        </taxonverbatim>
113
                                    </taxonverbatim_id>
114
                                </taxondetermination>
115
                            </taxonoccurrence>
116
                        </locationevent>
117
                        <locationplace>
118
                            <place_id>
136 119
                                <place>
137
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
138 120
                                    <coordinates_id>
139 121
                                        <coordinates>
140
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
141 122
                                            <latitude_deg>
142 123
                                                <_nullIf>
143 124
                                                    <null>0</null>
......
155 136
                                        </coordinates>
156 137
                                    </coordinates_id>
157 138
                                    <county>$County</county>
139
                                    <matched_place_id>
140
                                        <place>
141
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
142
                                            <coordinates_id>
143
                                                <coordinates>
144
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
145
                                                    <latitude_deg>
146
                                                        <_nullIf>
147
                                                            <null>0</null>
148
                                                            <type>float</type>
149
                                                            <value>$DecimalLatitude</value>
150
                                                        </_nullIf>
151
                                                    </latitude_deg>
152
                                                    <longitude_deg>
153
                                                        <_nullIf>
154
                                                            <null>0</null>
155
                                                            <type>float</type>
156
                                                            <value>$DecimalLongitude</value>
157
                                                        </_nullIf>
158
                                                    </longitude_deg>
159
                                                </coordinates>
160
                                            </coordinates_id>
161
                                            <county>$County</county>
162
                                            <stateprovince>$StateProvince</stateprovince>
163
                                        </place>
164
                                    </matched_place_id>
158 165
                                    <stateprovince>$StateProvince</stateprovince>
159 166
                                </place>
160
                            </matched_place_id>
161
                            <stateprovince>$StateProvince</stateprovince>
162
                        </place>
163
                    </place_id>
164
                </locationplace>
165
            </location>
167
                            </place_id>
168
                        </locationplace>
169
                    </location>
170
                </path>
171
            </_simplifyPath>
166 172
        </path>
167
    </_simplifyPath>
173
    </_setDefault>
168 174
</VegBIEN>
169 175
Inserted 25 new rows into database

Also available in: Unified diff