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
31 31
                            </_locationnarrative_is_cultivated>
32 32
                        </iscultivated>
33 33
                        <locationevent>
34
                            <taxonoccurrence>
35
                                <aggregateoccurrence>
36
                                    <collectiondate>$dateCollected</collectiondate>
37
                                    <notes>$occurrenceRemarks</notes>
38
                                    <plantobservation>
39
                                        <authorplantcode>$collectorNumber</authorplantcode>
40
                                        <reproductivecondition>$reproductiveCondition</reproductivecondition>
41
                                        <specimenreplicate>
42
                                            <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
43
                                            <collectioncode_dwc>$collection</collectioncode_dwc>
44
                                            <collectionnumber>$collectorNumber</collectionnumber>
45
                                        </specimenreplicate>
46
                                    </plantobservation>
47
                                </aggregateoccurrence>
48
                                <collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
49
                                <iscultivated>
50
                                    <_map>
51
                                        <cultivated>t</cultivated>
52
                                        <wild>f</wild>
53
                                        <*></*>
54
                                        <value>$establishmentMeans</value>
55
                                    </_map>
56
                                </iscultivated>
57
                                <isnative>
58
                                    <_map>
59
                                        <native>t</native>
60
                                        <exotic>f</exotic>
61
                                        <*></*>
62
                                        <value>$establishmentMeans</value>
63
                                    </_map>
64
                                </isnative>
65
                                <taxondetermination>
66
                                    <party_id><party><fullname>$identifiedBy</fullname></party></party_id>
67
                                    <taxonverbatim_id>
68
                                        <taxonverbatim>
69
                                            <taxonlabel_id>
70
                                                <taxonlabel>
71
                                                    <parent_id>
72
                                                        <taxonlabel>
73
                                                            <parent_id>
74
                                                                <taxonlabel>
75
                                                                    <rank>cultivar</rank>
76
                                                                    <parent_id>
77
                                                                        <taxonlabel>
78
                                                                            <rank>forma</rank>
79
                                                                            <parent_id>
80
                                                                                <taxonlabel>
81
                                                                                    <rank>variety</rank>
82
                                                                                    <parent_id>
83
                                                                                        <taxonlabel>
84
                                                                                            <rank>subspecies</rank>
85
                                                                                            <parent_id>
86
                                                                                                <taxonlabel>
87
                                                                                                    <rank>species</rank>
88
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
89
                                                                                                    <parent_id>
90
                                                                                                        <taxonlabel>
91
                                                                                                            <rank>genus</rank>
92
                                                                                                            <taxonepithet>$genus</taxonepithet>
93
                                                                                                            <parent_id>
94
                                                                                                                <taxonlabel>
95
                                                                                                                    <rank>family</rank>
96
                                                                                                                    <taxonepithet>$family</taxonepithet>
97
                                                                                                                </taxonlabel>
98
                                                                                                            </parent_id>
99
                                                                                                        </taxonlabel>
100
                                                                                                    </parent_id>
101
                                                                                                </taxonlabel>
102
                                                                                            </parent_id>
103
                                                                                        </taxonlabel>
104
                                                                                    </parent_id>
105
                                                                                </taxonlabel>
106
                                                                            </parent_id>
107
                                                                        </taxonlabel>
108
                                                                    </parent_id>
109
                                                                </taxonlabel>
110
                                                            </parent_id>
111
                                                            <taxonepithet>$infraspecificEpithet</taxonepithet>
112
                                                        </taxonlabel>
113
                                                    </parent_id>
114
                                                    <taxonomicname>
115
                                                        <_merge_prefix>
116
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
117
                                                            <value>
118
                                                                <_join_words>
119
                                                                    <1>
120
                                                                        <_join_words>
121
                                                                            <2><_filter_genus><value>$genus</value></_filter_genus></2>
122
                                                                            <3>$specificEpithet</3>
123
                                                                            <5>$infraspecificEpithet</5>
124
                                                                        </_join_words>
125
                                                                    </1>
126
                                                                    <2>$scientificNameAuthorship</2>
127
                                                                </_join_words>
128
                                                            </value>
129
                                                        </_merge_prefix>
130
                                                    </taxonomicname>
131
                                                </taxonlabel>
132
                                            </taxonlabel_id>
133
                                            <author>$scientificNameAuthorship</author>
134
                                            <family>$family</family>
135
                                            <genus>$genus</genus>
136
                                            <specific_epithet>$specificEpithet</specific_epithet>
137
                                        </taxonverbatim>
138
                                    </taxonverbatim_id>
139
                                </taxondetermination>
140
                            </taxonoccurrence>
34
                            <locationevent fkey="parent_id">
35
                                <taxonoccurrence>
36
                                    <aggregateoccurrence>
37
                                        <collectiondate>$dateCollected</collectiondate>
38
                                        <notes>$occurrenceRemarks</notes>
39
                                        <plantobservation>
40
                                            <authorplantcode>$collectorNumber</authorplantcode>
41
                                            <reproductivecondition>$reproductiveCondition</reproductivecondition>
42
                                            <specimenreplicate>
43
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
44
                                                <collectioncode_dwc>$collection</collectioncode_dwc>
45
                                                <collectionnumber>$collectorNumber</collectionnumber>
46
                                            </specimenreplicate>
47
                                        </plantobservation>
48
                                    </aggregateoccurrence>
49
                                    <collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
50
                                    <iscultivated>
51
                                        <_map>
52
                                            <cultivated>t</cultivated>
53
                                            <wild>f</wild>
54
                                            <*></*>
55
                                            <value>$establishmentMeans</value>
56
                                        </_map>
57
                                    </iscultivated>
58
                                    <isnative>
59
                                        <_map>
60
                                            <native>t</native>
61
                                            <exotic>f</exotic>
62
                                            <*></*>
63
                                            <value>$establishmentMeans</value>
64
                                        </_map>
65
                                    </isnative>
66
                                    <taxondetermination>
67
                                        <party_id><party><fullname>$identifiedBy</fullname></party></party_id>
68
                                        <taxonverbatim_id>
69
                                            <taxonverbatim>
70
                                                <taxonlabel_id>
71
                                                    <taxonlabel>
72
                                                        <parent_id>
73
                                                            <taxonlabel>
74
                                                                <parent_id>
75
                                                                    <taxonlabel>
76
                                                                        <rank>cultivar</rank>
77
                                                                        <parent_id>
78
                                                                            <taxonlabel>
79
                                                                                <rank>forma</rank>
80
                                                                                <parent_id>
81
                                                                                    <taxonlabel>
82
                                                                                        <rank>variety</rank>
83
                                                                                        <parent_id>
84
                                                                                            <taxonlabel>
85
                                                                                                <rank>subspecies</rank>
86
                                                                                                <parent_id>
87
                                                                                                    <taxonlabel>
88
                                                                                                        <rank>species</rank>
89
                                                                                                        <taxonepithet>$specificEpithet</taxonepithet>
90
                                                                                                        <parent_id>
91
                                                                                                            <taxonlabel>
92
                                                                                                                <rank>genus</rank>
93
                                                                                                                <taxonepithet>$genus</taxonepithet>
94
                                                                                                                <parent_id>
95
                                                                                                                    <taxonlabel>
96
                                                                                                                        <rank>family</rank>
97
                                                                                                                        <taxonepithet>$family</taxonepithet>
98
                                                                                                                    </taxonlabel>
99
                                                                                                                </parent_id>
100
                                                                                                            </taxonlabel>
101
                                                                                                        </parent_id>
102
                                                                                                    </taxonlabel>
103
                                                                                                </parent_id>
104
                                                                                            </taxonlabel>
105
                                                                                        </parent_id>
106
                                                                                    </taxonlabel>
107
                                                                                </parent_id>
108
                                                                            </taxonlabel>
109
                                                                        </parent_id>
110
                                                                    </taxonlabel>
111
                                                                </parent_id>
112
                                                                <taxonepithet>$infraspecificEpithet</taxonepithet>
113
                                                            </taxonlabel>
114
                                                        </parent_id>
115
                                                        <taxonomicname>
116
                                                            <_merge_prefix>
117
                                                                <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
118
                                                                <value>
119
                                                                    <_join_words>
120
                                                                        <1>
121
                                                                            <_join_words>
122
                                                                                <2><_filter_genus><value>$genus</value></_filter_genus></2>
123
                                                                                <3>$specificEpithet</3>
124
                                                                                <5>$infraspecificEpithet</5>
125
                                                                            </_join_words>
126
                                                                        </1>
127
                                                                        <2>$scientificNameAuthorship</2>
128
                                                                    </_join_words>
129
                                                                </value>
130
                                                            </_merge_prefix>
131
                                                        </taxonomicname>
132
                                                    </taxonlabel>
133
                                                </taxonlabel_id>
134
                                                <author>$scientificNameAuthorship</author>
135
                                                <family>$family</family>
136
                                                <genus>$genus</genus>
137
                                                <specific_epithet>$specificEpithet</specific_epithet>
138
                                            </taxonverbatim>
139
                                        </taxonverbatim_id>
140
                                    </taxondetermination>
141
                                </taxonoccurrence>
142
                            </locationevent>
141 143
                        </locationevent>
142 144
                        <locationnarrative>
143 145
                            <_merge>

Also available in: Unified diff