Revision 6882
Added by Aaron Marcuse-Kubitza almost 12 years ago
inputs/bien2_traits/TraitObservation/VegBIEN.csv | ||
---|---|---|
39 | 39 |
InfraspecificRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_join_words/2/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then", |
40 | 40 |
InfraspecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_join_words/2/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2, |
41 | 41 |
AuthorOfScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_join_words/2/_alt/2/_join_words/2, |
42 |
TraitName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/trait/name, |
|
43 |
Unit,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/trait/units, |
|
44 |
TraitValue,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/trait/value, |
|
45 | 42 |
AuthorOfScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/author, |
46 | 43 |
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family, |
47 | 44 |
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus, |
48 | 45 |
SpecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/specific_epithet, |
49 | 46 |
Taxon,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/taxonname, |
50 | 47 |
InfraspecificRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank, |
48 |
TraitName,/location/locationevent/taxonoccurrence/trait/name, |
|
49 |
Unit,/location/locationevent/taxonoccurrence/trait/units, |
|
50 |
TraitValue,/location/locationevent/taxonoccurrence/trait/value, |
|
51 | 51 |
LocalityDescription,/location/locationnarrative/_merge/2, |
52 | 52 |
VerbatimLatitude,/location/locationplace/*_id/place/*_id/coordinates/verbatimlatitude, |
53 | 53 |
VerbatimLongitude,/location/locationplace/*_id/place/*_id/coordinates/verbatimlongitude, |
inputs/bien2_traits/TraitObservation/test.xml.ref | ||
---|---|---|
159 | 159 |
</2> |
160 | 160 |
</_join_words> |
161 | 161 |
</taxonomicname> |
162 |
<trait> |
|
163 |
<name>$TraitName</name> |
|
164 |
<units>$Unit</units> |
|
165 |
<value>$TraitValue</value> |
|
166 |
</trait> |
|
167 | 162 |
</taxonlabel> |
168 | 163 |
</taxonlabel_id> |
169 | 164 |
<author>$AuthorOfScientificName</author> |
... | ... | |
175 | 170 |
</taxonverbatim> |
176 | 171 |
</taxonverbatim_id> |
177 | 172 |
</taxondetermination> |
173 |
<trait> |
|
174 |
<name>$TraitName</name> |
|
175 |
<units>$Unit</units> |
|
176 |
<value>$TraitValue</value> |
|
177 |
</trait> |
|
178 | 178 |
</taxonoccurrence> |
179 | 179 |
</locationevent> |
180 | 180 |
<locationnarrative>$LocalityDescription</locationnarrative> |
schemas/vegbien.my.sql | ||
---|---|---|
3374 | 3374 |
|
3375 | 3375 |
CREATE TABLE trait ( |
3376 | 3376 |
trait_id int(11) NOT NULL, |
3377 |
taxonlabel_id int(11) NOT NULL,
|
|
3377 |
taxonoccurrence_id int(11) NOT NULL,
|
|
3378 | 3378 |
name varchar(255) NOT NULL, |
3379 | 3379 |
value varchar(255), |
3380 | 3380 |
units varchar(255) |
... | ... | |
6545 | 6545 |
|
6546 | 6546 |
|
6547 | 6547 |
-- |
6548 |
-- Name: trait_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6548 |
-- Name: trait_taxonoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6549 | 6549 |
-- |
6550 | 6550 |
|
6551 | 6551 |
ALTER TABLE trait |
6552 |
ADD CONSTRAINT trait_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6552 |
ADD CONSTRAINT trait_taxonoccurrence_id_fkey FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6553 | 6553 |
|
6554 | 6554 |
|
6555 | 6555 |
-- |
schemas/vegbien.sql | ||
---|---|---|
4471 | 4471 |
|
4472 | 4472 |
CREATE TABLE trait ( |
4473 | 4473 |
trait_id integer NOT NULL, |
4474 |
taxonlabel_id integer NOT NULL,
|
|
4474 |
taxonoccurrence_id integer NOT NULL,
|
|
4475 | 4475 |
name text NOT NULL, |
4476 | 4476 |
value text, |
4477 | 4477 |
units text |
... | ... | |
6589 | 6589 |
-- Name: trait_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: |
6590 | 6590 |
-- |
6591 | 6591 |
|
6592 |
CREATE UNIQUE INDEX trait_unique ON trait USING btree (taxonlabel_id, name, (COALESCE(value, '\N'::text)), (COALESCE(units, '\N'::text)));
|
|
6592 |
CREATE UNIQUE INDEX trait_unique ON trait USING btree (taxonoccurrence_id, name, (COALESCE(value, '\N'::text)), (COALESCE(units, '\N'::text)));
|
|
6593 | 6593 |
|
6594 | 6594 |
|
6595 | 6595 |
-- |
... | ... | |
7705 | 7705 |
|
7706 | 7706 |
|
7707 | 7707 |
-- |
7708 |
-- Name: trait_taxonlabel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
7708 |
-- Name: trait_taxonoccurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
7709 | 7709 |
-- |
7710 | 7710 |
|
7711 | 7711 |
ALTER TABLE ONLY trait |
7712 |
ADD CONSTRAINT trait_taxonlabel_id_fkey FOREIGN KEY (taxonlabel_id) REFERENCES taxonlabel(taxonlabel_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
7712 |
ADD CONSTRAINT trait_taxonoccurrence_id_fkey FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
7713 | 7713 |
|
7714 | 7714 |
|
7715 | 7715 |
-- |
mappings/VegCore-VegBIEN.csv | ||
---|---|---|
275 | 275 |
scientificNameAuthorship,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_join_words/2/_alt/2/_join_words/2, |
276 | 276 |
taxonNameOrEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_join_words/2/_alt/3, |
277 | 277 |
taxonomicStatus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonstatus, |
278 |
measurementType,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/trait/name, |
|
279 |
measurementUnit,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/trait/units, |
|
280 |
measurementValue,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/trait/value, |
|
281 | 278 |
scientificNameAuthorship,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/author, |
282 | 279 |
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/family, |
283 | 280 |
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/genus, |
... | ... | |
346 | 343 |
originalScientificName,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/taxonomicname, |
347 | 344 |
originalTaxonRank,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/verbatimrank, |
348 | 345 |
originalIdentificationQualifier,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/taxonfit, |
346 |
measurementType,/location/locationevent/taxonoccurrence/trait/name, |
|
347 |
measurementUnit,/location/locationevent/taxonoccurrence/trait/units, |
|
348 |
measurementValue,/location/locationevent/taxonoccurrence/trait/value, |
|
349 | 349 |
voucherType,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left", |
350 | 350 |
catalogNumber,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then", |
351 | 351 |
temperature,/location/locationevent/temperature_c, |
mappings/for_review/VegCore-VegBIEN.csv | ||
---|---|---|
275 | 275 |
scientificNameAuthorship,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname, |
276 | 276 |
taxonNameOrEpithet,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname, |
277 | 277 |
taxonomicStatus,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/*_id/taxonlabel/taxonstatus, |
278 |
measurementType,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/*_id/taxonlabel/trait/name, |
|
279 |
measurementUnit,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/*_id/taxonlabel/trait/units, |
|
280 |
measurementValue,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/*_id/taxonlabel/trait/value, |
|
281 | 278 |
scientificNameAuthorship,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/author, |
282 | 279 |
family,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/family, |
283 | 280 |
genus,//taxonoccurrence/taxondetermination[]/*_id/taxonverbatim/genus, |
... | ... | |
346 | 343 |
originalScientificName,//taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/taxonomicname, |
347 | 344 |
originalTaxonRank,//taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/verbatimrank, |
348 | 345 |
originalIdentificationQualifier,//taxonoccurrence/taxondetermination[isoriginal=true]/taxonfit, |
346 |
measurementType,//trait/name, |
|
347 |
measurementUnit,//trait/units, |
|
348 |
measurementValue,//trait/value, |
|
349 | 349 |
voucherType,"//specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/cond", |
350 | 350 |
catalogNumber,"//specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then", |
351 | 351 |
temperature,//locationevent/temperature_c, |
Also available in: Unified diff
schemas/vegbien.sql: Reattached trait to taxonoccurrence instead of taxonlabel, because the TraitObservation traits data is actually associated with a particular occurrence (plant observation complete with location, date, etc.), rather than just a taxon