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
11 11
                        <authorlocationcode>$Sub Plot</authorlocationcode>
12 12
                        <locationevent>
13 13
                            <project_id><project><projectname>$Project Abbreviation</projectname></project></project_id>
14
                            <taxonoccurrence>
15
                                <aggregateoccurrence>
16
                                    <plantobservation>
17
                                        <sourceaccessioncode>$Item Obs ID</sourceaccessioncode>
18
                                        <stemobservation>
19
                                            <diameterbreastheight_m><_cm_to_m><value>$Diameter</value></_cm_to_m></diameterbreastheight_m>
20
                                            <height_m>$Height</height_m>
21
                                            <tag>$Identifier</tag>
22
                                        </stemobservation>
23
                                    </plantobservation>
24
                                </aggregateoccurrence>
25
                                <authortaxoncode>$Identifier</authortaxoncode>
26
                                <growthform>
27
                                    <_map>
28
                                        <fern>forb</fern>
29
                                        <graminoid>grass</graminoid>
30
                                        <subshrub>shrub</subshrub>
31
                                        <treefern>forb</treefern>
32
                                        <woodymixed>woody</woodymixed>
33
                                        <unknown></unknown>
34
                                        <*>*</*>
35
                                        <value><_lowercase><value>$Taxon Growth Form</value></_lowercase></value>
36
                                    </_map>
37
                                </growthform>
38
                                <sourceaccessioncode>$Item Obs ID</sourceaccessioncode>
39
                                <taxondetermination>
40
                                    <taxonverbatim_id>
41
                                        <taxonverbatim>
42
                                            <taxonlabel_id>
43
                                                <taxonlabel>
44
                                                    <parent_id>
45
                                                        <taxonlabel>
46
                                                            <parent_id>
47
                                                                <taxonlabel>
48
                                                                    <rank>cultivar</rank>
49
                                                                    <parent_id>
50
                                                                        <taxonlabel>
51
                                                                            <rank>forma</rank>
52
                                                                            <parent_id>
53
                                                                                <taxonlabel>
54
                                                                                    <rank>variety</rank>
55
                                                                                    <parent_id>
56
                                                                                        <taxonlabel>
57
                                                                                            <rank>subspecies</rank>
58
                                                                                            <parent_id>
59
                                                                                                <taxonlabel>
60
                                                                                                    <rank>species</rank>
61
                                                                                                    <taxonepithet>$Species Name</taxonepithet>
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
                                                    <taxonomicname>$Species Name</taxonomicname>
75
                                                </taxonlabel>
76
                                            </taxonlabel_id>
77
                                            <specific_epithet>$Species Name</specific_epithet>
78
                                        </taxonverbatim>
79
                                    </taxonverbatim_id>
80
                                </taxondetermination>
81
                            </taxonoccurrence>
14
                            <locationevent fkey="parent_id">
15
                                <taxonoccurrence>
16
                                    <aggregateoccurrence>
17
                                        <plantobservation>
18
                                            <sourceaccessioncode>$Item Obs ID</sourceaccessioncode>
19
                                            <stemobservation>
20
                                                <diameterbreastheight_m><_cm_to_m><value>$Diameter</value></_cm_to_m></diameterbreastheight_m>
21
                                                <height_m>$Height</height_m>
22
                                                <tag>$Identifier</tag>
23
                                            </stemobservation>
24
                                        </plantobservation>
25
                                    </aggregateoccurrence>
26
                                    <authortaxoncode>$Identifier</authortaxoncode>
27
                                    <growthform>
28
                                        <_map>
29
                                            <fern>forb</fern>
30
                                            <graminoid>grass</graminoid>
31
                                            <subshrub>shrub</subshrub>
32
                                            <treefern>forb</treefern>
33
                                            <woodymixed>woody</woodymixed>
34
                                            <unknown></unknown>
35
                                            <*>*</*>
36
                                            <value><_lowercase><value>$Taxon Growth Form</value></_lowercase></value>
37
                                        </_map>
38
                                    </growthform>
39
                                    <sourceaccessioncode>$Item Obs ID</sourceaccessioncode>
40
                                    <taxondetermination>
41
                                        <taxonverbatim_id>
42
                                            <taxonverbatim>
43
                                                <taxonlabel_id>
44
                                                    <taxonlabel>
45
                                                        <parent_id>
46
                                                            <taxonlabel>
47
                                                                <parent_id>
48
                                                                    <taxonlabel>
49
                                                                        <rank>cultivar</rank>
50
                                                                        <parent_id>
51
                                                                            <taxonlabel>
52
                                                                                <rank>forma</rank>
53
                                                                                <parent_id>
54
                                                                                    <taxonlabel>
55
                                                                                        <rank>variety</rank>
56
                                                                                        <parent_id>
57
                                                                                            <taxonlabel>
58
                                                                                                <rank>subspecies</rank>
59
                                                                                                <parent_id>
60
                                                                                                    <taxonlabel>
61
                                                                                                        <rank>species</rank>
62
                                                                                                        <taxonepithet>$Species Name</taxonepithet>
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
                                                        <taxonomicname>$Species Name</taxonomicname>
76
                                                    </taxonlabel>
77
                                                </taxonlabel_id>
78
                                                <specific_epithet>$Species Name</specific_epithet>
79
                                            </taxonverbatim>
80
                                        </taxonverbatim_id>
81
                                    </taxondetermination>
82
                                </taxonoccurrence>
83
                            </locationevent>
82 84
                        </locationevent>
83 85
                    </location>
84 86
                </path>

Also available in: Unified diff