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
24 24
                            </_locationnarrative_is_cultivated>
25 25
                        </iscultivated>
26 26
                        <locationevent>
27
                            <taxonoccurrence>
28
                                <aggregateoccurrence>
29
                                    <collectiondate>
30
                                        <_date>
31
                                            <day>
32
                                                <_nullIf>
33
                                                    <null>0</null>
34
                                                    <type>float</type>
35
                                                    <value>$dayCollected</value>
36
                                                </_nullIf>
37
                                            </day>
38
                                            <month>
39
                                                <_nullIf>
40
                                                    <null>0</null>
41
                                                    <type>float</type>
42
                                                    <value>$monthCollected</value>
43
                                                </_nullIf>
44
                                            </month>
45
                                            <year>
46
                                                <_nullIf>
47
                                                    <null>0</null>
48
                                                    <type>float</type>
49
                                                    <value>$yearCollected</value>
50
                                                </_nullIf>
51
                                            </year>
52
                                        </_date>
53
                                    </collectiondate>
54
                                    <plantobservation>
55
                                        <specimenreplicate>
56
                                            <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
57
                                            <institution_id>
58
                                                <sourcelist>
59
                                                    <name>$specimenHolderInstitutions</name>
60
                                                    <sourcename>
61
                                                        <name>
62
                                                            <_split>
63
                                                                <separator>[,;] *</separator>
64
                                                                <value>$specimenHolderInstitutions</value>
65
                                                            </_split>
66
                                                        </name>
67
                                                    </sourcename>
68
                                                </sourcelist>
69
                                            </institution_id>
70
                                        </specimenreplicate>
71
                                    </plantobservation>
72
                                </aggregateoccurrence>
73
                                <collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
74
                                <taxondetermination>
75
                                    <taxonverbatim_id>
76
                                        <taxonverbatim>
77
                                            <taxonlabel_id>
78
                                                <taxonlabel>
79
                                                    <parent_id>
80
                                                        <taxonlabel>
81
                                                            <parent_id>
82
                                                                <taxonlabel>
83
                                                                    <rank>cultivar</rank>
84
                                                                    <parent_id>
85
                                                                        <taxonlabel>
86
                                                                            <rank>forma</rank>
87
                                                                            <parent_id>
88
                                                                                <taxonlabel>
89
                                                                                    <rank>variety</rank>
90
                                                                                    <parent_id>
91
                                                                                        <taxonlabel>
92
                                                                                            <rank>subspecies</rank>
93
                                                                                            <parent_id>
94
                                                                                                <taxonlabel>
95
                                                                                                    <rank>species</rank>
96
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
97
                                                                                                    <parent_id>
98
                                                                                                        <taxonlabel>
99
                                                                                                            <rank>genus</rank>
100
                                                                                                            <taxonepithet>$genus</taxonepithet>
101
                                                                                                            <parent_id>
102
                                                                                                                <taxonlabel>
103
                                                                                                                    <rank>family</rank>
104
                                                                                                                    <taxonepithet>$family</taxonepithet>
105
                                                                                                                </taxonlabel>
106
                                                                                                            </parent_id>
107
                                                                                                        </taxonlabel>
108
                                                                                                    </parent_id>
109
                                                                                                </taxonlabel>
110
                                                                                            </parent_id>
111
                                                                                        </taxonlabel>
112
                                                                                    </parent_id>
113
                                                                                </taxonlabel>
114
                                                                            </parent_id>
115
                                                                        </taxonlabel>
116
                                                                    </parent_id>
117
                                                                </taxonlabel>
118
                                                            </parent_id>
119
                                                        </taxonlabel>
120
                                                    </parent_id>
121
                                                    <taxonomicname>
122
                                                        <_merge_prefix>
123
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
124
                                                            <value>
125
                                                                <_join_words>
126
                                                                    <2><_filter_genus><value>$genus</value></_filter_genus></2>
127
                                                                    <3>$specificEpithet</3>
128
                                                                </_join_words>
129
                                                            </value>
130
                                                        </_merge_prefix>
131
                                                    </taxonomicname>
132
                                                </taxonlabel>
133
                                            </taxonlabel_id>
134
                                            <family>$family</family>
135
                                            <genus>$genus</genus>
136
                                            <specific_epithet>$specificEpithet</specific_epithet>
137
                                        </taxonverbatim>
138
                                    </taxonverbatim_id>
139
                                </taxondetermination>
140
                            </taxonoccurrence>
27
                            <locationevent fkey="parent_id">
28
                                <taxonoccurrence>
29
                                    <aggregateoccurrence>
30
                                        <collectiondate>
31
                                            <_date>
32
                                                <day>
33
                                                    <_nullIf>
34
                                                        <null>0</null>
35
                                                        <type>float</type>
36
                                                        <value>$dayCollected</value>
37
                                                    </_nullIf>
38
                                                </day>
39
                                                <month>
40
                                                    <_nullIf>
41
                                                        <null>0</null>
42
                                                        <type>float</type>
43
                                                        <value>$monthCollected</value>
44
                                                    </_nullIf>
45
                                                </month>
46
                                                <year>
47
                                                    <_nullIf>
48
                                                        <null>0</null>
49
                                                        <type>float</type>
50
                                                        <value>$yearCollected</value>
51
                                                    </_nullIf>
52
                                                </year>
53
                                            </_date>
54
                                        </collectiondate>
55
                                        <plantobservation>
56
                                            <specimenreplicate>
57
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
58
                                                <institution_id>
59
                                                    <sourcelist>
60
                                                        <name>$specimenHolderInstitutions</name>
61
                                                        <sourcename>
62
                                                            <name>
63
                                                                <_split>
64
                                                                    <separator>[,;] *</separator>
65
                                                                    <value>$specimenHolderInstitutions</value>
66
                                                                </_split>
67
                                                            </name>
68
                                                        </sourcename>
69
                                                    </sourcelist>
70
                                                </institution_id>
71
                                            </specimenreplicate>
72
                                        </plantobservation>
73
                                    </aggregateoccurrence>
74
                                    <collector_id><party><fullname>$recordedBy</fullname></party></collector_id>
75
                                    <taxondetermination>
76
                                        <taxonverbatim_id>
77
                                            <taxonverbatim>
78
                                                <taxonlabel_id>
79
                                                    <taxonlabel>
80
                                                        <parent_id>
81
                                                            <taxonlabel>
82
                                                                <parent_id>
83
                                                                    <taxonlabel>
84
                                                                        <rank>cultivar</rank>
85
                                                                        <parent_id>
86
                                                                            <taxonlabel>
87
                                                                                <rank>forma</rank>
88
                                                                                <parent_id>
89
                                                                                    <taxonlabel>
90
                                                                                        <rank>variety</rank>
91
                                                                                        <parent_id>
92
                                                                                            <taxonlabel>
93
                                                                                                <rank>subspecies</rank>
94
                                                                                                <parent_id>
95
                                                                                                    <taxonlabel>
96
                                                                                                        <rank>species</rank>
97
                                                                                                        <taxonepithet>$specificEpithet</taxonepithet>
98
                                                                                                        <parent_id>
99
                                                                                                            <taxonlabel>
100
                                                                                                                <rank>genus</rank>
101
                                                                                                                <taxonepithet>$genus</taxonepithet>
102
                                                                                                                <parent_id>
103
                                                                                                                    <taxonlabel>
104
                                                                                                                        <rank>family</rank>
105
                                                                                                                        <taxonepithet>$family</taxonepithet>
106
                                                                                                                    </taxonlabel>
107
                                                                                                                </parent_id>
108
                                                                                                            </taxonlabel>
109
                                                                                                        </parent_id>
110
                                                                                                    </taxonlabel>
111
                                                                                                </parent_id>
112
                                                                                            </taxonlabel>
113
                                                                                        </parent_id>
114
                                                                                    </taxonlabel>
115
                                                                                </parent_id>
116
                                                                            </taxonlabel>
117
                                                                        </parent_id>
118
                                                                    </taxonlabel>
119
                                                                </parent_id>
120
                                                            </taxonlabel>
121
                                                        </parent_id>
122
                                                        <taxonomicname>
123
                                                            <_merge_prefix>
124
                                                                <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
125
                                                                <value>
126
                                                                    <_join_words>
127
                                                                        <2><_filter_genus><value>$genus</value></_filter_genus></2>
128
                                                                        <3>$specificEpithet</3>
129
                                                                    </_join_words>
130
                                                                </value>
131
                                                            </_merge_prefix>
132
                                                        </taxonomicname>
133
                                                    </taxonlabel>
134
                                                </taxonlabel_id>
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