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
28 28
                                    <obsstartdate><_dateRangeStart><value>$Observation Date</value></_dateRangeStart></obsstartdate>
29 29
                                </locationevent>
30 30
                            </parent_id>
31
                            <locationevent fkey="parent_id">
32
                                <taxonoccurrence>
33
                                    <aggregateoccurrence>
34
                                        <collectiondate>$Observation Date</collectiondate>
35
                                        <plantobservation>
36
                                            <sourceaccessioncode>$Id</sourceaccessioncode>
37
                                            <stemobservation>
38
                                                <diameterbreastheight_m><_cm_to_m><value>$Diameter</value></_cm_to_m></diameterbreastheight_m>
39
                                                <tag>$Tree Number</tag>
40
                                                <xposition_m>$1ha Plot X Coordinate</xposition_m>
41
                                                <yposition_m>$1ha Plot Y Coordinate</yposition_m>
42
                                            </stemobservation>
43
                                        </plantobservation>
44
                                    </aggregateoccurrence>
45
                                    <authortaxoncode>$Tree Number</authortaxoncode>
46
                                    <collector_id><party><fullname>$Names of Collectors</fullname></party></collector_id>
47
                                    <sourceaccessioncode>$Id</sourceaccessioncode>
48
                                    <taxondetermination>
49
                                        <taxonverbatim_id>
50
                                            <taxonverbatim>
51
                                                <taxonlabel_id>
52
                                                    <taxonlabel>
53
                                                        <parent_id>
54
                                                            <taxonlabel>
55
                                                                <parent_id>
56
                                                                    <taxonlabel>
57
                                                                        <rank>cultivar</rank>
58
                                                                        <parent_id>
59
                                                                            <taxonlabel>
60
                                                                                <rank>forma</rank>
61
                                                                                <parent_id>
62
                                                                                    <taxonlabel>
63
                                                                                        <rank>variety</rank>
64
                                                                                        <parent_id>
65
                                                                                            <taxonlabel>
66
                                                                                                <rank>subspecies</rank>
67
                                                                                                <parent_id>
68
                                                                                                    <taxonlabel>
69
                                                                                                        <rank>species</rank>
70
                                                                                                        <taxonepithet>$Species</taxonepithet>
71
                                                                                                        <parent_id>
72
                                                                                                            <taxonlabel>
73
                                                                                                                <rank>genus</rank>
74
                                                                                                                <taxonepithet>$Genus</taxonepithet>
75
                                                                                                                <parent_id>
76
                                                                                                                    <taxonlabel>
77
                                                                                                                        <rank>family</rank>
78
                                                                                                                        <taxonepithet>$Family</taxonepithet>
79
                                                                                                                    </taxonlabel>
80
                                                                                                                </parent_id>
81
                                                                                                            </taxonlabel>
82
                                                                                                        </parent_id>
83
                                                                                                    </taxonlabel>
84
                                                                                                </parent_id>
85
                                                                                            </taxonlabel>
86
                                                                                        </parent_id>
87
                                                                                    </taxonlabel>
88
                                                                                </parent_id>
89
                                                                            </taxonlabel>
90
                                                                        </parent_id>
91
                                                                    </taxonlabel>
92
                                                                </parent_id>
93
                                                            </taxonlabel>
94
                                                        </parent_id>
95
                                                        <taxonomicname>
96
                                                            <_merge_prefix>
97
                                                                <prefix><_taxon_family_require_std><family>$Family</family></_taxon_family_require_std></prefix>
98
                                                                <value>
99
                                                                    <_join_words>
100
                                                                        <2><_filter_genus><value>$Genus</value></_filter_genus></2>
101
                                                                        <3>$Species</3>
102
                                                                    </_join_words>
103
                                                                </value>
104
                                                            </_merge_prefix>
105
                                                        </taxonomicname>
106
                                                    </taxonlabel>
107
                                                </taxonlabel_id>
108
                                                <family>$Family</family>
109
                                                <genus>$Genus</genus>
110
                                                <specific_epithet>$Species</specific_epithet>
111
                                            </taxonverbatim>
112
                                        </taxonverbatim_id>
113
                                    </taxondetermination>
114
                                </taxonoccurrence>
115
                            </locationevent>
31 116
                            <obsenddate><_dateRangeEnd><value>$Observation Date</value></_dateRangeEnd></obsenddate>
32 117
                            <obsstartdate><_dateRangeStart><value>$Observation Date</value></_dateRangeStart></obsstartdate>
33
                            <taxonoccurrence>
34
                                <aggregateoccurrence>
35
                                    <collectiondate>$Observation Date</collectiondate>
36
                                    <plantobservation>
37
                                        <sourceaccessioncode>$Id</sourceaccessioncode>
38
                                        <stemobservation>
39
                                            <diameterbreastheight_m><_cm_to_m><value>$Diameter</value></_cm_to_m></diameterbreastheight_m>
40
                                            <tag>$Tree Number</tag>
41
                                            <xposition_m>$1ha Plot X Coordinate</xposition_m>
42
                                            <yposition_m>$1ha Plot Y Coordinate</yposition_m>
43
                                        </stemobservation>
44
                                    </plantobservation>
45
                                </aggregateoccurrence>
46
                                <authortaxoncode>$Tree Number</authortaxoncode>
47
                                <collector_id><party><fullname>$Names of Collectors</fullname></party></collector_id>
48
                                <sourceaccessioncode>$Id</sourceaccessioncode>
49
                                <taxondetermination>
50
                                    <taxonverbatim_id>
51
                                        <taxonverbatim>
52
                                            <taxonlabel_id>
53
                                                <taxonlabel>
54
                                                    <parent_id>
55
                                                        <taxonlabel>
56
                                                            <parent_id>
57
                                                                <taxonlabel>
58
                                                                    <rank>cultivar</rank>
59
                                                                    <parent_id>
60
                                                                        <taxonlabel>
61
                                                                            <rank>forma</rank>
62
                                                                            <parent_id>
63
                                                                                <taxonlabel>
64
                                                                                    <rank>variety</rank>
65
                                                                                    <parent_id>
66
                                                                                        <taxonlabel>
67
                                                                                            <rank>subspecies</rank>
68
                                                                                            <parent_id>
69
                                                                                                <taxonlabel>
70
                                                                                                    <rank>species</rank>
71
                                                                                                    <taxonepithet>$Species</taxonepithet>
72
                                                                                                    <parent_id>
73
                                                                                                        <taxonlabel>
74
                                                                                                            <rank>genus</rank>
75
                                                                                                            <taxonepithet>$Genus</taxonepithet>
76
                                                                                                            <parent_id>
77
                                                                                                                <taxonlabel>
78
                                                                                                                    <rank>family</rank>
79
                                                                                                                    <taxonepithet>$Family</taxonepithet>
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
                                                                <_join_words>
101
                                                                    <2><_filter_genus><value>$Genus</value></_filter_genus></2>
102
                                                                    <3>$Species</3>
103
                                                                </_join_words>
104
                                                            </value>
105
                                                        </_merge_prefix>
106
                                                    </taxonomicname>
107
                                                </taxonlabel>
108
                                            </taxonlabel_id>
109
                                            <family>$Family</family>
110
                                            <genus>$Genus</genus>
111
                                            <specific_epithet>$Species</specific_epithet>
112
                                        </taxonverbatim>
113
                                    </taxonverbatim_id>
114
                                </taxondetermination>
115
                            </taxonoccurrence>
116 118
                        </locationevent>
117 119
                        <locationplace>
118 120
                            <place_id>

Also available in: Unified diff