Project

General

Profile

« Previous | Next » 

Revision 8074

inputs/MO/: Renamed Specimen.2/ -> now available Specimen/

View differences:

inputs/MO/Specimen.2/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>MO</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <authorlocationcode>$&#65279;specimenid</authorlocationcode>
11
                        <elevation_m>
12
                            <_avg>
13
                                <1>$minimumelevation</1>
14
                                <2>$maximumelevation</2>
15
                            </_avg>
16
                        </elevation_m>
17
                        <iscultivated><_locationnarrative_is_cultivated><locationnarrative>$locality</locationnarrative></_locationnarrative_is_cultivated></iscultivated>
18
                        <locationevent>
19
                            <taxonoccurrence>
20
                                <aggregateoccurrence>
21
                                    <plantobservation>
22
                                        <authorplantcode>$collectionnumber</authorplantcode>
23
                                        <reproductivecondition>$ecologicalcondition</reproductivecondition>
24
                                        <specimenreplicate>
25
                                            <collectionnumber>$collectionnumber</collectionnumber>
26
                                            <institution_id>
27
                                                <sourcelist>
28
                                                    <name>$acronyms</name>
29
                                                    <sourcename>
30
                                                        <name>
31
                                                            <_split>
32
                                                                <separator>[,;] *</separator>
33
                                                                <value>$acronyms</value>
34
                                                            </_split>
35
                                                        </name>
36
                                                    </sourcename>
37
                                                </sourcelist>
38
                                            </institution_id>
39
                                            <sourceaccessioncode>$&#65279;specimenid</sourceaccessioncode>
40
                                        </specimenreplicate>
41
                                    </plantobservation>
42
                                </aggregateoccurrence>
43
                                <collector_id><party><fullname>$collectorstring</fullname></party></collector_id>
44
                                <iscultivated>$iscultivated</iscultivated>
45
                                <sourceaccessioncode>$&#65279;specimenid</sourceaccessioncode>
46
                                <taxondetermination>
47
                                    <party_id><party><fullname>$determinedby</fullname></party></party_id>
48
                                    <taxonverbatim_id>
49
                                        <taxonverbatim>
50
                                            <taxonlabel_id>
51
                                                <taxonlabel>
52
                                                    <parent_id>
53
                                                        <taxonlabel>
54
                                                            <rank>$rankabbreviation</rank>
55
                                                            <parent_id>
56
                                                                <taxonlabel>
57
                                                                    <rank>cultivar</rank>
58
                                                                    <parent_id>
59
                                                                        <taxonlabel>
60
                                                                            <rank>forma</rank>
61
                                                                            <parent_id>
62
                                                                                <taxonlabel>
63
                                                                                    <rank>variety</rank>
64
                                                                                    <parent_id>
65
                                                                                        <taxonlabel>
66
                                                                                            <rank>subspecies</rank>
67
                                                                                            <parent_id>
68
                                                                                                <taxonlabel>
69
                                                                                                    <rank>species</rank>
70
                                                                                                    <taxonepithet>$speciesnamepart</taxonepithet>
71
                                                                                                    <parent_id>
72
                                                                                                        <taxonlabel>
73
                                                                                                            <rank>genus</rank>
74
                                                                                                            <taxonepithet>$genusnamepart</taxonepithet>
75
                                                                                                            <parent_id>
76
                                                                                                                <taxonlabel>
77
                                                                                                                    <rank>family</rank>
78
                                                                                                                    <taxonepithet>$family</taxonepithet>
79
                                                                                                                </taxonlabel>
80
                                                                                                            </parent_id>
81
                                                                                                        </taxonlabel>
82
                                                                                                    </parent_id>
83
                                                                                                </taxonlabel>
84
                                                                                            </parent_id>
85
                                                                                        </taxonlabel>
86
                                                                                    </parent_id>
87
                                                                                </taxonlabel>
88
                                                                            </parent_id>
89
                                                                        </taxonlabel>
90
                                                                    </parent_id>
91
                                                                </taxonlabel>
92
                                                            </parent_id>
93
                                                            <taxonepithet>$epithet</taxonepithet>
94
                                                        </taxonlabel>
95
                                                    </parent_id>
96
                                                    <rank>$rankabbreviation</rank>
97
                                                    <sourceaccessioncode>$determinationnameid</sourceaccessioncode>
98
                                                    <taxonomicname>
99
                                                        <_merge_prefix>
100
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
101
                                                            <value>
102
                                                                <_alt>
103
                                                                    <1>$fullname</1>
104
                                                                    <2>
105
                                                                        <_alt>
106
                                                                            <1>$name</1>
107
                                                                            <2>
108
                                                                                <_join_words>
109
                                                                                    <2>$genusnamepart</2>
110
                                                                                    <3>$speciesnamepart</3>
111
                                                                                    <5>
112
                                                                                        <_join_words>
113
                                                                                            <1>
114
                                                                                                <_if name="if has infraspecificEpithet">
115
                                                                                                    <cond>$epithet</cond>
116
                                                                                                    <then>$rankabbreviation</then>
117
                                                                                                </_if>
118
                                                                                            </1>
119
                                                                                            <2>$epithet</2>
120
                                                                                        </_join_words>
121
                                                                                    </5>
122
                                                                                </_join_words>
123
                                                                            </2>
124
                                                                        </_alt>
125
                                                                    </2>
126
                                                                </_alt>
127
                                                            </value>
128
                                                        </_merge_prefix>
129
                                                    </taxonomicname>
130
                                                </taxonlabel>
131
                                            </taxonlabel_id>
132
                                            <family>$family</family>
133
                                            <genus>$genusnamepart</genus>
134
                                            <specific_epithet>$speciesnamepart</specific_epithet>
135
                                            <taxonname>$name</taxonname>
136
                                            <taxonomicname>$fullname</taxonomicname>
137
                                            <verbatimrank>$rankabbreviation</verbatimrank>
138
                                        </taxonverbatim>
139
                                    </taxonverbatim_id>
140
                                    <determinationdate>
141
                                        <_date>
142
                                            <year>
143
                                                <_nullIf>
144
                                                    <null>0</null>
145
                                                    <type>float</type>
146
                                                    <value>$determinationyear</value>
147
                                                </_nullIf>
148
                                            </year>
149
                                        </_date>
150
                                    </determinationdate>
151
                                    <taxonfit>$qualifier</taxonfit>
152
                                </taxondetermination>
153
                            </taxonoccurrence>
154
                        </locationevent>
155
                        <locationnarrative>$locality</locationnarrative>
156
                        <locationplace>
157
                            <place_id>
158
                                <place>
159
                                    <coordinates_id>
160
                                        <coordinates>
161
                                            <latitude_deg>
162
                                                <_nullIf>
163
                                                    <null>0</null>
164
                                                    <type>float</type>
165
                                                    <value>$minlatdecdeg</value>
166
                                                </_nullIf>
167
                                            </latitude_deg>
168
                                            <longitude_deg>
169
                                                <_nullIf>
170
                                                    <null>0</null>
171
                                                    <type>float</type>
172
                                                    <value>$minlongdecdeg</value>
173
                                                </_nullIf>
174
                                            </longitude_deg>
175
                                        </coordinates>
176
                                    </coordinates_id>
177
                                    <continent>$continent</continent>
178
                                    <country>$country</country>
179
                                    <county>$lower</county>
180
                                    <matched_place_id>
181
                                        <place>
182
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
183
                                            <coordinates_id>
184
                                                <coordinates>
185
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
186
                                                    <latitude_deg>
187
                                                        <_nullIf>
188
                                                            <null>0</null>
189
                                                            <type>float</type>
190
                                                            <value>$minlatdecdeg</value>
191
                                                        </_nullIf>
192
                                                    </latitude_deg>
193
                                                    <longitude_deg>
194
                                                        <_nullIf>
195
                                                            <null>0</null>
196
                                                            <type>float</type>
197
                                                            <value>$minlongdecdeg</value>
198
                                                        </_nullIf>
199
                                                    </longitude_deg>
200
                                                </coordinates>
201
                                            </coordinates_id>
202
                                            <country>$country</country>
203
                                            <county>$lower</county>
204
                                            <stateprovince>$upper</stateprovince>
205
                                        </place>
206
                                    </matched_place_id>
207
                                    <stateprovince>$upper</stateprovince>
208
                                </place>
209
                            </place_id>
210
                        </locationplace>
211
                        <notespublic>$notes</notespublic>
212
                    </location>
213
                </path>
214
            </_simplifyPath>
215
        </path>
216
    </_setDefault>
217
</VegBIEN>
218
Inserted 39 new rows into database
inputs/MO/Specimen.2/VegBIEN.csv
1
MO,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
specimenid,"/_if[@name=""if specimen""]/cond/_exists",
3
acronyms,"/_if[@name=""if specimen""]/else/source/shortname/_first/1",
4
specimenid,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/1",
5
specimenid,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/1/_if[@name=""if specimen""]/cond/_exists",
6
acronyms,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/1/_if[@name=""if specimen""]/then/_first/2",
7
minimumelevation,/location/elevation_m/_alt/2/_avg/1,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
8
maximumelevation,/location/elevation_m/_alt/2/_avg/2,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
9
collectionnumber,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
10
iscultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/2",
11
locality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1,
12
determinationyear,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/determinationdate/_alt/2/_date/year/_nullIf:[null=0,type=float]/value",
13
qualifier,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit",
14
collectionnumber,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/2,
15
ecologicalcondition,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/reproductivecondition,
16
collectionnumber,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else",
17
specimenid,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
18
acronyms,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/name/_first/2",
19
acronyms,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/name/_first/2/_split:[separator=""[,;] *""]/value",
20
specimenid,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode,
21
collectionnumber,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3",
22
fullname,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/2",
23
name,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/3",
24
collectorstring,/location/locationevent/taxonoccurrence/collector_id/party/fullname,
25
collectionnumber,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
26
specimenid,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
27
iscultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/2",
28
specimenid,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
29
determinedby,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname,
30
rankabbreviation,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
31
speciesnamepart,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
32
genusnamepart,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet",
33
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet",
34
epithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/taxonepithet,
35
rankabbreviation,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/rank,
36
determinationnameid,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/sourceaccessioncode,
37
rankabbreviation,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
38
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family,
39
fullname,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/1,
40
name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/1,
41
genusnamepart,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2,
42
speciesnamepart,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1,
43
epithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
44
rankabbreviation,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
45
epithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2,
46
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family,
47
genusnamepart,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus,
48
speciesnamepart,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet,
49
name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/taxonname,
50
fullname,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/taxonomicname,
51
rankabbreviation,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank,
52
determinationyear,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_alt/2/_date/year/_nullIf:[null=0,type=float]/value",
53
qualifier,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/taxonfit,
54
collectionnumber,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/then",
55
locality,/location/locationnarrative/_merge/1,
56
minlatdecdeg,"/location/locationplace/*_id/place/*_id/coordinates/latitude_deg/_nullIf:[null=0,type=float]/value",
57
minlongdecdeg,"/location/locationplace/*_id/place/*_id/coordinates/longitude_deg/_nullIf:[null=0,type=float]/value",
58
continent,/location/locationplace/*_id/place/continent,
59
country,/location/locationplace/*_id/place/country,
60
lower,/location/locationplace/*_id/place/county,
61
minlatdecdeg,"/location/locationplace/*_id/place/matched_place_id/place:[.,source_id/source/shortname=geoscrub]/*_id/coordinates:[source_id/source/shortname=geoscrub]/_first/2/latitude_deg/_nullIf:[null=0,type=float]/value",""".,"" sorts it with other coordinates mappings"
62
minlongdecdeg,"/location/locationplace/*_id/place/matched_place_id/place:[.,source_id/source/shortname=geoscrub]/*_id/coordinates:[source_id/source/shortname=geoscrub]/_first/2/longitude_deg/_nullIf:[null=0,type=float]/value",""".,"" sorts it with other coordinates mappings"
63
country,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/country/_first/2,
64
lower,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/county/_first/2,
65
upper,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/stateprovince/_first/2,
66
upper,/location/locationplace/*_id/place/stateprovince,
67
notes,/location/notespublic,
68
coord_method,,** No join mapping for georeferenceProtocol ** 
69
description,,** No join mapping for specimenDescription ** 
70
elev_method,,** No join mapping for *elev_method ** 
71
elevationunits,,** No join mapping for *elevationunits ** 
72
minimumday,,** No join mapping for day ** 
73
minimummonth,,** No join mapping for month ** 
74
minimumyear,,** No join mapping for year ** 
inputs/MO/Specimen.2/new_terms.csv
1
specimenid,dataProviderRecordID,,
2
collectorstring,recordedBy,,
3
determinationnameid,scientificNameID,,
4
name,taxonName,,
5
fullname,scientificName,,
6
genusnamepart,genus,,
7
speciesnamepart,specificEpithet,,
8
epithet,infraspecificEpithet,,
9
rankabbreviation,taxonRank,,
10
upper,stateProvince,,
11
lower,county,,
12
minlatdecdeg,decimalLatitude,,
13
minlongdecdeg,decimalLongitude,,
14
minimumday,day,,
15
minimummonth,month,,
16
minimumyear,year,,
17
description,specimenDescription,,
18
acronyms,specimenHolderInstitutions,,
19
determinationyear,yearIdentified,,
20
determinedby,identifiedBy,,
21
qualifier,identificationQualifier,,
22
iscultivated,cultivated,,
23
ecologicalcondition,reproductiveCondition,,
24
coord_method,georeferenceProtocol,,
inputs/MO/Specimen.2/unmapped_terms.csv
1
*elevationunits
2
day
3
month
4
year
5
specimenDescription
6
*elev_method
7
georeferenceProtocol
inputs/MO/Specimen.2/map.csv
1
MO,VegCore,Filter,Comments
2
specimenid,dataProviderRecordID,,
3
collectorstring,recordedBy,,
4
collectionnumber,collectorNumber,,
5
determinationnameid,scientificNameID,,
6
name,taxonName,,
7
fullname,scientificName,,
8
genusnamepart,genus,,
9
speciesnamepart,specificEpithet,,
10
epithet,infraspecificEpithet,,
11
rankabbreviation,taxonRank,,
12
family,family,,
13
continent,continent,,
14
country,country,,
15
upper,stateProvince,,
16
lower,county,,
17
locality,locality,,
18
minimumelevation,minimumElevationInMeters,,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
19
maximumelevation,maximumElevationInMeters,,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
20
elevationunits,*elevationunits,,
21
minlatdecdeg,decimalLatitude,,
22
minlongdecdeg,decimalLongitude,,
23
minimumday,day,,
24
minimummonth,month,,
25
minimumyear,year,,
26
description,specimenDescription,,
27
acronyms,specimenHolderInstitutions,,
28
notes,locationRemarks,,
29
determinationyear,yearIdentified,,
30
determinedby,identifiedBy,,
31
qualifier,identificationQualifier,,
32
iscultivated,cultivated,,
33
ecologicalcondition,reproductiveCondition,,
34
elev_method,*elev_method,,
35
coord_method,georeferenceProtocol,,
inputs/MO/import_order.txt
1 1
Source
2
Specimen.2
2
Specimen
inputs/MO/Specimen/map.csv
1
MO,VegCore,Filter,Comments
2
specimenid,dataProviderRecordID,,
3
collectorstring,recordedBy,,
4
collectionnumber,collectorNumber,,
5
determinationnameid,scientificNameID,,
6
name,taxonName,,
7
fullname,scientificName,,
8
genusnamepart,genus,,
9
speciesnamepart,specificEpithet,,
10
epithet,infraspecificEpithet,,
11
rankabbreviation,taxonRank,,
12
family,family,,
13
continent,continent,,
14
country,country,,
15
upper,stateProvince,,
16
lower,county,,
17
locality,locality,,
18
minimumelevation,minimumElevationInMeters,,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
19
maximumelevation,maximumElevationInMeters,,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
20
elevationunits,*elevationunits,,
21
minlatdecdeg,decimalLatitude,,
22
minlongdecdeg,decimalLongitude,,
23
minimumday,day,,
24
minimummonth,month,,
25
minimumyear,year,,
26
description,specimenDescription,,
27
acronyms,specimenHolderInstitutions,,
28
notes,locationRemarks,,
29
determinationyear,yearIdentified,,
30
determinedby,identifiedBy,,
31
qualifier,identificationQualifier,,
32
iscultivated,cultivated,,
33
ecologicalcondition,reproductiveCondition,,
34
elev_method,*elev_method,,
35
coord_method,georeferenceProtocol,,
inputs/MO/Specimen/VegBIEN.csv
1
MO,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
specimenid,"/_if[@name=""if specimen""]/cond/_exists",
3
acronyms,"/_if[@name=""if specimen""]/else/source/shortname/_first/1",
4
specimenid,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/1",
5
specimenid,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/1/_if[@name=""if specimen""]/cond/_exists",
6
acronyms,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/1/_if[@name=""if specimen""]/then/_first/2",
7
minimumelevation,/location/elevation_m/_alt/2/_avg/1,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
8
maximumelevation,/location/elevation_m/_alt/2/_avg/2,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
9
collectionnumber,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
10
iscultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/2",
11
locality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1,
12
determinationyear,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/determinationdate/_alt/2/_date/year/_nullIf:[null=0,type=float]/value",
13
qualifier,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit",
14
collectionnumber,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/2,
15
ecologicalcondition,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/reproductivecondition,
16
collectionnumber,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else",
17
specimenid,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
18
acronyms,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/name/_first/2",
19
acronyms,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/name/_first/2/_split:[separator=""[,;] *""]/value",
20
specimenid,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode,
21
collectionnumber,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3",
22
fullname,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/2",
23
name,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/3",
24
collectorstring,/location/locationevent/taxonoccurrence/collector_id/party/fullname,
25
collectionnumber,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
26
specimenid,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
27
iscultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/2",
28
specimenid,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
29
determinedby,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname,
30
rankabbreviation,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
31
speciesnamepart,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
32
genusnamepart,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet",
33
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet",
34
epithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/taxonepithet,
35
rankabbreviation,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/rank,
36
determinationnameid,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/sourceaccessioncode,
37
rankabbreviation,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
38
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family,
39
fullname,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/1,
40
name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/1,
41
genusnamepart,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2,
42
speciesnamepart,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1,
43
epithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
44
rankabbreviation,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
45
epithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2,
46
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family,
47
genusnamepart,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus,
48
speciesnamepart,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet,
49
name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/taxonname,
50
fullname,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/taxonomicname,
51
rankabbreviation,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank,
52
determinationyear,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_alt/2/_date/year/_nullIf:[null=0,type=float]/value",
53
qualifier,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/taxonfit,
54
collectionnumber,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/then",
55
locality,/location/locationnarrative/_merge/1,
56
minlatdecdeg,"/location/locationplace/*_id/place/*_id/coordinates/latitude_deg/_nullIf:[null=0,type=float]/value",
57
minlongdecdeg,"/location/locationplace/*_id/place/*_id/coordinates/longitude_deg/_nullIf:[null=0,type=float]/value",
58
continent,/location/locationplace/*_id/place/continent,
59
country,/location/locationplace/*_id/place/country,
60
lower,/location/locationplace/*_id/place/county,
61
minlatdecdeg,"/location/locationplace/*_id/place/matched_place_id/place:[.,source_id/source/shortname=geoscrub]/*_id/coordinates:[source_id/source/shortname=geoscrub]/_first/2/latitude_deg/_nullIf:[null=0,type=float]/value",""".,"" sorts it with other coordinates mappings"
62
minlongdecdeg,"/location/locationplace/*_id/place/matched_place_id/place:[.,source_id/source/shortname=geoscrub]/*_id/coordinates:[source_id/source/shortname=geoscrub]/_first/2/longitude_deg/_nullIf:[null=0,type=float]/value",""".,"" sorts it with other coordinates mappings"
63
country,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/country/_first/2,
64
lower,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/county/_first/2,
65
upper,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/stateprovince/_first/2,
66
upper,/location/locationplace/*_id/place/stateprovince,
67
notes,/location/notespublic,
68
coord_method,,** No join mapping for georeferenceProtocol ** 
69
description,,** No join mapping for specimenDescription ** 
70
elev_method,,** No join mapping for *elev_method ** 
71
elevationunits,,** No join mapping for *elevationunits ** 
72
minimumday,,** No join mapping for day ** 
73
minimummonth,,** No join mapping for month ** 
74
minimumyear,,** No join mapping for year ** 
inputs/MO/Specimen/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>MO</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <authorlocationcode>$&#65279;specimenid</authorlocationcode>
11
                        <elevation_m>
12
                            <_avg>
13
                                <1>$minimumelevation</1>
14
                                <2>$maximumelevation</2>
15
                            </_avg>
16
                        </elevation_m>
17
                        <iscultivated><_locationnarrative_is_cultivated><locationnarrative>$locality</locationnarrative></_locationnarrative_is_cultivated></iscultivated>
18
                        <locationevent>
19
                            <taxonoccurrence>
20
                                <aggregateoccurrence>
21
                                    <plantobservation>
22
                                        <authorplantcode>$collectionnumber</authorplantcode>
23
                                        <reproductivecondition>$ecologicalcondition</reproductivecondition>
24
                                        <specimenreplicate>
25
                                            <collectionnumber>$collectionnumber</collectionnumber>
26
                                            <institution_id>
27
                                                <sourcelist>
28
                                                    <name>$acronyms</name>
29
                                                    <sourcename>
30
                                                        <name>
31
                                                            <_split>
32
                                                                <separator>[,;] *</separator>
33
                                                                <value>$acronyms</value>
34
                                                            </_split>
35
                                                        </name>
36
                                                    </sourcename>
37
                                                </sourcelist>
38
                                            </institution_id>
39
                                            <sourceaccessioncode>$&#65279;specimenid</sourceaccessioncode>
40
                                        </specimenreplicate>
41
                                    </plantobservation>
42
                                </aggregateoccurrence>
43
                                <collector_id><party><fullname>$collectorstring</fullname></party></collector_id>
44
                                <iscultivated>$iscultivated</iscultivated>
45
                                <sourceaccessioncode>$&#65279;specimenid</sourceaccessioncode>
46
                                <taxondetermination>
47
                                    <party_id><party><fullname>$determinedby</fullname></party></party_id>
48
                                    <taxonverbatim_id>
49
                                        <taxonverbatim>
50
                                            <taxonlabel_id>
51
                                                <taxonlabel>
52
                                                    <parent_id>
53
                                                        <taxonlabel>
54
                                                            <rank>$rankabbreviation</rank>
55
                                                            <parent_id>
56
                                                                <taxonlabel>
57
                                                                    <rank>cultivar</rank>
58
                                                                    <parent_id>
59
                                                                        <taxonlabel>
60
                                                                            <rank>forma</rank>
61
                                                                            <parent_id>
62
                                                                                <taxonlabel>
63
                                                                                    <rank>variety</rank>
64
                                                                                    <parent_id>
65
                                                                                        <taxonlabel>
66
                                                                                            <rank>subspecies</rank>
67
                                                                                            <parent_id>
68
                                                                                                <taxonlabel>
69
                                                                                                    <rank>species</rank>
70
                                                                                                    <taxonepithet>$speciesnamepart</taxonepithet>
71
                                                                                                    <parent_id>
72
                                                                                                        <taxonlabel>
73
                                                                                                            <rank>genus</rank>
74
                                                                                                            <taxonepithet>$genusnamepart</taxonepithet>
75
                                                                                                            <parent_id>
76
                                                                                                                <taxonlabel>
77
                                                                                                                    <rank>family</rank>
78
                                                                                                                    <taxonepithet>$family</taxonepithet>
79
                                                                                                                </taxonlabel>
80
                                                                                                            </parent_id>
81
                                                                                                        </taxonlabel>
82
                                                                                                    </parent_id>
83
                                                                                                </taxonlabel>
84
                                                                                            </parent_id>
85
                                                                                        </taxonlabel>
86
                                                                                    </parent_id>
87
                                                                                </taxonlabel>
88
                                                                            </parent_id>
89
                                                                        </taxonlabel>
90
                                                                    </parent_id>
91
                                                                </taxonlabel>
92
                                                            </parent_id>
93
                                                            <taxonepithet>$epithet</taxonepithet>
94
                                                        </taxonlabel>
95
                                                    </parent_id>
96
                                                    <rank>$rankabbreviation</rank>
97
                                                    <sourceaccessioncode>$determinationnameid</sourceaccessioncode>
98
                                                    <taxonomicname>
99
                                                        <_merge_prefix>
100
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
101
                                                            <value>
102
                                                                <_alt>
103
                                                                    <1>$fullname</1>
104
                                                                    <2>
105
                                                                        <_alt>
106
                                                                            <1>$name</1>
107
                                                                            <2>
108
                                                                                <_join_words>
109
                                                                                    <2>$genusnamepart</2>
110
                                                                                    <3>$speciesnamepart</3>
111
                                                                                    <5>
112
                                                                                        <_join_words>
113
                                                                                            <1>
114
                                                                                                <_if name="if has infraspecificEpithet">
115
                                                                                                    <cond>$epithet</cond>
116
                                                                                                    <then>$rankabbreviation</then>
117
                                                                                                </_if>
118
                                                                                            </1>
119
                                                                                            <2>$epithet</2>
120
                                                                                        </_join_words>
121
                                                                                    </5>
122
                                                                                </_join_words>
123
                                                                            </2>
124
                                                                        </_alt>
125
                                                                    </2>
126
                                                                </_alt>
127
                                                            </value>
128
                                                        </_merge_prefix>
129
                                                    </taxonomicname>
130
                                                </taxonlabel>
131
                                            </taxonlabel_id>
132
                                            <family>$family</family>
133
                                            <genus>$genusnamepart</genus>
134
                                            <specific_epithet>$speciesnamepart</specific_epithet>
135
                                            <taxonname>$name</taxonname>
136
                                            <taxonomicname>$fullname</taxonomicname>
137
                                            <verbatimrank>$rankabbreviation</verbatimrank>
138
                                        </taxonverbatim>
139
                                    </taxonverbatim_id>
140
                                    <determinationdate>
141
                                        <_date>
142
                                            <year>
143
                                                <_nullIf>
144
                                                    <null>0</null>
145
                                                    <type>float</type>
146
                                                    <value>$determinationyear</value>
147
                                                </_nullIf>
148
                                            </year>
149
                                        </_date>
150
                                    </determinationdate>
151
                                    <taxonfit>$qualifier</taxonfit>
152
                                </taxondetermination>
153
                            </taxonoccurrence>
154
                        </locationevent>
155
                        <locationnarrative>$locality</locationnarrative>
156
                        <locationplace>
157
                            <place_id>
158
                                <place>
159
                                    <coordinates_id>
160
                                        <coordinates>
161
                                            <latitude_deg>
162
                                                <_nullIf>
163
                                                    <null>0</null>
164
                                                    <type>float</type>
165
                                                    <value>$minlatdecdeg</value>
166
                                                </_nullIf>
167
                                            </latitude_deg>
168
                                            <longitude_deg>
169
                                                <_nullIf>
170
                                                    <null>0</null>
171
                                                    <type>float</type>
172
                                                    <value>$minlongdecdeg</value>
173
                                                </_nullIf>
174
                                            </longitude_deg>
175
                                        </coordinates>
176
                                    </coordinates_id>
177
                                    <continent>$continent</continent>
178
                                    <country>$country</country>
179
                                    <county>$lower</county>
180
                                    <matched_place_id>
181
                                        <place>
182
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
183
                                            <coordinates_id>
184
                                                <coordinates>
185
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
186
                                                    <latitude_deg>
187
                                                        <_nullIf>
188
                                                            <null>0</null>
189
                                                            <type>float</type>
190
                                                            <value>$minlatdecdeg</value>
191
                                                        </_nullIf>
192
                                                    </latitude_deg>
193
                                                    <longitude_deg>
194
                                                        <_nullIf>
195
                                                            <null>0</null>
196
                                                            <type>float</type>
197
                                                            <value>$minlongdecdeg</value>
198
                                                        </_nullIf>
199
                                                    </longitude_deg>
200
                                                </coordinates>
201
                                            </coordinates_id>
202
                                            <country>$country</country>
203
                                            <county>$lower</county>
204
                                            <stateprovince>$upper</stateprovince>
205
                                        </place>
206
                                    </matched_place_id>
207
                                    <stateprovince>$upper</stateprovince>
208
                                </place>
209
                            </place_id>
210
                        </locationplace>
211
                        <notespublic>$notes</notespublic>
212
                    </location>
213
                </path>
214
            </_simplifyPath>
215
        </path>
216
    </_setDefault>
217
</VegBIEN>
218
Inserted 39 new rows into database
inputs/MO/Specimen/new_terms.csv
1
specimenid,dataProviderRecordID,,
2
collectorstring,recordedBy,,
3
determinationnameid,scientificNameID,,
4
name,taxonName,,
5
fullname,scientificName,,
6
genusnamepart,genus,,
7
speciesnamepart,specificEpithet,,
8
epithet,infraspecificEpithet,,
9
rankabbreviation,taxonRank,,
10
upper,stateProvince,,
11
lower,county,,
12
minlatdecdeg,decimalLatitude,,
13
minlongdecdeg,decimalLongitude,,
14
minimumday,day,,
15
minimummonth,month,,
16
minimumyear,year,,
17
description,specimenDescription,,
18
acronyms,specimenHolderInstitutions,,
19
determinationyear,yearIdentified,,
20
determinedby,identifiedBy,,
21
qualifier,identificationQualifier,,
22
iscultivated,cultivated,,
23
ecologicalcondition,reproductiveCondition,,
24
coord_method,georeferenceProtocol,,
inputs/MO/Specimen/unmapped_terms.csv
1
*elevationunits
2
day
3
month
4
year
5
specimenDescription
6
*elev_method
7
georeferenceProtocol

Also available in: Unified diff