Revision 10559
Added by Aaron Marcuse-Kubitza over 11 years ago
inputs/bien_web/run | ||
---|---|---|
1 |
#!/bin/bash -e |
|
2 |
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/datasrc_dir.run |
|
0 | 3 |
inputs/bien_web/observation/run | ||
---|---|---|
1 |
#!/bin/bash -e |
|
2 |
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run |
|
0 | 3 |
inputs/bien_web/observation/test.xml.ref | ||
---|---|---|
7 | 7 |
<next>parent_id</next> |
8 | 8 |
<path> |
9 | 9 |
<location> |
10 |
<authorlocationcode>$plotCode</authorlocationcode>
|
|
11 |
<sourceaccessioncode>$plotID</sourceaccessioncode>
|
|
12 |
<area_m2><_ha_to_m2><value>$plotAreaHa</value></_ha_to_m2></area_m2>
|
|
13 |
<elevation_m>$elevation_m</elevation_m>
|
|
10 |
<authorlocationcode>$locationName</authorlocationcode>
|
|
11 |
<sourceaccessioncode>$locationID</sourceaccessioncode>
|
|
12 |
<area_m2><_ha_to_m2><value>$plotArea_ha</value></_ha_to_m2></area_m2>
|
|
13 |
<elevation_m>$elevationInMeters</elevation_m>
|
|
14 | 14 |
<locationevent> |
15 |
<method_id><method><name>$plotMethod</name></method></method_id>
|
|
15 |
<method_id><method><name>$samplingProtocol</name></method></method_id>
|
|
16 | 16 |
<taxonoccurrence> |
17 | 17 |
<aggregateoccurrence> |
18 |
<collectiondate>$observationDate</collectiondate>
|
|
19 |
<cover_fraction><_percent_to_fraction><value>$pctCover</value></_percent_to_fraction></cover_fraction>
|
|
18 |
<collectiondate>$dateCollected</collectiondate>
|
|
19 |
<cover_fraction><_percent_to_fraction><value>$coverPercent</value></_percent_to_fraction></cover_fraction>
|
|
20 | 20 |
<plantobservation> |
21 |
<authorplantcode>$collectionNumber</authorplantcode>
|
|
21 |
<authorplantcode>$collectorNumber</authorplantcode>
|
|
22 | 22 |
<specimenreplicate> |
23 |
<collectionnumber>$collectionNumber</collectionnumber>
|
|
23 |
<collectionnumber>$collectorNumber</collectionnumber>
|
|
24 | 24 |
<institution_id> |
25 | 25 |
<sourcelist> |
26 |
<name>$dataSourceName</name>
|
|
26 |
<name>$specimenHolderInstitutions</name>
|
|
27 | 27 |
<sourcename> |
28 | 28 |
<name> |
29 | 29 |
<_split> |
30 | 30 |
<separator>[,;] *</separator> |
31 |
<value>$dataSourceName</value>
|
|
31 |
<value>$specimenHolderInstitutions</value>
|
|
32 | 32 |
</_split> |
33 | 33 |
</name> |
34 | 34 |
</sourcename> |
35 | 35 |
</sourcelist> |
36 | 36 |
</institution_id> |
37 |
<sourceaccessioncode>$observationID</sourceaccessioncode>
|
|
37 |
<sourceaccessioncode>$occurrenceID</sourceaccessioncode>
|
|
38 | 38 |
</specimenreplicate> |
39 | 39 |
</plantobservation> |
40 | 40 |
</aggregateoccurrence> |
41 |
<authortaxoncode>$collectionNumber</authortaxoncode>
|
|
42 |
<collector_id><party><fullname>$collector</fullname></party></collector_id>
|
|
43 |
<iscultivated>$isCultivated</iscultivated>
|
|
44 |
<sourceaccessioncode>$observationID</sourceaccessioncode>
|
|
41 |
<authortaxoncode>$collectorNumber</authortaxoncode>
|
|
42 |
<collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
|
|
43 |
<iscultivated>$cultivated</iscultivated>
|
|
44 |
<sourceaccessioncode>$occurrenceID</sourceaccessioncode>
|
|
45 | 45 |
<taxondetermination> |
46 | 46 |
<party_id><party><fullname>$identifiedBy</fullname></party></party_id> |
47 | 47 |
<taxonverbatim_id> |
... | ... | |
65 | 65 |
<parent_id> |
66 | 66 |
<taxonlabel> |
67 | 67 |
<rank>species</rank> |
68 |
<taxonepithet>$species</taxonepithet>
|
|
68 |
<taxonepithet>$specificEpithet</taxonepithet>
|
|
69 | 69 |
<parent_id> |
70 | 70 |
<taxonlabel> |
71 | 71 |
<rank>genus</rank> |
... | ... | |
95 | 95 |
<prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix> |
96 | 96 |
<value> |
97 | 97 |
<_alt> |
98 |
<1>$taxon</1>
|
|
98 |
<1>$scientificName</1>
|
|
99 | 99 |
<2> |
100 | 100 |
<_join_words> |
101 | 101 |
<1> |
102 | 102 |
<_join_words> |
103 | 103 |
<2><_filter_genus><value>$genus</value></_filter_genus></2> |
104 |
<3>$species</3>
|
|
104 |
<3>$specificEpithet</3>
|
|
105 | 105 |
</_join_words> |
106 | 106 |
</1> |
107 |
<2>$taxonAuthor</2>
|
|
107 |
<2>$scientificNameAuthorship</2>
|
|
108 | 108 |
</_join_words> |
109 | 109 |
</2> |
110 | 110 |
</_alt> |
... | ... | |
113 | 113 |
</taxonomicname> |
114 | 114 |
</taxonlabel> |
115 | 115 |
</taxonlabel_id> |
116 |
<author>$taxonAuthor</author>
|
|
116 |
<author>$scientificNameAuthorship</author>
|
|
117 | 117 |
<family>$family</family> |
118 | 118 |
<genus>$genus</genus> |
119 |
<specific_epithet>$species</specific_epithet>
|
|
120 |
<taxonomicname>$taxon</taxonomicname>
|
|
119 |
<specific_epithet>$specificEpithet</specific_epithet>
|
|
120 |
<taxonomicname>$scientificName</taxonomicname>
|
|
121 | 121 |
</taxonverbatim> |
122 | 122 |
</taxonverbatim_id> |
123 | 123 |
</taxondetermination> |
124 | 124 |
<trait> |
125 |
<name>$traitName</name>
|
|
126 |
<value>$traitValue</value>
|
|
125 |
<name>$measurementName</name>
|
|
126 |
<value>$measurementValue</value>
|
|
127 | 127 |
</trait> |
128 | 128 |
</taxonoccurrence> |
129 | 129 |
</locationevent> |
... | ... | |
136 | 136 |
<_nullIf> |
137 | 137 |
<null>0</null> |
138 | 138 |
<type>float</type> |
139 |
<value>$latitude</value>
|
|
139 |
<value>$decimalLatitude</value>
|
|
140 | 140 |
</_nullIf> |
141 | 141 |
</latitude_deg> |
142 | 142 |
<longitude_deg> |
143 | 143 |
<_nullIf> |
144 | 144 |
<null>0</null> |
145 | 145 |
<type>float</type> |
146 |
<value>$longitude</value>
|
|
146 |
<value>$decimalLongitude</value>
|
|
147 | 147 |
</_nullIf> |
148 | 148 |
</longitude_deg> |
149 | 149 |
</coordinates> |
150 | 150 |
</coordinates_id> |
151 | 151 |
<country>$country</country> |
152 |
<county>$countyParish</county>
|
|
152 |
<county>$county</county> |
|
153 | 153 |
<matched_place_id> |
154 | 154 |
<place> |
155 | 155 |
<source_id><source><shortname>geoscrub</shortname></source></source_id> |
... | ... | |
160 | 160 |
<_nullIf> |
161 | 161 |
<null>0</null> |
162 | 162 |
<type>float</type> |
163 |
<value>$latitude</value>
|
|
163 |
<value>$decimalLatitude</value>
|
|
164 | 164 |
</_nullIf> |
165 | 165 |
</latitude_deg> |
166 | 166 |
<longitude_deg> |
167 | 167 |
<_nullIf> |
168 | 168 |
<null>0</null> |
169 | 169 |
<type>float</type> |
170 |
<value>$longitude</value>
|
|
170 |
<value>$decimalLongitude</value>
|
|
171 | 171 |
</_nullIf> |
172 | 172 |
</longitude_deg> |
173 | 173 |
</coordinates> |
174 | 174 |
</coordinates_id> |
175 | 175 |
<country>$country</country> |
176 |
<county>$countyParish</county>
|
|
176 |
<county>$county</county> |
|
177 | 177 |
<geovalid> |
178 | 178 |
<_alt> |
179 | 179 |
<2>false</2> |
180 |
<1>$isGeovalid</1>
|
|
180 |
<1>$geovalid</1>
|
|
181 | 181 |
</_alt> |
182 | 182 |
</geovalid> |
183 | 183 |
<stateprovince>$stateProvince</stateprovince> |
inputs/bien_web/observation/VegBIEN.csv | ||
---|---|---|
1 |
bien_web,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments |
|
2 |
observationID,"/_if[@name=""if specimen""]/cond/_exists", |
|
3 |
dataSourceName,"/_if[@name=""if specimen""]/else/source/shortname/_first/1", |
|
4 |
observationType,"/_if[@name=""if specimen""]/else/source:[shortname/_first/2/_env:[name=source]]/observationtype", |
|
5 |
plotCode,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/1", |
|
6 |
plotID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/2/_if[@name=""if locationID""]/cond/_exists", |
|
7 |
observationType,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/cond/_eq:[right=plot]/left", |
|
8 |
observationID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/1", |
|
9 |
observationID,"/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", |
|
10 |
dataSourceName,"/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", |
|
11 |
plotID,"/location/_if[@name=""if subplot""]/else/sourceaccessioncode", |
|
12 |
plotCode,"/location/_if[@name=""if subplot""]/then/parent_id/location/authorlocationcode", |
|
13 |
plotID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode", |
|
14 |
plotAreaHa,/location/area_m2/_ha_to_m2/value, |
|
15 |
elevation_m,/location/elevation_m/_alt/1, |
|
16 |
collectionNumber,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists", |
|
17 |
observationID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists", |
|
18 |
isCultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1", |
|
19 |
plotMethod,/location/locationevent/*_id/method/name, |
|
20 |
plotCode,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode/_if[@name=""if subplot""]/then", |
|
21 |
plotID,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode/_if[@name=""if subplot""]/then", |
|
22 |
observationDate,/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_alt/1, |
|
23 |
pctCover,/location/locationevent/taxonoccurrence/aggregateoccurrence/cover_fraction/_percent_to_fraction/value, |
|
24 |
collectionNumber,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/2, |
|
25 |
collectionNumber,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else", |
|
26 |
observationID,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists", |
|
27 |
dataSourceName,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/name/_first/2", |
|
28 |
dataSourceName,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/name/_first/2/_split:[separator=""[,;] *""]/value", |
|
29 |
observationID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode, |
|
30 |
plotCode,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists", |
|
31 |
plotID,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists", |
|
32 |
collectionNumber,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3", |
|
33 |
taxon,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/2", |
|
34 |
collector,/location/locationevent/taxonoccurrence/collector_id/party/fullname, |
|
35 |
collectionNumber,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists", |
|
36 |
observationID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists", |
|
37 |
isCultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1", |
|
38 |
observationID,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3, |
|
39 |
identifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname, |
|
40 |
species,"/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", |
|
41 |
genus,"/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", |
|
42 |
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", |
|
43 |
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family, |
|
44 |
taxon,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/1, |
|
45 |
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2/_filter_genus/value, |
|
46 |
species,/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, |
|
47 |
taxonAuthor,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/2, |
|
48 |
taxonAuthor,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/author, |
|
49 |
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family, |
|
50 |
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus, |
|
51 |
species,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet, |
|
52 |
taxon,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/taxonomicname, |
|
53 |
traitName,/location/locationevent/taxonoccurrence/trait/name, |
|
54 |
traitValue,/location/locationevent/taxonoccurrence/trait/value, |
|
55 |
collectionNumber,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/then", |
|
56 |
latitude,"/location/locationplace/*_id/place/*_id/coordinates/latitude_deg/_nullIf:[null=0,type=float]/value", |
|
57 |
longitude,"/location/locationplace/*_id/place/*_id/coordinates/longitude_deg/_nullIf:[null=0,type=float]/value", |
|
58 |
country,/location/locationplace/*_id/place/country, |
|
59 |
countyParish,/location/locationplace/*_id/place/county, |
|
60 |
latitude,"/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" |
|
61 |
longitude,"/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" |
|
62 |
country,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/country/_first/2, |
|
63 |
countyParish,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/county/_first/2, |
|
64 |
isGeovalid,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/geovalid/_alt:[2=false]/1/_first/1, |
|
65 |
isValidLatLong,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/geovalid/_alt:[2=false]/1/_first/2/_and/1, |
|
66 |
stateProvince,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/stateprovince/_first/2, |
|
67 |
stateProvince,/location/locationplace/*_id/place/stateprovince, |
|
68 |
plotID,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/cond/_exists", |
|
69 |
plotID,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/then/_if[@name=""if subplot""]/then/_join/1", |
|
70 |
abund,,** No join mapping for *abund ** |
|
71 |
abund1,,** No join mapping for *abund1 ** |
|
72 |
abund10,,** No join mapping for *abund10 ** |
|
73 |
abund2.5,,** No join mapping for *abund2.5 ** |
|
74 |
acceptance,,** No join mapping for *acceptance ** |
|
75 |
bien2_DBPlotID,,** No join mapping for *bien2_DBPlotID ** |
|
76 |
bien2_ObservationID,,** No join mapping for *bien2_ObservationID ** |
|
77 |
bien2_OccurID,,** No join mapping for *bien2_OccurID ** |
|
78 |
bien2_TraitObservationID,,** No join mapping for *bien2_TraitObservationID ** |
|
79 |
bien2_taxonomyID,,** No join mapping for *bien2_taxonomyID ** |
|
80 |
countryError,,** No join mapping for *countryError ** |
|
81 |
dataSourceID,,** No join mapping for *dataSourceID ** |
|
82 |
dataSourceNamePrimary,,** No join mapping for *dataSourceNamePrimary ** |
|
83 |
higherPlantGroup,,** No join mapping for higherPlantGroup ** |
|
84 |
isCultivatedReason,,** No join mapping for cultivatedBasis ** |
|
85 |
isNewWorld,,** No join mapping for isNewWorld ** |
|
86 |
localityDescription,,** No join mapping for *localityDescription ** |
|
87 |
plotMinDbh,,** No join mapping for *plotMinDbh ** |
|
88 |
rank,,** No join mapping for *rank ** |
|
89 |
stateProvinceError,,** No join mapping for *stateProvinceError ** |
|
90 |
taxonAuthorityVerbatim,,** No join mapping for *taxonAuthorityVerbatim ** |
|
91 |
taxonMorphospecies,,** No join mapping for speciesBinomialWithMorphospecies ** |
|
92 |
traitMethod,,** No join mapping for *traitMethod ** |
|
93 |
traitUnit,,** No join mapping for *traitUnit ** |
|
1 |
link ../../../mappings/VegCore-VegBIEN.csv |
|
94 | 2 |
Also available in: Unified diff
inputs/bien_web/: switched to new-style import, using the steps at wiki.vegpath.org/Adding_new-style_import_to_a_datasource