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
12 12
                        <elevation_m>$elevationInMeters</elevation_m>
13 13
                        <locationevent>
14 14
                            <authoreventcode>$authorEventCode</authoreventcode>
15
                            <locationevent fkey="parent_id">
16
                                <taxonoccurrence>
17
                                    <aggregateoccurrence>
18
                                        <count>$individualCount</count>
19
                                        <plantobservation>
20
                                            <specimenreplicate><sourceaccessioncode>$occurrenceID</sourceaccessioncode></specimenreplicate>
21
                                            <stemobservation><diameterbreastheight_m><_cm_to_m><value>$diameterBreastHeight_cm</value></_cm_to_m></diameterbreastheight_m></stemobservation>
22
                                        </plantobservation>
23
                                    </aggregateoccurrence>
24
                                    <growthform>$growthForm</growthform>
25
                                    <sourceaccessioncode>$occurrenceID</sourceaccessioncode>
26
                                    <taxondetermination>
27
                                        <taxonverbatim_id>
28
                                            <taxonverbatim>
29
                                                <taxonlabel_id>
30
                                                    <taxonlabel>
31
                                                        <parent_id>
32
                                                            <taxonlabel>
33
                                                                <parent_id>
34
                                                                    <taxonlabel>
35
                                                                        <rank>cultivar</rank>
36
                                                                        <parent_id>
37
                                                                            <taxonlabel>
38
                                                                                <rank>forma</rank>
39
                                                                                <parent_id>
40
                                                                                    <taxonlabel>
41
                                                                                        <rank>variety</rank>
42
                                                                                        <parent_id>
43
                                                                                            <taxonlabel>
44
                                                                                                <rank>subspecies</rank>
45
                                                                                                <taxonepithet>$subspecies</taxonepithet>
46
                                                                                                <parent_id>
47
                                                                                                    <taxonlabel>
48
                                                                                                        <rank>species</rank>
49
                                                                                                        <taxonepithet>$specificEpithet</taxonepithet>
50
                                                                                                        <parent_id>
51
                                                                                                            <taxonlabel>
52
                                                                                                                <rank>genus</rank>
53
                                                                                                                <taxonepithet>$genus</taxonepithet>
54
                                                                                                            </taxonlabel>
55
                                                                                                        </parent_id>
56
                                                                                                    </taxonlabel>
57
                                                                                                </parent_id>
58
                                                                                            </taxonlabel>
59
                                                                                        </parent_id>
60
                                                                                    </taxonlabel>
61
                                                                                </parent_id>
62
                                                                            </taxonlabel>
63
                                                                        </parent_id>
64
                                                                    </taxonlabel>
65
                                                                </parent_id>
66
                                                            </taxonlabel>
67
                                                        </parent_id>
68
                                                        <taxonomicname>
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
                                                        </taxonomicname>
75
                                                    </taxonlabel>
76
                                                </taxonlabel_id>
77
                                                <genus>$genus</genus>
78
                                                <specific_epithet>$specificEpithet</specific_epithet>
79
                                            </taxonverbatim>
80
                                        </taxonverbatim_id>
81
                                    </taxondetermination>
82
                                </taxonoccurrence>
83
                            </locationevent>
15 84
                            <obsenddate>$endDate</obsenddate>
16 85
                            <obsstartdate>$startDate</obsstartdate>
17
                            <taxonoccurrence>
18
                                <aggregateoccurrence>
19
                                    <count>$individualCount</count>
20
                                    <plantobservation>
21
                                        <specimenreplicate><sourceaccessioncode>$occurrenceID</sourceaccessioncode></specimenreplicate>
22
                                        <stemobservation><diameterbreastheight_m><_cm_to_m><value>$diameterBreastHeight_cm</value></_cm_to_m></diameterbreastheight_m></stemobservation>
23
                                    </plantobservation>
24
                                </aggregateoccurrence>
25
                                <growthform>$growthForm</growthform>
26
                                <sourceaccessioncode>$occurrenceID</sourceaccessioncode>
27
                                <taxondetermination>
28
                                    <taxonverbatim_id>
29
                                        <taxonverbatim>
30
                                            <taxonlabel_id>
31
                                                <taxonlabel>
32
                                                    <parent_id>
33
                                                        <taxonlabel>
34
                                                            <parent_id>
35
                                                                <taxonlabel>
36
                                                                    <rank>cultivar</rank>
37
                                                                    <parent_id>
38
                                                                        <taxonlabel>
39
                                                                            <rank>forma</rank>
40
                                                                            <parent_id>
41
                                                                                <taxonlabel>
42
                                                                                    <rank>variety</rank>
43
                                                                                    <parent_id>
44
                                                                                        <taxonlabel>
45
                                                                                            <rank>subspecies</rank>
46
                                                                                            <taxonepithet>$subspecies</taxonepithet>
47
                                                                                            <parent_id>
48
                                                                                                <taxonlabel>
49
                                                                                                    <rank>species</rank>
50
                                                                                                    <taxonepithet>$specificEpithet</taxonepithet>
51
                                                                                                    <parent_id>
52
                                                                                                        <taxonlabel>
53
                                                                                                            <rank>genus</rank>
54
                                                                                                            <taxonepithet>$genus</taxonepithet>
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
                                                                </taxonlabel>
66
                                                            </parent_id>
67
                                                        </taxonlabel>
68
                                                    </parent_id>
69
                                                    <taxonomicname>
70
                                                        <_join_words>
71
                                                            <2><_filter_genus><value>$genus</value></_filter_genus></2>
72
                                                            <3>$specificEpithet</3>
73
                                                            <4>$subspecies</4>
74
                                                        </_join_words>
75
                                                    </taxonomicname>
76
                                                </taxonlabel>
77
                                            </taxonlabel_id>
78
                                            <genus>$genus</genus>
79
                                            <specific_epithet>$specificEpithet</specific_epithet>
80
                                        </taxonverbatim>
81
                                    </taxonverbatim_id>
82
                                </taxondetermination>
83
                            </taxonoccurrence>
84 86
                        </locationevent>
85 87
                        <locationplace>
86 88
                            <place_id>

Also available in: Unified diff