Project

General

Profile

« Previous | Next » 

Revision 12886

schemas/vegbien.sql: specimenreplicate.institution_id: renamed to duplicate_institutions_sourcelist_id, as decided in the conference calls (wiki.vegpath.org/2014-03-13_conference_call#schema-changes-2)

View differences:

trunk/mappings/VegCore-VegBIEN.csv
160 160
collectionURL,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectioncode_dwc/_alt/2,
161 161
voucherType,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left",
162 162
collectorNumber,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else",
163
accessionNumber,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
164
dataProviderRecordID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
165
occurrenceID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
166
specimen_duplicate_institutions,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/name/_first/2",
167
specimen_duplicate_institutions,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/name/_first/2/_split:[separator=""[,;] *""]/value",
163
accessionNumber,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
164
dataProviderRecordID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
165
occurrenceID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
166
specimen_duplicate_institutions,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/then/name/_first/2",
167
specimen_duplicate_institutions,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/name/_first/2/_split:[separator=""[,;] *""]/value",
168 168
dataProviderRecordID,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode,
169 169
occurrenceID,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode,
170 170
stemCount,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemcount,
trunk/inputs/HVAA/Specimen/test.xml.ref
101 101
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
102 102
                                                <collectioncode_dwc>$collection</collectioncode_dwc>
103 103
                                                <collectionnumber>$collectorNumber</collectionnumber>
104
                                                <institution_id>
104
                                                <duplicate_institutions_sourcelist_id>
105 105
                                                    <sourcelist>
106 106
                                                        <name>$specimen_duplicate_institutions</name>
107 107
                                                        <sourcename>
......
113 113
                                                            </name>
114 114
                                                        </sourcename>
115 115
                                                    </sourcelist>
116
                                                </institution_id>
116
                                                </duplicate_institutions_sourcelist_id>
117 117
                                                <sourceaccessioncode>$occurrenceID</sourceaccessioncode>
118 118
                                            </specimenreplicate>
119 119
                                        </plantobservation>
trunk/inputs/MT/Specimen/test.xml.ref
24 24
                                                        <2>$collectionURL</2>
25 25
                                                    </_alt>
26 26
                                                </collectioncode_dwc>
27
                                                <institution_id>
27
                                                <duplicate_institutions_sourcelist_id>
28 28
                                                    <sourcelist>
29 29
                                                        <name>$specimen_duplicate_institutions</name>
30 30
                                                        <sourcename>
......
36 36
                                                            </name>
37 37
                                                        </sourcename>
38 38
                                                    </sourcelist>
39
                                                </institution_id>
39
                                                </duplicate_institutions_sourcelist_id>
40 40
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
41 41
                                            </specimenreplicate>
42 42
                                        </plantobservation>
trunk/inputs/XAL/Specimen/test.xml.ref
67 67
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
68 68
                                                <collectioncode_dwc>$collection</collectioncode_dwc>
69 69
                                                <collectionnumber>$collectorNumber</collectionnumber>
70
                                                <institution_id>
70
                                                <duplicate_institutions_sourcelist_id>
71 71
                                                    <sourcelist>
72 72
                                                        <name>$specimen_duplicate_institutions</name>
73 73
                                                        <sourcename>
......
79 79
                                                            </name>
80 80
                                                        </sourcename>
81 81
                                                    </sourcelist>
82
                                                </institution_id>
82
                                                </duplicate_institutions_sourcelist_id>
83 83
                                            </specimenreplicate>
84 84
                                        </plantobservation>
85 85
                                    </aggregateoccurrence>
trunk/inputs/NCU/Specimen/test.xml.ref
32 32
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
33 33
                                                <collectioncode_dwc>$collectionURL</collectioncode_dwc>
34 34
                                                <collectionnumber>$collectorNumber</collectionnumber>
35
                                                <institution_id>
35
                                                <duplicate_institutions_sourcelist_id>
36 36
                                                    <sourcelist>
37 37
                                                        <name>$specimen_duplicate_institutions</name>
38 38
                                                        <sourcename>
......
44 44
                                                            </name>
45 45
                                                        </sourcename>
46 46
                                                    </sourcelist>
47
                                                </institution_id>
47
                                                </duplicate_institutions_sourcelist_id>
48 48
                                                <sourceaccessioncode>$occurrenceID</sourceaccessioncode>
49 49
                                            </specimenreplicate>
50 50
                                        </plantobservation>
trunk/inputs/ACAD/Specimen/test.xml.ref
60 60
                                                    </_alt>
61 61
                                                </collectioncode_dwc>
62 62
                                                <collectionnumber>$collectorNumber</collectionnumber>
63
                                                <institution_id>
63
                                                <duplicate_institutions_sourcelist_id>
64 64
                                                    <sourcelist>
65 65
                                                        <name>$specimen_duplicate_institutions</name>
66 66
                                                        <sourcename>
......
72 72
                                                            </name>
73 73
                                                        </sourcename>
74 74
                                                    </sourcelist>
75
                                                </institution_id>
75
                                                </duplicate_institutions_sourcelist_id>
76 76
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
77 77
                                            </specimenreplicate>
78 78
                                        </plantobservation>
trunk/inputs/WIN/Specimen/test.xml.ref
64 64
                                                    </_alt>
65 65
                                                </collectioncode_dwc>
66 66
                                                <collectionnumber>$collectorNumber</collectionnumber>
67
                                                <institution_id>
67
                                                <duplicate_institutions_sourcelist_id>
68 68
                                                    <sourcelist>
69 69
                                                        <name>$specimen_duplicate_institutions</name>
70 70
                                                        <sourcename>
......
76 76
                                                            </name>
77 77
                                                        </sourcename>
78 78
                                                    </sourcelist>
79
                                                </institution_id>
79
                                                </duplicate_institutions_sourcelist_id>
80 80
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
81 81
                                            </specimenreplicate>
82 82
                                        </plantobservation>
trunk/inputs/BRIT/specimen_flat/test.xml.ref
77 77
                                            <specimenreplicate>
78 78
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
79 79
                                                <collectionnumber>$collectorNumber</collectionnumber>
80
                                                <institution_id>
80
                                                <duplicate_institutions_sourcelist_id>
81 81
                                                    <sourcelist>
82 82
                                                        <name>$specimen_duplicate_institutions</name>
83 83
                                                        <sourcename>
......
89 89
                                                            </name>
90 90
                                                        </sourcename>
91 91
                                                    </sourcelist>
92
                                                </institution_id>
92
                                                </duplicate_institutions_sourcelist_id>
93 93
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
94 94
                                            </specimenreplicate>
95 95
                                            <stemobservation>
trunk/inputs/TEX/Specimen/test.xml.ref
44 44
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
45 45
                                                <collectioncode_dwc>$collection</collectioncode_dwc>
46 46
                                                <collectionnumber>$collectorNumber</collectionnumber>
47
                                                <institution_id>
47
                                                <duplicate_institutions_sourcelist_id>
48 48
                                                    <sourcelist>
49 49
                                                        <name>TEX</name>
50 50
                                                        <sourcename>
......
56 56
                                                            </name>
57 57
                                                        </sourcename>
58 58
                                                    </sourcelist>
59
                                                </institution_id>
59
                                                </duplicate_institutions_sourcelist_id>
60 60
                                            </specimenreplicate>
61 61
                                        </plantobservation>
62 62
                                    </aggregateoccurrence>
trunk/inputs/TEX/Specimen2/test.xml.ref
44 44
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
45 45
                                                <collectioncode_dwc>$collection</collectioncode_dwc>
46 46
                                                <collectionnumber>$collectorNumber</collectionnumber>
47
                                                <institution_id>
47
                                                <duplicate_institutions_sourcelist_id>
48 48
                                                    <sourcelist>
49 49
                                                        <name>TEX</name>
50 50
                                                        <sourcename>
......
56 56
                                                            </name>
57 57
                                                        </sourcename>
58 58
                                                    </sourcelist>
59
                                                </institution_id>
59
                                                </duplicate_institutions_sourcelist_id>
60 60
                                            </specimenreplicate>
61 61
                                        </plantobservation>
62 62
                                    </aggregateoccurrence>
trunk/inputs/U/Specimen/test.xml.ref
64 64
                                            <specimenreplicate>
65 65
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
66 66
                                                <collectionnumber>$collectorNumber</collectionnumber>
67
                                                <institution_id>
67
                                                <duplicate_institutions_sourcelist_id>
68 68
                                                    <sourcelist>
69 69
                                                        <name>U</name>
70 70
                                                        <sourcename>
......
76 76
                                                            </name>
77 77
                                                        </sourcename>
78 78
                                                    </sourcelist>
79
                                                </institution_id>
79
                                                </duplicate_institutions_sourcelist_id>
80 80
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
81 81
                                            </specimenreplicate>
82 82
                                        </plantobservation>
trunk/inputs/GBIF/raw_occurrence_record_plants/test.xml.ref
59 59
                                            <specimenreplicate>
60 60
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
61 61
                                                <collectioncode_dwc>$collection</collectioncode_dwc>
62
                                                <institution_id>
62
                                                <duplicate_institutions_sourcelist_id>
63 63
                                                    <sourcelist>
64 64
                                                        <name>$specimen_duplicate_institutions</name>
65 65
                                                        <sourcename>
......
71 71
                                                            </name>
72 72
                                                        </sourcename>
73 73
                                                    </sourcelist>
74
                                                </institution_id>
74
                                                </duplicate_institutions_sourcelist_id>
75 75
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
76 76
                                            </specimenreplicate>
77 77
                                        </plantobservation>
trunk/inputs/QFA/Specimen/test.xml.ref
59 59
                                                    </_alt>
60 60
                                                </collectioncode_dwc>
61 61
                                                <collectionnumber>$collectorNumber</collectionnumber>
62
                                                <institution_id>
62
                                                <duplicate_institutions_sourcelist_id>
63 63
                                                    <sourcelist>
64 64
                                                        <name>$specimen_duplicate_institutions</name>
65 65
                                                        <sourcename>
......
71 71
                                                            </name>
72 72
                                                        </sourcename>
73 73
                                                    </sourcelist>
74
                                                </institution_id>
74
                                                </duplicate_institutions_sourcelist_id>
75 75
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
76 76
                                            </specimenreplicate>
77 77
                                        </plantobservation>
trunk/inputs/JBM/Specimen/test.xml.ref
61 61
                                                    </_alt>
62 62
                                                </collectioncode_dwc>
63 63
                                                <collectionnumber>$collectorNumber</collectionnumber>
64
                                                <institution_id>
64
                                                <duplicate_institutions_sourcelist_id>
65 65
                                                    <sourcelist>
66 66
                                                        <name>$specimen_duplicate_institutions</name>
67 67
                                                        <sourcename>
......
73 73
                                                            </name>
74 74
                                                        </sourcename>
75 75
                                                    </sourcelist>
76
                                                </institution_id>
76
                                                </duplicate_institutions_sourcelist_id>
77 77
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
78 78
                                            </specimenreplicate>
79 79
                                        </plantobservation>
trunk/inputs/UBC/Specimen/test.xml.ref
59 59
                                                    </_alt>
60 60
                                                </collectioncode_dwc>
61 61
                                                <collectionnumber>$collectorNumber</collectionnumber>
62
                                                <institution_id>
62
                                                <duplicate_institutions_sourcelist_id>
63 63
                                                    <sourcelist>
64 64
                                                        <name>$specimen_duplicate_institutions</name>
65 65
                                                        <sourcename>
......
71 71
                                                            </name>
72 72
                                                        </sourcename>
73 73
                                                    </sourcelist>
74
                                                </institution_id>
74
                                                </duplicate_institutions_sourcelist_id>
75 75
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
76 76
                                            </specimenreplicate>
77 77
                                        </plantobservation>
trunk/inputs/SpeciesLink/Specimen/test.xml.ref
82 82
                                                    </_alt>
83 83
                                                </collectioncode_dwc>
84 84
                                                <collectionnumber>$collectorNumber</collectionnumber>
85
                                                <institution_id>
85
                                                <duplicate_institutions_sourcelist_id>
86 86
                                                    <sourcelist>
87 87
                                                        <name>$specimen_duplicate_institutions</name>
88 88
                                                        <sourcename>
......
94 94
                                                            </name>
95 95
                                                        </sourcename>
96 96
                                                    </sourcelist>
97
                                                </institution_id>
97
                                                </duplicate_institutions_sourcelist_id>
98 98
                                                <sourceaccessioncode>$occurrenceID</sourceaccessioncode>
99 99
                                            </specimenreplicate>
100 100
                                        </plantobservation>
trunk/inputs/HIBG/Specimen/test.xml.ref
60 60
                                                    </_alt>
61 61
                                                </collectioncode_dwc>
62 62
                                                <collectionnumber>$collectorNumber</collectionnumber>
63
                                                <institution_id>
63
                                                <duplicate_institutions_sourcelist_id>
64 64
                                                    <sourcelist>
65 65
                                                        <name>$specimen_duplicate_institutions</name>
66 66
                                                        <sourcename>
......
72 72
                                                            </name>
73 73
                                                        </sourcename>
74 74
                                                    </sourcelist>
75
                                                </institution_id>
75
                                                </duplicate_institutions_sourcelist_id>
76 76
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
77 77
                                            </specimenreplicate>
78 78
                                        </plantobservation>
trunk/inputs/bien_web/observation/test.xml.ref
22 22
                                            <authorplantcode>$collectorNumber</authorplantcode>
23 23
                                            <specimenreplicate>
24 24
                                                <collectionnumber>$collectorNumber</collectionnumber>
25
                                                <institution_id>
25
                                                <duplicate_institutions_sourcelist_id>
26 26
                                                    <sourcelist>
27 27
                                                        <name>$specimen_duplicate_institutions</name>
28 28
                                                        <sourcename>
......
34 34
                                                            </name>
35 35
                                                        </sourcename>
36 36
                                                    </sourcelist>
37
                                                </institution_id>
37
                                                </duplicate_institutions_sourcelist_id>
38 38
                                                <sourceaccessioncode>$occurrenceID</sourceaccessioncode>
39 39
                                            </specimenreplicate>
40 40
                                        </plantobservation>
trunk/inputs/NY/Ecatalog_all/test.xml.ref
76 76
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
77 77
                                                <collectioncode_dwc>$collection</collectioncode_dwc>
78 78
                                                <collectionnumber>$collectorNumber</collectionnumber>
79
                                                <institution_id>
79
                                                <duplicate_institutions_sourcelist_id>
80 80
                                                    <sourcelist>
81 81
                                                        <name>$specimen_duplicate_institutions</name>
82 82
                                                        <sourcename>
......
88 88
                                                            </name>
89 89
                                                        </sourcename>
90 90
                                                    </sourcelist>
91
                                                </institution_id>
91
                                                </duplicate_institutions_sourcelist_id>
92 92
                                            </specimenreplicate>
93 93
                                        </plantobservation>
94 94
                                    </aggregateoccurrence>
trunk/inputs/Madidi/IndividualObservation/test.xml.ref
45 45
                                            <specimenreplicate>
46 46
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
47 47
                                                <collectionnumber>$collectorNumber</collectionnumber>
48
                                                <institution_id>
48
                                                <duplicate_institutions_sourcelist_id>
49 49
                                                    <sourcelist>
50 50
                                                        <name>$specimen_duplicate_institutions</name>
51 51
                                                        <sourcename>
......
57 57
                                                            </name>
58 58
                                                        </sourcename>
59 59
                                                    </sourcelist>
60
                                                </institution_id>
60
                                                </duplicate_institutions_sourcelist_id>
61 61
                                            </specimenreplicate>
62 62
                                            <stemobservation>
63 63
                                                <authorstemcode>$authorStemCode</authorstemcode>
trunk/inputs/UNCC/Specimen/test.xml.ref
59 59
                                            <specimenreplicate>
60 60
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
61 61
                                                <collectionnumber>$collectorNumber</collectionnumber>
62
                                                <institution_id>
62
                                                <duplicate_institutions_sourcelist_id>
63 63
                                                    <sourcelist>
64 64
                                                        <name>UNCC</name>
65 65
                                                        <sourcename>
......
71 71
                                                            </name>
72 72
                                                        </sourcename>
73 73
                                                    </sourcelist>
74
                                                </institution_id>
74
                                                </duplicate_institutions_sourcelist_id>
75 75
                                            </specimenreplicate>
76 76
                                        </plantobservation>
77 77
                                    </aggregateoccurrence>
trunk/inputs/REMIB/Specimen/test.xml.ref
55 55
                                        <plantobservation>
56 56
                                            <specimenreplicate>
57 57
                                                <catalognumber_dwc>$accessionNumber</catalognumber_dwc>
58
                                                <institution_id>
58
                                                <duplicate_institutions_sourcelist_id>
59 59
                                                    <sourcelist>
60 60
                                                        <name>$specimen_duplicate_institutions</name>
61 61
                                                        <sourcename>
......
67 67
                                                            </name>
68 68
                                                        </sourcename>
69 69
                                                    </sourcelist>
70
                                                </institution_id>
70
                                                </duplicate_institutions_sourcelist_id>
71 71
                                            </specimenreplicate>
72 72
                                        </plantobservation>
73 73
                                    </aggregateoccurrence>
trunk/inputs/TRT/Specimen/test.xml.ref
79 79
                                                    </_alt>
80 80
                                                </collectioncode_dwc>
81 81
                                                <collectionnumber>$collectorNumber</collectionnumber>
82
                                                <institution_id>
82
                                                <duplicate_institutions_sourcelist_id>
83 83
                                                    <sourcelist>
84 84
                                                        <name>$specimen_duplicate_institutions</name>
85 85
                                                        <sourcename>
......
91 91
                                                            </name>
92 92
                                                        </sourcename>
93 93
                                                    </sourcelist>
94
                                                </institution_id>
94
                                                </duplicate_institutions_sourcelist_id>
95 95
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
96 96
                                            </specimenreplicate>
97 97
                                        </plantobservation>
trunk/inputs/MO/Specimen/test.xml.ref
49 49
                                            <reproductivecondition>$reproductiveCondition</reproductivecondition>
50 50
                                            <specimenreplicate>
51 51
                                                <collectionnumber>$collectorNumber</collectionnumber>
52
                                                <institution_id>
52
                                                <duplicate_institutions_sourcelist_id>
53 53
                                                    <sourcelist>
54 54
                                                        <name>$specimen_duplicate_institutions</name>
55 55
                                                        <sourcename>
......
61 61
                                                            </name>
62 62
                                                        </sourcename>
63 63
                                                    </sourcelist>
64
                                                </institution_id>
64
                                                </duplicate_institutions_sourcelist_id>
65 65
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
66 66
                                            </specimenreplicate>
67 67
                                        </plantobservation>
trunk/inputs/TRTE/Specimen/test.xml.ref
59 59
                                                    </_alt>
60 60
                                                </collectioncode_dwc>
61 61
                                                <collectionnumber>$collectorNumber</collectionnumber>
62
                                                <institution_id>
62
                                                <duplicate_institutions_sourcelist_id>
63 63
                                                    <sourcelist>
64 64
                                                        <name>$specimen_duplicate_institutions</name>
65 65
                                                        <sourcename>
......
71 71
                                                            </name>
72 72
                                                        </sourcename>
73 73
                                                    </sourcelist>
74
                                                </institution_id>
74
                                                </duplicate_institutions_sourcelist_id>
75 75
                                                <sourceaccessioncode>$dataProviderRecordID</sourceaccessioncode>
76 76
                                            </specimenreplicate>
77 77
                                        </plantobservation>
trunk/schemas/vegbien.my.sql
2964 2964
    source_id int(11) NOT NULL,
2965 2965
    sourceaccessioncode varchar(255),
2966 2966
    plantobservation_id int(11),
2967
    institution_id int(11),
2967
    duplicate_institutions_sourcelist_id int(11),
2968 2968
    collectioncode_dwc varchar(255),
2969 2969
    catalognumber_dwc varchar(255),
2970 2970
    collectionnumber varchar(255),
......
2981 2981

  
2982 2982

  
2983 2983
--
2984
-- Name: COLUMN specimenreplicate.institution_id; Type: COMMENT; Schema: public; Owner: -
2984
-- Name: COLUMN specimenreplicate.duplicate_institutions_sourcelist_id; Type: COMMENT; Schema: public; Owner: -
2985 2985
--
2986 2986

  
2987 2987

  
......
9497 9497

  
9498 9498

  
9499 9499
--
9500
-- Name: specimenreplicate_institution_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
9500
-- Name: specimenreplicate_duplicate_institutions_sourcelist_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
9501 9501
--
9502 9502

  
9503
CREATE INDEX specimenreplicate_institution_id_idx ON specimenreplicate  (institution_id);
9503
CREATE INDEX specimenreplicate_duplicate_institutions_sourcelist_id_idx ON specimenreplicate  (duplicate_institutions_sourcelist_id);
9504 9504

  
9505 9505

  
9506 9506
--
......
10720 10720

  
10721 10721

  
10722 10722
--
10723
-- Name: specimenreplicate_institution_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
10723
-- Name: specimenreplicate_duplicate_institutions_sourcelist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
10724 10724
--
10725 10725

  
10726 10726

  
trunk/schemas/vegbien.sql
5097 5097
    source_id integer NOT NULL,
5098 5098
    sourceaccessioncode text,
5099 5099
    plantobservation_id integer,
5100
    institution_id integer,
5100
    duplicate_institutions_sourcelist_id integer,
5101 5101
    collectioncode_dwc text,
5102 5102
    catalognumber_dwc text,
5103 5103
    collectionnumber text,
......
5117 5117

  
5118 5118

  
5119 5119
--
5120
-- Name: COLUMN specimenreplicate.institution_id; Type: COMMENT; Schema: public; Owner: -
5120
-- Name: COLUMN specimenreplicate.duplicate_institutions_sourcelist_id; Type: COMMENT; Schema: public; Owner: -
5121 5121
--
5122 5122

  
5123
COMMENT ON COLUMN specimenreplicate.institution_id IS '
5124
The institution (such as a museum) that the specimenreplicate is from.
5123
COMMENT ON COLUMN specimenreplicate.duplicate_institutions_sourcelist_id IS '
5124
The institution(s) (such as museums) that the specimenreplicate is from.
5125 5125
';
5126 5126

  
5127 5127

  
......
5471 5471
   LEFT JOIN plantobservation USING (aggregateoccurrence_id))
5472 5472
   LEFT JOIN stemobservation USING (plantobservation_id))
5473 5473
   LEFT JOIN specimenreplicate USING (plantobservation_id))
5474
   LEFT JOIN sourcelist ON ((sourcelist.sourcelist_id = specimenreplicate.institution_id)))
5474
   LEFT JOIN sourcelist ON ((sourcelist.sourcelist_id = specimenreplicate.duplicate_institutions_sourcelist_id)))
5475 5475
   LEFT JOIN taxondetermination ON (((taxondetermination.taxonoccurrence_id = taxonoccurrence.taxonoccurrence_id) AND taxondetermination.iscurrent)))
5476 5476
   LEFT JOIN party identifiedby ON ((identifiedby.party_id = taxondetermination.party_id)))
5477 5477
   LEFT JOIN taxonverbatim USING (taxonverbatim_id))
......
6829 6829
                    sourcename.matched_source_id AS dataset_id, 
6830 6830
                    count(*) AS records
6831 6831
                   FROM ((specimenreplicate
6832
              JOIN sourcelist ON ((sourcelist.sourcelist_id = specimenreplicate.institution_id)))
6832
              JOIN sourcelist ON ((sourcelist.sourcelist_id = specimenreplicate.duplicate_institutions_sourcelist_id)))
6833 6833
         JOIN sourcename USING (sourcelist_id))
6834 6834
        GROUP BY specimenreplicate.source_id, sourcename.name, sourcename.matched_source_id) s
6835 6835
      JOIN source dataprovider ON ((dataprovider.source_id = s.dataprovider_id)))
......
12616 12616

  
12617 12617

  
12618 12618
--
12619
-- Name: specimenreplicate_institution_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
12619
-- Name: specimenreplicate_duplicate_institutions_sourcelist_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
12620 12620
--
12621 12621

  
12622
CREATE INDEX specimenreplicate_institution_id_idx ON specimenreplicate USING btree (institution_id);
12622
CREATE INDEX specimenreplicate_duplicate_institutions_sourcelist_id_idx ON specimenreplicate USING btree (duplicate_institutions_sourcelist_id);
12623 12623

  
12624 12624

  
12625 12625
--
......
12654 12654
-- Name: specimenreplicate_unique_catalognumber; Type: INDEX; Schema: public; Owner: -; Tablespace: 
12655 12655
--
12656 12656

  
12657
CREATE UNIQUE INDEX specimenreplicate_unique_catalognumber ON specimenreplicate USING btree (source_id, (COALESCE(institution_id, 2147483647)), (COALESCE(collectioncode_dwc, '\N'::text)), (COALESCE(catalognumber_dwc, '\N'::text)), (COALESCE(plantobservation_id, 2147483647))) WHERE ((catalognumber_dwc IS NOT NULL) AND (sourceaccessioncode IS NULL));
12657
CREATE UNIQUE INDEX specimenreplicate_unique_catalognumber ON specimenreplicate USING btree (source_id, (COALESCE(duplicate_institutions_sourcelist_id, 2147483647)), (COALESCE(collectioncode_dwc, '\N'::text)), (COALESCE(catalognumber_dwc, '\N'::text)), (COALESCE(plantobservation_id, 2147483647))) WHERE ((catalognumber_dwc IS NOT NULL) AND (sourceaccessioncode IS NULL));
12658 12658

  
12659 12659

  
12660 12660
--
......
13872 13872

  
13873 13873

  
13874 13874
--
13875
-- Name: specimenreplicate_institution_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
13875
-- Name: specimenreplicate_duplicate_institutions_sourcelist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
13876 13876
--
13877 13877

  
13878 13878
ALTER TABLE ONLY specimenreplicate
13879
    ADD CONSTRAINT specimenreplicate_institution_id_fkey FOREIGN KEY (institution_id) REFERENCES sourcelist(sourcelist_id) ON UPDATE CASCADE ON DELETE CASCADE;
13879
    ADD CONSTRAINT specimenreplicate_duplicate_institutions_sourcelist_id_fkey FOREIGN KEY (duplicate_institutions_sourcelist_id) REFERENCES sourcelist(sourcelist_id) ON UPDATE CASCADE ON DELETE CASCADE;
13880 13880

  
13881 13881

  
13882 13882
--
trunk/mappings/for_review/VegCore-VegBIEN.csv
160 160
collectionURL,//specimenreplicate/collectioncode_dwc,
161 161
voucherType,"//specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/cond",
162 162
collectorNumber,"//specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else",
163
accessionNumber,"//institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
164
dataProviderRecordID,"//institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
165
occurrenceID,"//institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
166
specimen_duplicate_institutions,"//institution_id/sourcelist/_if[@name=""if specimen""]/then/name",
167
specimen_duplicate_institutions,"//institution_id/sourcelist/sourcename/name/_split:[separator=""[,;] *""]/value",
163
accessionNumber,"//duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
164
dataProviderRecordID,"//duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
165
occurrenceID,"//duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/cond/_exists",
166
specimen_duplicate_institutions,"//duplicate_institutions_sourcelist_id/sourcelist/_if[@name=""if specimen""]/then/name",
167
specimen_duplicate_institutions,"//duplicate_institutions_sourcelist_id/sourcelist/sourcename/name/_split:[separator=""[,;] *""]/value",
168 168
dataProviderRecordID,//specimenreplicate/sourceaccessioncode,
169 169
occurrenceID,//specimenreplicate/sourceaccessioncode,
170 170
stemCount,//plantobservation/stemcount,

Also available in: Unified diff