Revision 1053
Added by Aaron Marcuse-Kubitza almost 13 years ago
inputs/NYBG/test/import.specimens.out.ref | ||
---|---|---|
1 |
Inserted 80 new rows into database |
|
1 |
Inserted 79 new rows into database |
inputs/NYBG/test/VegBIEN.specimens.xml.ref | ||
---|---|---|
129 | 129 |
<description>plant fungus: with rough brown bark, almost no buttressing, 1 m diam; fallen fruit and leaves</description> |
130 | 130 |
<museum_id><party><organizationname>NY Herbarium</organizationname></party></museum_id> |
131 | 131 |
<collectioncode_dwc>Herbarium</collectioncode_dwc> |
132 |
<reference_id><reference><shortname>NYBG</shortname></reference></reference_id>
|
|
132 |
<datasource_id><party><organizationname>NYBG</organizationname></party></datasource_id>
|
|
133 | 133 |
<catalognumber_dwc>00682023</catalognumber_dwc> |
134 | 134 |
<collectionnumber>9877</collectionnumber> |
135 | 135 |
<sourceaccessioncode>816590</sourceaccessioncode> |
... | ... | |
217 | 217 |
</taxonoccurrence_id> |
218 | 218 |
<museum_id><party><organizationname>NY Herbarium</organizationname></party></museum_id> |
219 | 219 |
<collectioncode_dwc>Herbarium</collectioncode_dwc> |
220 |
<reference_id><reference><shortname>NYBG</shortname></reference></reference_id>
|
|
220 |
<datasource_id><party><organizationname>NYBG</organizationname></party></datasource_id>
|
|
221 | 221 |
<catalognumber_dwc>200996</catalognumber_dwc> |
222 | 222 |
<collectionnumber>545</collectionnumber> |
223 | 223 |
<sourceaccessioncode>220541</sourceaccessioncode> |
inputs/NYBG/maps/VegBIEN.specimens.csv | ||
---|---|---|
39 | 39 |
PlantFungusDescription,"/description/_merge/2/_label[label=""plant fungus""]/value",, |
40 | 40 |
InstitutionCode,/{museum_id/party/organizationname/_name/first},,11 |
41 | 41 |
CollectionCode,"/{museum_id/party/organizationname/_name/last,collectioncode_dwc}",Brad: Not sure if mapping correct. DwC element; code for entire collection; often same as InstitutionCode; Aaron: Combining with InstitutionCode to create collection name,12 |
42 |
CatalogNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,"Brad: Not sure if mapping correct. Nick, is there an element for institutional accession codes in VegX?; Aaron: This can't be used as the accession code (primary key) because some rows don't have a value for it",20
|
|
43 |
CollectorNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/1,,22
|
|
44 |
FieldNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/3,"Brad: Correct for VB, not sure about VX; Nick, is there an element in VX fo Collection Number?",53
|
|
45 |
UniqueNYInternalRecordNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode,"Brad: OMIT; Aaron: We need this field because it is the only ID column with an entry in every row; Brad: OK, use this as primary key",19
|
|
42 |
CatalogNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,"Brad: Not sure if mapping correct. Nick, is there an element for institutional accession codes in VegX?; Aaron: This can't be used as the accession code (primary key) because some rows don't have a value for it",20
|
|
43 |
CollectorNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/1,,22
|
|
44 |
FieldNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/3,"Brad: Correct for VB, not sure about VX; Nick, is there an element in VX fo Collection Number?",53
|
|
45 |
UniqueNYInternalRecordNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode,"Brad: OMIT; Aaron: We need this field because it is the only ID column with an entry in every row; Brad: OK, use this as primary key",19
|
|
46 | 46 |
BasisOfRecord,,Brad: OMIT? See http://rs.tdwg.org/dwc/terms/index.htm#basisOfRecord for definition of this term.,15 |
47 | 47 |
ContinentOcean,,Brad: OMIT,59 |
48 | 48 |
DateLastModified,,"Brad: Mapping to VegX is incorrect. I think is this merely an internal timestamp indicated when record last modified, not necessarily when determination (taxon name) last modified. Probably we should omit this field, although might be useful for updating changed records from this source.",1 |
inputs/SALVIAS/maps/VegBIEN.organisms.csv | ||
---|---|---|
19 | 19 |
Habit,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=growthForm]]:[@fkey=tableRecord_ID]/definedvalue","Brad: Incorrect for VegBank, correct for VegX. This is growth form (tree, shrub, herb, etc.). It is an observation of a trait." |
20 | 20 |
Ind,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=individualCode]]:[@fkey=tableRecord_ID]/definedvalue","Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot." |
21 | 21 |
DetType,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=voucherType]]:[@fkey=tableRecord_ID]/definedvalue","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen." |
22 |
coll_number,/specimenreplicate:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,Brad: Incorrect. Map instead as for voucher_string
|
|
23 |
census_date,/specimenreplicate:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectiondate/_*/date,
|
|
22 |
coll_number,/specimenreplicate:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,Brad: Incorrect. Map instead as for voucher_string
|
|
23 |
census_date,/specimenreplicate:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate/_*/date,
|
|
24 | 24 |
auth,"/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Authority]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname",Brad: Incorrect. This is the author of the scientificName. The should be a place for this in the taxonomic name elements of VegB and VegX. Let's discuss. |
25 | 25 |
Family,"/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Family]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname", |
26 | 26 |
Genus,"/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Genus]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname", |
inputs/NYBG-CSV/test/import.specimens.out.ref | ||
---|---|---|
1 |
Inserted 80 new rows into database |
|
1 |
Inserted 79 new rows into database |
inputs/NYBG-CSV/test/VegBIEN.specimens.xml.ref | ||
---|---|---|
129 | 129 |
<description>plant fungus: with rough brown bark, almost no buttressing, 1 m diam; fallen fruit and leaves</description> |
130 | 130 |
<museum_id><party><organizationname>NY Herbarium</organizationname></party></museum_id> |
131 | 131 |
<collectioncode_dwc>Herbarium</collectioncode_dwc> |
132 |
<reference_id><reference><shortname>NYBG</shortname></reference></reference_id>
|
|
132 |
<datasource_id><party><organizationname>NYBG</organizationname></party></datasource_id>
|
|
133 | 133 |
<catalognumber_dwc>00682023</catalognumber_dwc> |
134 | 134 |
<collectionnumber>9877</collectionnumber> |
135 | 135 |
<sourceaccessioncode>816590</sourceaccessioncode> |
... | ... | |
217 | 217 |
</taxonoccurrence_id> |
218 | 218 |
<museum_id><party><organizationname>NY Herbarium</organizationname></party></museum_id> |
219 | 219 |
<collectioncode_dwc>Herbarium</collectioncode_dwc> |
220 |
<reference_id><reference><shortname>NYBG</shortname></reference></reference_id>
|
|
220 |
<datasource_id><party><organizationname>NYBG</organizationname></party></datasource_id>
|
|
221 | 221 |
<catalognumber_dwc>200996</catalognumber_dwc> |
222 | 222 |
<collectionnumber>545</collectionnumber> |
223 | 223 |
<sourceaccessioncode>220541</sourceaccessioncode> |
inputs/NYBG-CSV/maps/VegBIEN.specimens.csv | ||
---|---|---|
37 | 37 |
PlantFungusDescription,"/description/_merge/2/_label[label=""plant fungus""]/value",, |
38 | 38 |
InstitutionCode,/{museum_id/party/organizationname/_name/first},,11 |
39 | 39 |
CollectionCode,"/{museum_id/party/organizationname/_name/last,collectioncode_dwc}",Brad: Not sure if mapping correct. DwC element; code for entire collection; often same as InstitutionCode; Aaron: Combining with InstitutionCode to create collection name,12 |
40 |
CatalogNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,"Brad: Not sure if mapping correct. Nick, is there an element for institutional accession codes in VegX?; Aaron: This can't be used as the accession code (primary key) because some rows don't have a value for it",20
|
|
41 |
CollectorNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/1,,22
|
|
42 |
FieldNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/3,"Brad: Correct for VB, not sure about VX; Nick, is there an element in VX fo Collection Number?",53
|
|
43 |
UniqueNYInternalRecordNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode,"Brad: OMIT; Aaron: We need this field because it is the only ID column with an entry in every row; Brad: OK, use this as primary key",19
|
|
40 |
CatalogNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,"Brad: Not sure if mapping correct. Nick, is there an element for institutional accession codes in VegX?; Aaron: This can't be used as the accession code (primary key) because some rows don't have a value for it",20
|
|
41 |
CollectorNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/1,,22
|
|
42 |
FieldNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/3,"Brad: Correct for VB, not sure about VX; Nick, is there an element in VX fo Collection Number?",53
|
|
43 |
UniqueNYInternalRecordNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode,"Brad: OMIT; Aaron: We need this field because it is the only ID column with an entry in every row; Brad: OK, use this as primary key",19
|
|
44 | 44 |
BasisOfRecord,,Brad: OMIT? See http://rs.tdwg.org/dwc/terms/index.htm#basisOfRecord for definition of this term.,15 |
45 | 45 |
ContinentOcean,,Brad: OMIT,59 |
46 | 46 |
DateLastModified,,"Brad: Mapping to VegX is incorrect. I think is this merely an internal timestamp indicated when record last modified, not necessarily when determination (taxon name) last modified. Probably we should omit this field, although might be useful for updating changed records from this source.",1 |
inputs/SALVIAS-CSV/test/VegBIEN.organisms.xml.ref | ||
---|---|---|
54 | 54 |
<definedvalue>10</definedvalue> |
55 | 55 |
</definedvalue> |
56 | 56 |
<specimenreplicate> |
57 |
<reference_id><reference><shortname>SALVIAS</shortname></reference></reference_id>
|
|
57 |
<datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
|
|
58 | 58 |
<catalognumber_dwc>14598</catalognumber_dwc> |
59 | 59 |
</specimenreplicate> |
60 | 60 |
<taxondetermination> |
... | ... | |
170 | 170 |
<definedvalue>100</definedvalue> |
171 | 171 |
</definedvalue> |
172 | 172 |
<specimenreplicate> |
173 |
<reference_id><reference><shortname>SALVIAS</shortname></reference></reference_id>
|
|
173 |
<datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
|
|
174 | 174 |
<catalognumber_dwc>14669</catalognumber_dwc> |
175 | 175 |
</specimenreplicate> |
176 | 176 |
<taxondetermination> |
inputs/SALVIAS-CSV/test/import.organisms.out.ref | ||
---|---|---|
1 |
Inserted 82 new rows into database |
|
1 |
Inserted 81 new rows into database |
inputs/SALVIAS-CSV/maps/VegBIEN.organisms.csv | ||
---|---|---|
27 | 27 |
habit,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=growthForm]]:[@fkey=tableRecord_ID]/definedvalue","Brad: Incorrect for VegBank, correct for VegX. This is growth form (tree, shrub, herb, etc.). It is an observation of a trait." |
28 | 28 |
individual_code,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=individualCode]]:[@fkey=tableRecord_ID]/definedvalue","Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot." |
29 | 29 |
det_type,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=voucherType]]:[@fkey=tableRecord_ID]/definedvalue","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen." |
30 |
coll_number,/specimenreplicate:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,Brad: Incorrect. Map instead as for voucher_string
|
|
30 |
coll_number,/specimenreplicate:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,Brad: Incorrect. Map instead as for voucher_string
|
|
31 | 31 |
specific_authority,"/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Authority]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname",Brad: Incorrect. This is the author of the scientificName. The should be a place for this in the taxonomic name elements of VegB and VegX. Let's discuss. |
32 | 32 |
family,"/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Family]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname", |
33 | 33 |
genus,"/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Genus]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname", |
schemas/vegbien.my.sql | ||
---|---|---|
2257 | 2257 |
|
2258 | 2258 |
CREATE TABLE specimenreplicate ( |
2259 | 2259 |
specimenreplicate_id int(11) NOT NULL, |
2260 |
reference_id int(11) NOT NULL,
|
|
2260 |
datasource_id int(11) NOT NULL,
|
|
2261 | 2261 |
collectioncode_dwc text, |
2262 | 2262 |
catalognumber_dwc text, |
2263 | 2263 |
collectiondate timestamp NULL, |
... | ... | |
4212 | 4212 |
-- |
4213 | 4213 |
|
4214 | 4214 |
ALTER TABLE specimenreplicate |
4215 |
ADD CONSTRAINT specimenreplicate_keys_accessioncode UNIQUE (reference_id, collectioncode_dwc, sourceaccessioncode);
|
|
4215 |
ADD CONSTRAINT specimenreplicate_keys_accessioncode UNIQUE (datasource_id, collectioncode_dwc, sourceaccessioncode);
|
|
4216 | 4216 |
|
4217 | 4217 |
|
4218 | 4218 |
-- |
... | ... | |
4220 | 4220 |
-- |
4221 | 4221 |
|
4222 | 4222 |
ALTER TABLE specimenreplicate |
4223 |
ADD CONSTRAINT specimenreplicate_keys_catalognumber UNIQUE (reference_id, collectioncode_dwc, catalognumber_dwc);
|
|
4223 |
ADD CONSTRAINT specimenreplicate_keys_catalognumber UNIQUE (datasource_id, collectioncode_dwc, catalognumber_dwc);
|
|
4224 | 4224 |
|
4225 | 4225 |
|
4226 | 4226 |
-- |
... | ... | |
4228 | 4228 |
-- |
4229 | 4229 |
|
4230 | 4230 |
ALTER TABLE specimenreplicate |
4231 |
ADD CONSTRAINT specimenreplicate_keys_collectionnumber UNIQUE (reference_id, collectioncode_dwc, collectionnumber);
|
|
4231 |
ADD CONSTRAINT specimenreplicate_keys_collectionnumber UNIQUE (datasource_id, collectioncode_dwc, collectionnumber);
|
|
4232 | 4232 |
|
4233 | 4233 |
|
4234 | 4234 |
-- |
... | ... | |
4909 | 4909 |
|
4910 | 4910 |
|
4911 | 4911 |
-- |
4912 |
-- Name: fki_specimenreplicate_datasource_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
4913 |
-- |
|
4914 |
|
|
4915 |
CREATE INDEX fki_specimenreplicate_datasource_id ON specimenreplicate (datasource_id); |
|
4916 |
|
|
4917 |
|
|
4918 |
-- |
|
4912 | 4919 |
-- Name: fki_specimenreplicate_museum_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4913 | 4920 |
-- |
4914 | 4921 |
|
... | ... | |
4919 | 4926 |
-- Name: fki_specimenreplicate_reference_id_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: |
4920 | 4927 |
-- |
4921 | 4928 |
|
4922 |
CREATE INDEX fki_specimenreplicate_reference_id_fkey ON specimenreplicate (reference_id);
|
|
4929 |
CREATE INDEX fki_specimenreplicate_reference_id_fkey ON specimenreplicate (datasource_id);
|
|
4923 | 4930 |
|
4924 | 4931 |
|
4925 | 4932 |
-- |
... | ... | |
6497 | 6504 |
|
6498 | 6505 |
|
6499 | 6506 |
-- |
6500 |
-- Name: specimenreplicate_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6507 |
-- Name: specimenreplicate_datasource_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6501 | 6508 |
-- |
6502 | 6509 |
|
6503 | 6510 |
|
6504 | 6511 |
|
6505 | 6512 |
|
6506 | 6513 |
-- |
6507 |
-- Name: specimenreplicate_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6514 |
-- Name: specimenreplicate_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6508 | 6515 |
-- |
6509 | 6516 |
|
6510 | 6517 |
|
schemas/vegbien.sql | ||
---|---|---|
2593 | 2593 |
|
2594 | 2594 |
CREATE TABLE specimenreplicate ( |
2595 | 2595 |
specimenreplicate_id integer NOT NULL, |
2596 |
reference_id integer NOT NULL,
|
|
2596 |
datasource_id integer NOT NULL,
|
|
2597 | 2597 |
collectioncode_dwc text, |
2598 | 2598 |
catalognumber_dwc text, |
2599 | 2599 |
collectiondate timestamp with time zone, |
... | ... | |
4658 | 4658 |
-- |
4659 | 4659 |
|
4660 | 4660 |
ALTER TABLE ONLY specimenreplicate |
4661 |
ADD CONSTRAINT specimenreplicate_keys_accessioncode UNIQUE (reference_id, collectioncode_dwc, sourceaccessioncode);
|
|
4661 |
ADD CONSTRAINT specimenreplicate_keys_accessioncode UNIQUE (datasource_id, collectioncode_dwc, sourceaccessioncode);
|
|
4662 | 4662 |
|
4663 | 4663 |
|
4664 | 4664 |
-- |
... | ... | |
4666 | 4666 |
-- |
4667 | 4667 |
|
4668 | 4668 |
ALTER TABLE ONLY specimenreplicate |
4669 |
ADD CONSTRAINT specimenreplicate_keys_catalognumber UNIQUE (reference_id, collectioncode_dwc, catalognumber_dwc);
|
|
4669 |
ADD CONSTRAINT specimenreplicate_keys_catalognumber UNIQUE (datasource_id, collectioncode_dwc, catalognumber_dwc);
|
|
4670 | 4670 |
|
4671 | 4671 |
|
4672 | 4672 |
-- |
... | ... | |
4674 | 4674 |
-- |
4675 | 4675 |
|
4676 | 4676 |
ALTER TABLE ONLY specimenreplicate |
4677 |
ADD CONSTRAINT specimenreplicate_keys_collectionnumber UNIQUE (reference_id, collectioncode_dwc, collectionnumber);
|
|
4677 |
ADD CONSTRAINT specimenreplicate_keys_collectionnumber UNIQUE (datasource_id, collectioncode_dwc, collectionnumber);
|
|
4678 | 4678 |
|
4679 | 4679 |
|
4680 | 4680 |
-- |
... | ... | |
5355 | 5355 |
|
5356 | 5356 |
|
5357 | 5357 |
-- |
5358 |
-- Name: fki_specimenreplicate_datasource_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
|
5359 |
-- |
|
5360 |
|
|
5361 |
CREATE INDEX fki_specimenreplicate_datasource_id ON specimenreplicate USING btree (datasource_id); |
|
5362 |
|
|
5363 |
|
|
5364 |
-- |
|
5358 | 5365 |
-- Name: fki_specimenreplicate_museum_id; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5359 | 5366 |
-- |
5360 | 5367 |
|
... | ... | |
5365 | 5372 |
-- Name: fki_specimenreplicate_reference_id_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: |
5366 | 5373 |
-- |
5367 | 5374 |
|
5368 |
CREATE INDEX fki_specimenreplicate_reference_id_fkey ON specimenreplicate USING btree (reference_id);
|
|
5375 |
CREATE INDEX fki_specimenreplicate_reference_id_fkey ON specimenreplicate USING btree (datasource_id);
|
|
5369 | 5376 |
|
5370 | 5377 |
|
5371 | 5378 |
-- |
... | ... | |
6967 | 6974 |
|
6968 | 6975 |
|
6969 | 6976 |
-- |
6970 |
-- Name: specimenreplicate_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6977 |
-- Name: specimenreplicate_datasource_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6971 | 6978 |
-- |
6972 | 6979 |
|
6973 | 6980 |
ALTER TABLE ONLY specimenreplicate |
6974 |
ADD CONSTRAINT specimenreplicate_museum_id FOREIGN KEY (museum_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6981 |
ADD CONSTRAINT specimenreplicate_datasource_id FOREIGN KEY (datasource_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6975 | 6982 |
|
6976 | 6983 |
|
6977 | 6984 |
-- |
6978 |
-- Name: specimenreplicate_reference_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6985 |
-- Name: specimenreplicate_museum_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
|
6979 | 6986 |
-- |
6980 | 6987 |
|
6981 | 6988 |
ALTER TABLE ONLY specimenreplicate |
6982 |
ADD CONSTRAINT specimenreplicate_reference_id_fkey FOREIGN KEY (reference_id) REFERENCES reference(reference_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6989 |
ADD CONSTRAINT specimenreplicate_museum_id FOREIGN KEY (museum_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
6983 | 6990 |
|
6984 | 6991 |
|
6985 | 6992 |
-- |
mappings/VegX-VegBIEN.organisms.csv | ||
---|---|---|
90 | 90 |
/simpleUserdefined[name=growthForm]/value,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=growthForm]]:[@fkey=tableRecord_ID]/definedvalue", |
91 | 91 |
/simpleUserdefined[name=individualCode]/value,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=individualCode]]:[@fkey=tableRecord_ID]/definedvalue", |
92 | 92 |
"/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType","/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=voucherType]]:[@fkey=tableRecord_ID]/definedvalue", |
93 |
/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,/specimenreplicate:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/*_id/reference/shortname/_alt/1,
|
|
94 |
/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/authorCode,/specimenreplicate:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,
|
|
95 |
/simpleUserdefined[name=collectionDate]/value,/specimenreplicate:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectiondate,
|
|
96 |
/simpleUserdefined[name=collectionDate]/value/_*/date,/specimenreplicate:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectiondate/_*/date,
|
|
93 |
/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/authorCode,/specimenreplicate:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,
|
|
94 |
/simpleUserdefined[name=collectionDate]/value,/specimenreplicate:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate,
|
|
95 |
/simpleUserdefined[name=collectionDate]/value/_*/date,/specimenreplicate:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate/_*/date,
|
|
96 |
/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,/specimenreplicate:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1,
|
|
97 | 97 |
"/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=auth])/Name","/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Authority]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname", |
98 | 98 |
"/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=fam])/Name","/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Family]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname", |
99 | 99 |
"/*ID->/*s/individualOrganism/*sID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[Rank/@code=gen])/Name","/taxondetermination[*_id/role/rolecode=computer,*_id/plantconcept/plantstatus/plantlevel=Genus]:[determinationtype=""Computer (automated)"",iscurrent=true]/*_id/plantconcept/*_id/*/plantname", |
mappings/for_review/VegX-VegBIEN.organisms.csv | ||
---|---|---|
90 | 90 |
/simpleUserdefined[name=growthForm]/value,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=growthForm]]/definedvalue", |
91 | 91 |
/simpleUserdefined[name=individualCode]/value,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=individualCode]]/definedvalue", |
92 | 92 |
//*s/taxonDetermination[role=collector]/groupType,"/definedvalue[*_id/userdefined[tablename=taxonoccurrence,userdefinedname=voucherType]]/definedvalue", |
93 |
//party/organizationName,//reference/shortname/_alt/1, |
|
94 | 93 |
//taxonNameUsageConcept/authorCode,//specimenreplicate/catalognumber_dwc, |
95 | 94 |
/simpleUserdefined[name=collectionDate]/value,//specimenreplicate/collectiondate, |
96 | 95 |
/simpleUserdefined[name=collectionDate]/value/_*/date,//specimenreplicate/collectiondate/_*/date, |
96 |
//party/organizationName,//party/organizationname/_alt/1, |
|
97 | 97 |
//*s/taxonConcept[@code=auth]/Name,"/taxondetermination[rolecode=computer,plantlevel=Authority]/*_id/plantconcept/*_id/*/plantname", |
98 | 98 |
//*s/taxonConcept[@code=fam]/Name,"/taxondetermination[rolecode=computer,plantlevel=Family]/*_id/plantconcept/*_id/*/plantname", |
99 | 99 |
//*s/taxonConcept[@code=gen]/Name,"/taxondetermination[rolecode=computer,plantlevel=Genus]/*_id/plantconcept/*_id/*/plantname", |
mappings/for_review/DwC-VegBIEN.specimens.csv | ||
---|---|---|
47 | 47 |
"fieldNotes/_merge/2/_label[label=""plant fungus""]/value","/description/_merge/2/_label[label=""plant fungus""]/value",, |
48 | 48 |
institutionCode,/{museum_id/party/organizationname/_name/first},,11 |
49 | 49 |
collectionCode,"/{museum_id/party/organizationname/_name/last,collectioncode_dwc}",Brad: Not sure if mapping correct. DwC element; code for entire collection; often same as InstitutionCode; Aaron: Combining with InstitutionCode to create collection name,12 |
50 |
bien.datasource,//reference/shortname/_alt/1,, |
|
51 | 50 |
catalogNumber,/catalognumber_dwc,"Brad: Not sure if mapping correct. Nick, is there an element for institutional accession codes in VegX?; Aaron: This can't be used as the accession code (primary key) because some rows don't have a value for it",20 |
52 | 51 |
recordNumber,/collectionnumber/_alt/1,,22 |
53 | 52 |
collectionID,/collectionnumber/_alt/2,,9 |
54 | 53 |
fieldNumber,/collectionnumber/_alt/3,"Brad: Correct for VB, not sure about VX; Nick, is there an element in VX fo Collection Number?",53 |
54 |
bien.datasource,//party/organizationname/_alt/1,, |
|
55 | 55 |
occurrenceID,/sourceaccessioncode,"Brad: OMIT; Aaron: We need this field because it is the only ID column with an entry in every row; Brad: OK, use this as primary key",19 |
56 | 56 |
acceptedNameUsage,,,135 |
57 | 57 |
acceptedNameUsageID,,,128 |
mappings/DwC-VegBIEN.specimens.csv | ||
---|---|---|
47 | 47 |
"fieldNotes/_merge/2/_label[label=""plant fungus""]/value","/description/_merge/2/_label[label=""plant fungus""]/value",, |
48 | 48 |
institutionCode,/{museum_id/party/organizationname/_name/first},,11 |
49 | 49 |
collectionCode,"/{museum_id/party/organizationname/_name/last,collectioncode_dwc}",Brad: Not sure if mapping correct. DwC element; code for entire collection; often same as InstitutionCode; Aaron: Combining with InstitutionCode to create collection name,12 |
50 |
bien.datasource,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/*_id/reference/shortname/_alt/1,,
|
|
51 |
catalogNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,"Brad: Not sure if mapping correct. Nick, is there an element for institutional accession codes in VegX?; Aaron: This can't be used as the accession code (primary key) because some rows don't have a value for it",20
|
|
52 |
recordNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/1,,22
|
|
53 |
collectionID,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/2,,9
|
|
54 |
fieldNumber,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/3,"Brad: Correct for VB, not sure about VX; Nick, is there an element in VX fo Collection Number?",53
|
|
55 |
occurrenceID,:[*_id/reference/shortname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode,"Brad: OMIT; Aaron: We need this field because it is the only ID column with an entry in every row; Brad: OK, use this as primary key",19
|
|
50 |
catalogNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc,"Brad: Not sure if mapping correct. Nick, is there an element for institutional accession codes in VegX?; Aaron: This can't be used as the accession code (primary key) because some rows don't have a value for it",20
|
|
51 |
recordNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/1,,22
|
|
52 |
collectionID,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/2,,9
|
|
53 |
fieldNumber,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectionnumber/_alt/3,"Brad: Correct for VB, not sure about VX; Nick, is there an element in VX fo Collection Number?",53
|
|
54 |
bien.datasource,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1,,
|
|
55 |
occurrenceID,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode,"Brad: OMIT; Aaron: We need this field because it is the only ID column with an entry in every row; Brad: OK, use this as primary key",19
|
|
56 | 56 |
acceptedNameUsage,,,135 |
57 | 57 |
acceptedNameUsageID,,,128 |
58 | 58 |
associatedMedia,,,36 |
Also available in: Unified diff
VegBIEN: Renamed specimenreplicate.reference_id to datasource_id and pointed it to party instead of reference, since party is better optimized for storing names