Project

General

Profile

« Previous | Next » 

Revision 11107

bugfix: mappings/VegCore-VegBIEN.csv: nest all taxonoccurrences inside a stratum event, so that the parent locationevent is always fully populated before child locationevents point to it. (previously, a stub parent event was created when the child event was imported first, which blocked the fully-populated parent event from being inserted later on.) this uses auto-folding (for VegBank/CVS) and auto-forwarding (for other datasources) to prune empty stratum events for taxonoccurrences that don't have strata. (see wiki.vegpath.org/Auto-folding, wiki.vegpath.org/Auto-forwarding for more info about these normalization techniques.) note that the inserted row counts stay exactly the same for all datasources except VegBank (which was being fixed), indicating that this signficant change to the mappings did not change the semantics of the import of taxonoccurrences.

View differences:

test.xml.ref
9 9
                    <location>
10 10
                        <locationevent>
11 11
                            <sourceaccessioncode>$eventID</sourceaccessioncode>
12
                            <taxonoccurrence>
13
                                <aggregateoccurrence>
14
                                    <collectiondate>$dateCollected</collectiondate>
15
                                    <notes>$occurrenceRemarks</notes>
16
                                    <plantobservation>
17
                                        <authorplantcode>$collectorNumber</authorplantcode>
18
                                        <specimenreplicate>
19
                                            <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
20
                                            <collectionnumber>$collectorNumber</collectionnumber>
21
                                        </specimenreplicate>
22
                                    </plantobservation>
23
                                </aggregateoccurrence>
24
                                <authortaxoncode>$collectorNumber</authortaxoncode>
25
                                <taxondetermination>
26
                                    <taxonverbatim_id>
27
                                        <taxonverbatim>
28
                                            <taxonlabel_id>
29
                                                <taxonlabel>
30
                                                    <parent_id>
31
                                                        <taxonlabel>
32
                                                            <parent_id>
33
                                                                <taxonlabel>
34
                                                                    <rank>cultivar</rank>
35
                                                                    <parent_id>
36
                                                                        <taxonlabel>
37
                                                                            <rank>forma</rank>
38
                                                                            <parent_id>
39
                                                                                <taxonlabel>
40
                                                                                    <rank>variety</rank>
41
                                                                                    <parent_id>
42
                                                                                        <taxonlabel>
43
                                                                                            <rank>subspecies</rank>
44
                                                                                            <parent_id>
45
                                                                                                <taxonlabel>
46
                                                                                                    <rank>species</rank>
47
                                                                                                    <parent_id>
48
                                                                                                        <taxonlabel>
49
                                                                                                            <rank>genus</rank>
50
                                                                                                            <taxonepithet>$genus</taxonepithet>
51
                                                                                                            <parent_id>
52
                                                                                                                <taxonlabel>
53
                                                                                                                    <rank>family</rank>
54
                                                                                                                    <taxonepithet>$family</taxonepithet>
55
                                                                                                                    <parent_id>
56
                                                                                                                        <taxonlabel>
57
                                                                                                                            <rank>order</rank>
58
                                                                                                                            <taxonepithet>$order</taxonepithet>
59
                                                                                                                            <parent_id>
60
                                                                                                                                <taxonlabel>
61
                                                                                                                                    <rank>class</rank>
62
                                                                                                                                    <taxonepithet>$class</taxonepithet>
63
                                                                                                                                    <parent_id>
64
                                                                                                                                        <taxonlabel>
65
                                                                                                                                            <rank>phylum</rank>
66
                                                                                                                                            <parent_id>
67
                                                                                                                                                <taxonlabel>
68
                                                                                                                                                    <rank>kingdom</rank>
69
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
70
                                                                                                                                                </taxonlabel>
71
                                                                                                                                            </parent_id>
72
                                                                                                                                        </taxonlabel>
73
                                                                                                                                    </parent_id>
74
                                                                                                                                </taxonlabel>
75
                                                                                                                            </parent_id>
76
                                                                                                                        </taxonlabel>
77
                                                                                                                    </parent_id>
78
                                                                                                                </taxonlabel>
79
                                                                                                            </parent_id>
80
                                                                                                        </taxonlabel>
81
                                                                                                    </parent_id>
82
                                                                                                </taxonlabel>
83
                                                                                            </parent_id>
84
                                                                                        </taxonlabel>
85
                                                                                    </parent_id>
86
                                                                                </taxonlabel>
87
                                                                            </parent_id>
88
                                                                        </taxonlabel>
89
                                                                    </parent_id>
90
                                                                </taxonlabel>
91
                                                            </parent_id>
92
                                                        </taxonlabel>
93
                                                    </parent_id>
94
                                                    <taxonomicname>
95
                                                        <_merge_prefix>
96
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
97
                                                            <value>
98
                                                                <_alt>
99
                                                                    <1>$scientificName</1>
100
                                                                    <2>
101
                                                                        <_alt>
102
                                                                            <1>$taxonName</1>
103
                                                                            <2><_filter_genus><value>$genus</value></_filter_genus></2>
104
                                                                        </_alt>
105
                                                                    </2>
106
                                                                </_alt>
107
                                                            </value>
108
                                                        </_merge_prefix>
109
                                                    </taxonomicname>
110
                                                </taxonlabel>
111
                                            </taxonlabel_id>
112
                                            <family>$family</family>
113
                                            <genus>$genus</genus>
114
                                            <taxonname>$taxonName</taxonname>
115
                                            <taxonomicname>$scientificName</taxonomicname>
116
                                        </taxonverbatim>
117
                                    </taxonverbatim_id>
118
                                    <determinationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></determinationdate>
119
                                    <determinationtype>$identificationType</determinationtype>
120
                                    <taxonfit>$identificationQualifier</taxonfit>
121
                                </taxondetermination>
122
                                <taxondetermination>
123
                                    <isoriginal>true</isoriginal>
124
                                    <taxonverbatim_id>
125
                                        <taxonverbatim>
126
                                            <taxonname>$originalTaxonName</taxonname>
127
                                            <taxonomicname>$originalScientificName</taxonomicname>
128
                                        </taxonverbatim>
129
                                    </taxonverbatim_id>
130
                                </taxondetermination>
131
                            </taxonoccurrence>
12
                            <locationevent fkey="parent_id">
13
                                <sourceaccessioncode>$eventID</sourceaccessioncode>
14
                                <taxonoccurrence>
15
                                    <aggregateoccurrence>
16
                                        <collectiondate>$dateCollected</collectiondate>
17
                                        <notes>$occurrenceRemarks</notes>
18
                                        <plantobservation>
19
                                            <authorplantcode>$collectorNumber</authorplantcode>
20
                                            <specimenreplicate>
21
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
22
                                                <collectionnumber>$collectorNumber</collectionnumber>
23
                                            </specimenreplicate>
24
                                        </plantobservation>
25
                                    </aggregateoccurrence>
26
                                    <authortaxoncode>$collectorNumber</authortaxoncode>
27
                                    <taxondetermination>
28
                                        <taxonverbatim_id>
29
                                            <taxonverbatim>
30
                                                <taxonlabel_id>
31
                                                    <taxonlabel>
32
                                                        <parent_id>
33
                                                            <taxonlabel>
34
                                                                <parent_id>
35
                                                                    <taxonlabel>
36
                                                                        <rank>cultivar</rank>
37
                                                                        <parent_id>
38
                                                                            <taxonlabel>
39
                                                                                <rank>forma</rank>
40
                                                                                <parent_id>
41
                                                                                    <taxonlabel>
42
                                                                                        <rank>variety</rank>
43
                                                                                        <parent_id>
44
                                                                                            <taxonlabel>
45
                                                                                                <rank>subspecies</rank>
46
                                                                                                <parent_id>
47
                                                                                                    <taxonlabel>
48
                                                                                                        <rank>species</rank>
49
                                                                                                        <parent_id>
50
                                                                                                            <taxonlabel>
51
                                                                                                                <rank>genus</rank>
52
                                                                                                                <taxonepithet>$genus</taxonepithet>
53
                                                                                                                <parent_id>
54
                                                                                                                    <taxonlabel>
55
                                                                                                                        <rank>family</rank>
56
                                                                                                                        <taxonepithet>$family</taxonepithet>
57
                                                                                                                        <parent_id>
58
                                                                                                                            <taxonlabel>
59
                                                                                                                                <rank>order</rank>
60
                                                                                                                                <taxonepithet>$order</taxonepithet>
61
                                                                                                                                <parent_id>
62
                                                                                                                                    <taxonlabel>
63
                                                                                                                                        <rank>class</rank>
64
                                                                                                                                        <taxonepithet>$class</taxonepithet>
65
                                                                                                                                        <parent_id>
66
                                                                                                                                            <taxonlabel>
67
                                                                                                                                                <rank>phylum</rank>
68
                                                                                                                                                <parent_id>
69
                                                                                                                                                    <taxonlabel>
70
                                                                                                                                                        <rank>kingdom</rank>
71
                                                                                                                                                        <taxonepithet>$kingdom</taxonepithet>
72
                                                                                                                                                    </taxonlabel>
73
                                                                                                                                                </parent_id>
74
                                                                                                                                            </taxonlabel>
75
                                                                                                                                        </parent_id>
76
                                                                                                                                    </taxonlabel>
77
                                                                                                                                </parent_id>
78
                                                                                                                            </taxonlabel>
79
                                                                                                                        </parent_id>
80
                                                                                                                    </taxonlabel>
81
                                                                                                                </parent_id>
82
                                                                                                            </taxonlabel>
83
                                                                                                        </parent_id>
84
                                                                                                    </taxonlabel>
85
                                                                                                </parent_id>
86
                                                                                            </taxonlabel>
87
                                                                                        </parent_id>
88
                                                                                    </taxonlabel>
89
                                                                                </parent_id>
90
                                                                            </taxonlabel>
91
                                                                        </parent_id>
92
                                                                    </taxonlabel>
93
                                                                </parent_id>
94
                                                            </taxonlabel>
95
                                                        </parent_id>
96
                                                        <taxonomicname>
97
                                                            <_merge_prefix>
98
                                                                <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
99
                                                                <value>
100
                                                                    <_alt>
101
                                                                        <1>$scientificName</1>
102
                                                                        <2>
103
                                                                            <_alt>
104
                                                                                <1>$taxonName</1>
105
                                                                                <2><_filter_genus><value>$genus</value></_filter_genus></2>
106
                                                                            </_alt>
107
                                                                        </2>
108
                                                                    </_alt>
109
                                                                </value>
110
                                                            </_merge_prefix>
111
                                                        </taxonomicname>
112
                                                    </taxonlabel>
113
                                                </taxonlabel_id>
114
                                                <family>$family</family>
115
                                                <genus>$genus</genus>
116
                                                <taxonname>$taxonName</taxonname>
117
                                                <taxonomicname>$scientificName</taxonomicname>
118
                                            </taxonverbatim>
119
                                        </taxonverbatim_id>
120
                                        <determinationdate><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></determinationdate>
121
                                        <determinationtype>$identificationType</determinationtype>
122
                                        <taxonfit>$identificationQualifier</taxonfit>
123
                                    </taxondetermination>
124
                                    <taxondetermination>
125
                                        <isoriginal>true</isoriginal>
126
                                        <taxonverbatim_id>
127
                                            <taxonverbatim>
128
                                                <taxonname>$originalTaxonName</taxonname>
129
                                                <taxonomicname>$originalScientificName</taxonomicname>
130
                                            </taxonverbatim>
131
                                        </taxonverbatim_id>
132
                                    </taxondetermination>
133
                                </taxonoccurrence>
134
                            </locationevent>
132 135
                        </locationevent>
133 136
                    </location>
134 137
                </path>

Also available in: Unified diff