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
                        <accessconditions>$rights</accessconditions>
11 11
                        <locationevent>
12
                            <taxonoccurrence>
13
                                <taxondetermination>
14
                                    <taxonverbatim_id>
15
                                        <taxonverbatim>
16
                                            <taxonlabel_id>
17
                                                <taxonlabel>
18
                                                    <parent_id>
19
                                                        <taxonlabel>
20
                                                            <rank>$taxonRank</rank>
21
                                                            <parent_id>
22
                                                                <taxonlabel>
23
                                                                    <rank>cultivar</rank>
24
                                                                    <parent_id>
25
                                                                        <taxonlabel>
26
                                                                            <rank>forma</rank>
27
                                                                            <parent_id>
28
                                                                                <taxonlabel>
29
                                                                                    <rank>variety</rank>
30
                                                                                    <parent_id>
31
                                                                                        <taxonlabel>
32
                                                                                            <rank>subspecies</rank>
33
                                                                                            <parent_id>
34
                                                                                                <taxonlabel>
35
                                                                                                    <rank>species</rank>
36
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
37
                                                                                                    <parent_id>
38
                                                                                                        <taxonlabel>
39
                                                                                                            <rank>genus</rank>
40
                                                                                                            <taxonepithet>$genus</taxonepithet>
41
                                                                                                            <parent_id>
42
                                                                                                                <taxonlabel>
43
                                                                                                                    <rank>family</rank>
44
                                                                                                                    <taxonepithet>$family</taxonepithet>
45
                                                                                                                    <parent_id>
46
                                                                                                                        <taxonlabel>
47
                                                                                                                            <rank>order</rank>
48
                                                                                                                            <taxonepithet>$order</taxonepithet>
49
                                                                                                                            <parent_id>
50
                                                                                                                                <taxonlabel>
51
                                                                                                                                    <rank>class</rank>
52
                                                                                                                                    <taxonepithet>$class</taxonepithet>
53
                                                                                                                                    <parent_id>
54
                                                                                                                                        <taxonlabel>
55
                                                                                                                                            <rank>phylum</rank>
56
                                                                                                                                            <parent_id>
57
                                                                                                                                                <taxonlabel>
58
                                                                                                                                                    <rank>kingdom</rank>
59
                                                                                                                                                    <taxonepithet>$kingdom</taxonepithet>
60
                                                                                                                                                </taxonlabel>
61
                                                                                                                                            </parent_id>
62
                                                                                                                                        </taxonlabel>
63
                                                                                                                                    </parent_id>
64
                                                                                                                                </taxonlabel>
65
                                                                                                                            </parent_id>
66
                                                                                                                        </taxonlabel>
67
                                                                                                                    </parent_id>
68
                                                                                                                </taxonlabel>
69
                                                                                                            </parent_id>
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
                                                            <taxonepithet>$infraspecificEpithet</taxonepithet>
83
                                                        </taxonlabel>
84
                                                    </parent_id>
85
                                                    <rank>$taxonRank</rank>
86
                                                    <sourceaccessioncode>$taxonID</sourceaccessioncode>
87
                                                    <taxonconcept><concept_reference_id><source><shortname>$nameAccordingTo</shortname></source></concept_reference_id></taxonconcept>
88
                                                    <taxonomicname>
89
                                                        <_merge_prefix>
90
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
91
                                                            <value>
92
                                                                <_alt>
93
                                                                    <1>$scientificName</1>
94
                                                                    <2>
95
                                                                        <_join_words>
96
                                                                            <1>
97
                                                                                <_join_words>
98
                                                                                    <2><_filter_genus><value>$genus</value></_filter_genus></2>
99
                                                                                    <3>$specificEpithet</3>
100
                                                                                    <5>
101
                                                                                        <_join_words>
102
                                                                                            <1>
103
                                                                                                <_if name="if has infraspecificEpithet">
104
                                                                                                    <cond>$infraspecificEpithet</cond>
105
                                                                                                    <then>$taxonRank</then>
106
                                                                                                </_if>
107
                                                                                            </1>
108
                                                                                            <2>$infraspecificEpithet</2>
109
                                                                                        </_join_words>
110
                                                                                    </5>
111
                                                                                </_join_words>
112
                                                                            </1>
113
                                                                            <2>$scientificNameAuthorship</2>
114
                                                                        </_join_words>
115
                                                                    </2>
116
                                                                </_alt>
117
                                                            </value>
118
                                                        </_merge_prefix>
119
                                                    </taxonomicname>
120
                                                    <taxonstatus>$taxonomicStatus</taxonstatus>
121
                                                </taxonlabel>
122
                                            </taxonlabel_id>
123
                                            <author>$scientificNameAuthorship</author>
124
                                            <family>$family</family>
125
                                            <genus>$genus</genus>
126
                                            <specific_epithet>$specificEpithet</specific_epithet>
127
                                            <taxonomicname>$scientificName</taxonomicname>
128
                                            <verbatimrank>$taxonRank</verbatimrank>
129
                                        </taxonverbatim>
130
                                    </taxonverbatim_id>
131
                                </taxondetermination>
132
                            </taxonoccurrence>
12
                            <locationevent fkey="parent_id">
13
                                <taxonoccurrence>
14
                                    <taxondetermination>
15
                                        <taxonverbatim_id>
16
                                            <taxonverbatim>
17
                                                <taxonlabel_id>
18
                                                    <taxonlabel>
19
                                                        <parent_id>
20
                                                            <taxonlabel>
21
                                                                <rank>$taxonRank</rank>
22
                                                                <parent_id>
23
                                                                    <taxonlabel>
24
                                                                        <rank>cultivar</rank>
25
                                                                        <parent_id>
26
                                                                            <taxonlabel>
27
                                                                                <rank>forma</rank>
28
                                                                                <parent_id>
29
                                                                                    <taxonlabel>
30
                                                                                        <rank>variety</rank>
31
                                                                                        <parent_id>
32
                                                                                            <taxonlabel>
33
                                                                                                <rank>subspecies</rank>
34
                                                                                                <parent_id>
35
                                                                                                    <taxonlabel>
36
                                                                                                        <rank>species</rank>
37
                                                                                                        <taxonepithet>$specificEpithet</taxonepithet>
38
                                                                                                        <parent_id>
39
                                                                                                            <taxonlabel>
40
                                                                                                                <rank>genus</rank>
41
                                                                                                                <taxonepithet>$genus</taxonepithet>
42
                                                                                                                <parent_id>
43
                                                                                                                    <taxonlabel>
44
                                                                                                                        <rank>family</rank>
45
                                                                                                                        <taxonepithet>$family</taxonepithet>
46
                                                                                                                        <parent_id>
47
                                                                                                                            <taxonlabel>
48
                                                                                                                                <rank>order</rank>
49
                                                                                                                                <taxonepithet>$order</taxonepithet>
50
                                                                                                                                <parent_id>
51
                                                                                                                                    <taxonlabel>
52
                                                                                                                                        <rank>class</rank>
53
                                                                                                                                        <taxonepithet>$class</taxonepithet>
54
                                                                                                                                        <parent_id>
55
                                                                                                                                            <taxonlabel>
56
                                                                                                                                                <rank>phylum</rank>
57
                                                                                                                                                <parent_id>
58
                                                                                                                                                    <taxonlabel>
59
                                                                                                                                                        <rank>kingdom</rank>
60
                                                                                                                                                        <taxonepithet>$kingdom</taxonepithet>
61
                                                                                                                                                    </taxonlabel>
62
                                                                                                                                                </parent_id>
63
                                                                                                                                            </taxonlabel>
64
                                                                                                                                        </parent_id>
65
                                                                                                                                    </taxonlabel>
66
                                                                                                                                </parent_id>
67
                                                                                                                            </taxonlabel>
68
                                                                                                                        </parent_id>
69
                                                                                                                    </taxonlabel>
70
                                                                                                                </parent_id>
71
                                                                                                            </taxonlabel>
72
                                                                                                        </parent_id>
73
                                                                                                    </taxonlabel>
74
                                                                                                </parent_id>
75
                                                                                            </taxonlabel>
76
                                                                                        </parent_id>
77
                                                                                    </taxonlabel>
78
                                                                                </parent_id>
79
                                                                            </taxonlabel>
80
                                                                        </parent_id>
81
                                                                    </taxonlabel>
82
                                                                </parent_id>
83
                                                                <taxonepithet>$infraspecificEpithet</taxonepithet>
84
                                                            </taxonlabel>
85
                                                        </parent_id>
86
                                                        <rank>$taxonRank</rank>
87
                                                        <sourceaccessioncode>$taxonID</sourceaccessioncode>
88
                                                        <taxonconcept><concept_reference_id><source><shortname>$nameAccordingTo</shortname></source></concept_reference_id></taxonconcept>
89
                                                        <taxonomicname>
90
                                                            <_merge_prefix>
91
                                                                <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
92
                                                                <value>
93
                                                                    <_alt>
94
                                                                        <1>$scientificName</1>
95
                                                                        <2>
96
                                                                            <_join_words>
97
                                                                                <1>
98
                                                                                    <_join_words>
99
                                                                                        <2><_filter_genus><value>$genus</value></_filter_genus></2>
100
                                                                                        <3>$specificEpithet</3>
101
                                                                                        <5>
102
                                                                                            <_join_words>
103
                                                                                                <1>
104
                                                                                                    <_if name="if has infraspecificEpithet">
105
                                                                                                        <cond>$infraspecificEpithet</cond>
106
                                                                                                        <then>$taxonRank</then>
107
                                                                                                    </_if>
108
                                                                                                </1>
109
                                                                                                <2>$infraspecificEpithet</2>
110
                                                                                            </_join_words>
111
                                                                                        </5>
112
                                                                                    </_join_words>
113
                                                                                </1>
114
                                                                                <2>$scientificNameAuthorship</2>
115
                                                                            </_join_words>
116
                                                                        </2>
117
                                                                    </_alt>
118
                                                                </value>
119
                                                            </_merge_prefix>
120
                                                        </taxonomicname>
121
                                                        <taxonstatus>$taxonomicStatus</taxonstatus>
122
                                                    </taxonlabel>
123
                                                </taxonlabel_id>
124
                                                <author>$scientificNameAuthorship</author>
125
                                                <family>$family</family>
126
                                                <genus>$genus</genus>
127
                                                <specific_epithet>$specificEpithet</specific_epithet>
128
                                                <taxonomicname>$scientificName</taxonomicname>
129
                                                <verbatimrank>$taxonRank</verbatimrank>
130
                                            </taxonverbatim>
131
                                        </taxonverbatim_id>
132
                                    </taxondetermination>
133
                                </taxonoccurrence>
134
                            </locationevent>
133 135
                        </locationevent>
134 136
                    </location>
135 137
                </path>

Also available in: Unified diff