Project

General

Profile

« Previous | Next » 

Revision 5513

mappings/VegCore-VegBIEN.csv: taxonconcept.parent_id when explicit parent provided: Set taxonconcept.parent_id using new _taxonconcept_set_parent_id() after creating the child taxonconcept, so that the parent_id will point to the already-inserted parent taxonconcept instead of creating a new, empty parent taxonconcept. This creates a two-step import, where first the taxonconcepts are imported, and then the parent_ids are matched up. This is necessary for column-based import because all the parent taxonconcepts are imported in a separate iteration from the child taxonconcepts with only their sourceaccessioncode, so this iteration must occur after the child taxonconcept iteration in order to match up with fully-populated taxonconcepts. Row-based import, on the other hand, does not require _taxonconcept_set_parent_id() but does require the taxonconcepts to be provided in dependency order (parents first), which is unfortunately not the case for NCBI.

View differences:

VegBIEN.csv
2 2
parent tax_id,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has explicit parent""]/cond/_exists",
3 3
rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has explicit parent""]/else/_if[@name=""if has verbatim name""]/{then/.,else/matched_concept_id/taxonconcept:[creator_id/party:[creator_id=0]/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
4 4
name_txt,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has explicit parent""]/else/_if[@name=""if has verbatim name""]/{then/.,else/matched_concept_id/taxonconcept:[creator_id/party:[creator_id=0]/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/6",
5
parent tax_id,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_taxonconcept_set_parent_id/parent_id/taxonconcept/sourceaccessioncode,
5 6
parent tax_id,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/parent_id/taxonconcept/_if[@name=""if has explicit parent""]/cond/_exists",
6 7
rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/parent_id/taxonconcept/_if[@name=""if has explicit parent""]/else/rank",
7 8
rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/parent_id/taxonconcept/_if[@name=""if has explicit parent""]/else/verbatimrank",
8
parent tax_id,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/parent_id/taxonconcept/sourceaccessioncode,
9 9
rank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/rank,
10 10
tax_id,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/sourceaccessioncode,
11 11
name_txt,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/taxonname,

Also available in: Unified diff