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
10 10
                        <sourceaccessioncode>$locationID</sourceaccessioncode>
11 11
                        <locationevent>
12 12
                            <sourceaccessioncode>$eventID</sourceaccessioncode>
13
                            <taxonoccurrence>
14
                                <sourceaccessioncode>$taxonOccurrenceID</sourceaccessioncode>
15
                                <taxondetermination>
16
                                    <taxonverbatim_id>
17
                                        <taxonverbatim>
18
                                            <taxonlabel_id>
19
                                                <taxonlabel>
20
                                                    <parent_id>
21
                                                        <taxonlabel>
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
                                                                                            <taxonepithet>$subspecies</taxonepithet>
35
                                                                                            <parent_id>
36
                                                                                                <taxonlabel>
37
                                                                                                    <rank>species</rank>
38
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
39
                                                                                                    <parent_id>
40
                                                                                                        <taxonlabel>
41
                                                                                                            <rank>genus</rank>
42
                                                                                                            <taxonepithet>$genus</taxonepithet>
43
                                                                                                            <parent_id>
44
                                                                                                                <taxonlabel>
45
                                                                                                                    <rank>family</rank>
46
                                                                                                                    <taxonepithet>$family</taxonepithet>
47
                                                                                                                </taxonlabel>
48
                                                                                                            </parent_id>
49
                                                                                                        </taxonlabel>
50
                                                                                                    </parent_id>
51
                                                                                                </taxonlabel>
52
                                                                                            </parent_id>
53
                                                                                        </taxonlabel>
54
                                                                                    </parent_id>
55
                                                                                </taxonlabel>
56
                                                                            </parent_id>
57
                                                                        </taxonlabel>
58
                                                                    </parent_id>
59
                                                                </taxonlabel>
60
                                                            </parent_id>
61
                                                        </taxonlabel>
62
                                                    </parent_id>
63
                                                    <taxonomicname>
64
                                                        <_merge_prefix>
65
                                                            <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
66
                                                            <value>
67
                                                                <_join_words>
68
                                                                    <1>
69
                                                                        <_join_words>
70
                                                                            <2><_filter_genus><value>$genus</value></_filter_genus></2>
71
                                                                            <3>$specificEpithet</3>
72
                                                                            <4>$subspecies</4>
73
                                                                        </_join_words>
74
                                                                    </1>
75
                                                                    <2>$scientificNameAuthorship</2>
76
                                                                </_join_words>
77
                                                            </value>
78
                                                        </_merge_prefix>
79
                                                    </taxonomicname>
80
                                                </taxonlabel>
81
                                            </taxonlabel_id>
82
                                            <author>$scientificNameAuthorship</author>
83
                                            <family>$family</family>
84
                                            <genus>$genus</genus>
85
                                            <specific_epithet>$specificEpithet</specific_epithet>
86
                                        </taxonverbatim>
87
                                    </taxonverbatim_id>
88
                                </taxondetermination>
89
                            </taxonoccurrence>
13
                            <locationevent fkey="parent_id">
14
                                <sourceaccessioncode>$eventID</sourceaccessioncode>
15
                                <taxonoccurrence>
16
                                    <sourceaccessioncode>$taxonOccurrenceID</sourceaccessioncode>
17
                                    <taxondetermination>
18
                                        <taxonverbatim_id>
19
                                            <taxonverbatim>
20
                                                <taxonlabel_id>
21
                                                    <taxonlabel>
22
                                                        <parent_id>
23
                                                            <taxonlabel>
24
                                                                <parent_id>
25
                                                                    <taxonlabel>
26
                                                                        <rank>cultivar</rank>
27
                                                                        <parent_id>
28
                                                                            <taxonlabel>
29
                                                                                <rank>forma</rank>
30
                                                                                <parent_id>
31
                                                                                    <taxonlabel>
32
                                                                                        <rank>variety</rank>
33
                                                                                        <parent_id>
34
                                                                                            <taxonlabel>
35
                                                                                                <rank>subspecies</rank>
36
                                                                                                <taxonepithet>$subspecies</taxonepithet>
37
                                                                                                <parent_id>
38
                                                                                                    <taxonlabel>
39
                                                                                                        <rank>species</rank>
40
                                                                                                        <taxonepithet>$specificEpithet</taxonepithet>
41
                                                                                                        <parent_id>
42
                                                                                                            <taxonlabel>
43
                                                                                                                <rank>genus</rank>
44
                                                                                                                <taxonepithet>$genus</taxonepithet>
45
                                                                                                                <parent_id>
46
                                                                                                                    <taxonlabel>
47
                                                                                                                        <rank>family</rank>
48
                                                                                                                        <taxonepithet>$family</taxonepithet>
49
                                                                                                                    </taxonlabel>
50
                                                                                                                </parent_id>
51
                                                                                                            </taxonlabel>
52
                                                                                                        </parent_id>
53
                                                                                                    </taxonlabel>
54
                                                                                                </parent_id>
55
                                                                                            </taxonlabel>
56
                                                                                        </parent_id>
57
                                                                                    </taxonlabel>
58
                                                                                </parent_id>
59
                                                                            </taxonlabel>
60
                                                                        </parent_id>
61
                                                                    </taxonlabel>
62
                                                                </parent_id>
63
                                                            </taxonlabel>
64
                                                        </parent_id>
65
                                                        <taxonomicname>
66
                                                            <_merge_prefix>
67
                                                                <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
68
                                                                <value>
69
                                                                    <_join_words>
70
                                                                        <1>
71
                                                                            <_join_words>
72
                                                                                <2><_filter_genus><value>$genus</value></_filter_genus></2>
73
                                                                                <3>$specificEpithet</3>
74
                                                                                <4>$subspecies</4>
75
                                                                            </_join_words>
76
                                                                        </1>
77
                                                                        <2>$scientificNameAuthorship</2>
78
                                                                    </_join_words>
79
                                                                </value>
80
                                                            </_merge_prefix>
81
                                                        </taxonomicname>
82
                                                    </taxonlabel>
83
                                                </taxonlabel_id>
84
                                                <author>$scientificNameAuthorship</author>
85
                                                <family>$family</family>
86
                                                <genus>$genus</genus>
87
                                                <specific_epithet>$specificEpithet</specific_epithet>
88
                                            </taxonverbatim>
89
                                        </taxonverbatim_id>
90
                                    </taxondetermination>
91
                                </taxonoccurrence>
92
                            </locationevent>
90 93
                        </locationevent>
91 94
                    </location>
92 95
                </path>

Also available in: Unified diff