Project

General

Profile

« Previous | Next » 

Revision 3199

VegBIEN: Fixing import issue related to duplicate entries in tables with children, where when a new table entry duplicates an existing entry, the 1:1 tables of that table and those tables' children are not merged, causing them to become orphaned. It is described in detail at <https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/Import_issues#Merging-duplicates-with-children&gt;, including the rationale for this solution. Note that this is not a bug in column-based import, it applies to row-based import as well. This commit fixes the issue for specimenreplicate->taxonoccurrence.

View differences:

VegBIEN.specimens.xml.ref
1 1
<?xml version="1.0" ?>
2 2
<VegBIEN>
3 3
    <specimenreplicate id="0">
4
        <taxonoccurrence_id>
5
            <taxonoccurrence>
6
                <locationevent_id>
7
                    <locationevent>
8
                        <location_id>
9
                            <location>
10
                                <locationdetermination>
11
                                    <namedplace_id>
12
                                        <namedplace>
13
                                            <rank>continent</rank>
14
                                            <placename>NA</placename>
15
                                        </namedplace>
16
                                    </namedplace_id>
17
                                </locationdetermination>
18
                                <locationnarrative>Canada</locationnarrative>
19
                            </location>
20
                        </location_id>
21
                    </locationevent>
22
                </locationevent_id>
23
                <taxondetermination>
24
                    <isoriginal>true</isoriginal>
25
                    <iscurrent>true</iscurrent>
26
                    <role>identifier</role>
27
                    <plantconcept_id>
28
                        <plantconcept>
29
                            <plantname_id>
4
        <locationevent_id>
5
            <locationevent>
6
                <location_id>
7
                    <location>
8
                        <locationdetermination>
9
                            <namedplace_id>
10
                                <namedplace>
11
                                    <rank>continent</rank>
12
                                    <placename>NA</placename>
13
                                </namedplace>
14
                            </namedplace_id>
15
                        </locationdetermination>
16
                        <locationnarrative>Canada</locationnarrative>
17
                    </location>
18
                </location_id>
19
            </locationevent>
20
        </locationevent_id>
21
        <collectioncode_dwc>MT</collectioncode_dwc>
22
        <taxondetermination>
23
            <isoriginal>true</isoriginal>
24
            <iscurrent>true</iscurrent>
25
            <role>identifier</role>
26
            <plantconcept_id>
27
                <plantconcept>
28
                    <plantname_id>
29
                        <plantname>
30
                            <rank>genus</rank>
31
                            <plantname>Lycopodium</plantname>
32
                            <parent_id>
30 33
                                <plantname>
31
                                    <rank>genus</rank>
32
                                    <plantname>Lycopodium</plantname>
33
                                    <parent_id>
34
                                        <plantname>
35
                                            <rank>family</rank>
36
                                            <plantname>Lycopodiaceae</plantname>
37
                                        </plantname>
38
                                    </parent_id>
34
                                    <rank>family</rank>
35
                                    <plantname>Lycopodiaceae</plantname>
39 36
                                </plantname>
40
                            </plantname_id>
41
                        </plantconcept>
42
                    </plantconcept_id>
43
                </taxondetermination>
44
            </taxonoccurrence>
45
        </taxonoccurrence_id>
46
        <collectioncode_dwc>MT</collectioncode_dwc>
37
                            </parent_id>
38
                        </plantname>
39
                    </plantname_id>
40
                </plantconcept>
41
            </plantconcept_id>
42
        </taxondetermination>
47 43
        <datasource_id><party><organizationname>MT</organizationname></party></datasource_id>
48
        <sourceaccessioncode>1</sourceaccessioncode>
49 44
        <collectionnumber>urn:lsid:biocol.org:col:14437</collectionnumber>
50 45
        <institution_id><party><organizationname>Universit&#233; de Montr&#233;al Biodiversity Centre</organizationname></party></institution_id>
46
        <sourceaccessioncode>1</sourceaccessioncode>
51 47
    </specimenreplicate>
52 48
    <specimenreplicate id="1">
53
        <taxonoccurrence_id>
54
            <taxonoccurrence>
55
                <locationevent_id>
56
                    <locationevent>
57
                        <location_id>
58
                            <location>
59
                                <locationdetermination>
60
                                    <namedplace_id>
61
                                        <namedplace>
62
                                            <rank>continent</rank>
63
                                            <placename>NA</placename>
64
                                        </namedplace>
65
                                    </namedplace_id>
66
                                </locationdetermination>
67
                                <locationnarrative>Canada</locationnarrative>
68
                            </location>
69
                        </location_id>
70
                    </locationevent>
71
                </locationevent_id>
72
                <taxondetermination>
73
                    <isoriginal>true</isoriginal>
74
                    <iscurrent>true</iscurrent>
75
                    <role>identifier</role>
76
                    <plantconcept_id>
77
                        <plantconcept>
78
                            <plantname_id>
49
        <locationevent_id>
50
            <locationevent>
51
                <location_id>
52
                    <location>
53
                        <locationdetermination>
54
                            <namedplace_id>
55
                                <namedplace>
56
                                    <rank>continent</rank>
57
                                    <placename>NA</placename>
58
                                </namedplace>
59
                            </namedplace_id>
60
                        </locationdetermination>
61
                        <locationnarrative>Canada</locationnarrative>
62
                    </location>
63
                </location_id>
64
            </locationevent>
65
        </locationevent_id>
66
        <collectioncode_dwc>MT</collectioncode_dwc>
67
        <taxondetermination>
68
            <isoriginal>true</isoriginal>
69
            <iscurrent>true</iscurrent>
70
            <role>identifier</role>
71
            <plantconcept_id>
72
                <plantconcept>
73
                    <plantname_id>
74
                        <plantname>
75
                            <rank>genus</rank>
76
                            <plantname>Lycopodium</plantname>
77
                            <parent_id>
79 78
                                <plantname>
80
                                    <rank>genus</rank>
81
                                    <plantname>Lycopodium</plantname>
82
                                    <parent_id>
83
                                        <plantname>
84
                                            <rank>family</rank>
85
                                            <plantname>Lycopodiaceae</plantname>
86
                                        </plantname>
87
                                    </parent_id>
79
                                    <rank>family</rank>
80
                                    <plantname>Lycopodiaceae</plantname>
88 81
                                </plantname>
89
                            </plantname_id>
90
                        </plantconcept>
91
                    </plantconcept_id>
92
                </taxondetermination>
93
            </taxonoccurrence>
94
        </taxonoccurrence_id>
95
        <collectioncode_dwc>MT</collectioncode_dwc>
82
                            </parent_id>
83
                        </plantname>
84
                    </plantname_id>
85
                </plantconcept>
86
            </plantconcept_id>
87
        </taxondetermination>
96 88
        <datasource_id><party><organizationname>MT</organizationname></party></datasource_id>
97
        <sourceaccessioncode>2</sourceaccessioncode>
98 89
        <collectionnumber>urn:lsid:biocol.org:col:14437</collectionnumber>
99 90
        <institution_id><party><organizationname>Universit&#233; de Montr&#233;al Biodiversity Centre</organizationname></party></institution_id>
91
        <sourceaccessioncode>2</sourceaccessioncode>
100 92
    </specimenreplicate>
101 93
</VegBIEN>

Also available in: Unified diff