Project

General

Profile

« Previous | Next » 

Revision 3953

schemas/vegbien.sql: locationevent: Renamed authorlocationcode to authoreventcode to be consistent with the table name. Note that for our current datasources, the plot = the plot event, so the authoreventcode and authorlocationcode/authorPlotCode will be the same.

View differences:

inputs/Madidi/test/import.plots.xml.ref
73 73
                    <sourceaccessioncode>$Expedition number</sourceaccessioncode>
74 74
                </project>
75 75
            </project_id>
76
            <authorlocationcode>$Inventory name</authorlocationcode>
76
            <authoreventcode>$Inventory name</authoreventcode>
77 77
            <commclass>
78 78
                <commdetermination>
79 79
                    <commconcept_id>
inputs/Madidi/maps/VegBIEN.plots.csv
10 10
Longitude (DMS),"/location/locationdetermination/longitude/_alt/1/_nullIf:[null=0,type=float]/value/_alt/2",,http://rs.tdwg.org/dwc/terms/#decimalLongitude,86
11 11
Expedition name,/location/locationevent/*_id/project/projectname,Consistent (globally unique) between PPM and PT data,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/projects/project, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName",", 1"
12 12
Expedition number,/location/locationevent/*_id/project/sourceaccessioncode,Consistent (globally unique) between PPM and PT data,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/projects/project, http://rs.tdwg.org/dwc/terms/#occurrenceID",", 0"
13
Inventory name,/location/locationevent/authorlocationcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
13
Inventory name,/location/locationevent/authoreventcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
14 14
Vegetation type,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,Table shortened for standardization,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept, http://rs.tdwg.org/dwc/terms/#occurrenceID",", 0"
15 15
Locality description,/location/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,Often begins with the text in Vegetation type; Table shortened for standardization,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept/name,0
16 16
First evaluation,/location/locationevent/obsstartdate/_*/date/_dateRangeStart/value,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsStartDate",", 44, 5"
inputs/CVS/test/import.organisms.xml.ref
55 55
            </namedplace_id>
56 56
        </locationdetermination>
57 57
        <locationevent>
58
            <authorlocationcode>$authorObsCode</authorlocationcode>
58
            <authoreventcode>$authorObsCode</authoreventcode>
59 59
            <obsstartdate><_date><date><_dateRangeStart><value><_date><date>$obsStartDate</date></_date></value></_dateRangeStart></date></_date></obsstartdate>
60 60
            <taxonoccurrence>
61 61
                <aggregateoccurrence><cover>$%cover</cover></aggregateoccurrence>
inputs/CVS/maps/VegBIEN.organisms.csv
6 6
publicLongitude,"/location/locationdetermination/longitude/_alt/1/_nullIf:[null=0,type=float]/value/_alt/2",,http://rs.tdwg.org/dwc/terms/#decimalLongitude,86
7 7
county,"/location/locationdetermination/namedplace_id/_simplifyPath:[next=""parent_id/namedplace"",require=placename]/path/_forEach:[in:[],do=""namedplace[rank=_val]/parent_id""]/namedplace[rank=county]/placename",,http://rs.tdwg.org/dwc/terms/#county,66
8 8
state,"/location/locationdetermination/namedplace_id/_simplifyPath:[next=""parent_id/namedplace"",require=placename]/path/_forEach:[in:[county,],do=""namedplace[rank=_val]/parent_id""]/namedplace[rank=stateProvince]/placename",,http://rs.tdwg.org/dwc/terms/#stateProvince,65
9
authorObsCode,/location/locationevent/authorlocationcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
9
authorObsCode,/location/locationevent/authoreventcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
10 10
obsStartDate,/location/locationevent/obsstartdate/_*/date/_dateRangeStart/value/_*/date,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsStartDate",", 44, 5"
11 11
%cover,/location/locationevent/taxonoccurrence/aggregateoccurrence/cover,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/attributes/attribute/ordinal/coverPercent,0
12 12
currentTaxonName sec Weakley 2006,/location/locationevent/taxonoccurrence/sourceaccessioncode/_alt/3,,http://rs.tdwg.org/dwc/terms/#scientificName,134
inputs/SALVIAS-CSV/test/import.plots.xml.ref
104 104
        <locationevent>
105 105
            <method_id><method><name>$plot_methodology</name></method></method_id>
106 106
            <project_id><project><projectname>$project</projectname></project></project_id>
107
            <authorlocationcode>$plot_code</authorlocationcode>
107
            <authoreventcode>$plot_code</authoreventcode>
108 108
            <commclass>
109 109
                <commdetermination>
110 110
                    <commconcept_id>
inputs/SALVIAS-CSV/test/import.organisms.xml.ref
2 2
<VegBIEN>
3 3
    <location id="-1">
4 4
        <locationevent>
5
            <authorlocationcode>$subplot</authorlocationcode>
5
            <authoreventcode>$subplot</authoreventcode>
6 6
            <obsstartdate><_date><date><_dateRangeStart><value><_date><year>$census_date</year></_date></value></_dateRangeStart></date></_date></obsstartdate>
7 7
            <parent_id>
8 8
                <locationevent>
......
16 16
                            </sourceaccessioncode>
17 17
                        </location>
18 18
                    </location_id>
19
                    <authorlocationcode>$plot_code</authorlocationcode>
19
                    <authoreventcode>$plot_code</authoreventcode>
20 20
                    <sourceaccessioncode>$PLOT_ID</sourceaccessioncode>
21 21
                </locationevent>
22 22
            </parent_id>
inputs/SALVIAS-CSV/maps/VegBIEN.plots.csv
13 13
major_geo,"/location/locationdetermination/namedplace_id/_simplifyPath:[next=""parent_id/namedplace"",require=placename]/path/_forEach:[in:[county,stateProvince,country,],do=""namedplace[rank=_val]/parent_id""]/namedplace[rank=continent]/placename",,http://rs.tdwg.org/dwc/terms/#continent,59
14 14
plot_methodology,/location/locationevent/*_id/method/name,,http://rs.tdwg.org/dwc/terms/#samplingProtocol,42
15 15
project,/location/locationevent/*_id/project/projectname,,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/projects/project, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName",", 1"
16
plot_code,/location/locationevent/authorlocationcode,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project),http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
16
plot_code,/location/locationevent/authoreventcode,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project),http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
17 17
holdridge_life_zone,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,Table shortened for standardization,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept, http://rs.tdwg.org/dwc/terms/#occurrenceID",", 0"
18 18
life_zone_code,/location/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,Table shortened for standardization,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept/name,0
19 19
date_finish,/location/locationevent/obsenddate/_*/date/_dateRangeEnd/value/_*/date,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsEndDate",", 44, 6"
inputs/SALVIAS-CSV/maps/VegBIEN.organisms.csv
1 1
SALVIAS-CSV,VegBIEN:,Comments,Source,Order within table
2
subplot,/location/locationevent/authorlocationcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
2
subplot,/location/locationevent/authoreventcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
3 3
census_date,/location/locationevent/obsstartdate/_*/date/_dateRangeStart/value/_date/year,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsStartDate",", 44, 5"
4 4
PLOT_ID,/location/locationevent/parent_id/locationevent/*_id/location/sourceaccessioncode/_alt/1,"Brad: Not sure why this is repeated? This field and plotCode, as the same as above.","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://rs.tdwg.org/dwc/terms/#occurrenceID","3, 0"
5 5
plot_code,/location/locationevent/parent_id/locationevent/*_id/location/sourceaccessioncode/_alt/2,"Brad: Same as plotCode, above","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
6
plot_code,/location/locationevent/parent_id/locationevent/authorlocationcode,"Brad: Same as plotCode, above","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
6
plot_code,/location/locationevent/parent_id/locationevent/authoreventcode,"Brad: Same as plotCode, above","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
7 7
PLOT_ID,/location/locationevent/parent_id/locationevent/sourceaccessioncode,"Brad: Not sure why this is repeated? This field and plotCode, as the same as above.","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://rs.tdwg.org/dwc/terms/#occurrenceID","3, 0"
8 8
no_of_individuals,/location/locationevent/taxonoccurrence/aggregateoccurrence/count,"Brad: Incorrect for VegX. This is a count of number of indiiduals for an *aggregate* observation. For VegBank, I'm not sure. Not exactly the same as stemCount. An individual tree could have 3 stems but would still only count as 1. We need to check with Bob on this.",http://rs.tdwg.org/dwc/terms/#individualCount,25
9 9
cover_percent,/location/locationevent/taxonoccurrence/aggregateoccurrence/cover,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/attributes/attribute/ordinal/coverPercent,0
inputs/SALVIAS/test/import.plots.xml.ref
104 104
        <locationevent>
105 105
            <method_id><method><name>$PlotMethod</name></method></method_id>
106 106
            <project_id><project><projectname>$project_id</projectname></project></project_id>
107
            <authorlocationcode>$SiteCode</authorlocationcode>
107
            <authoreventcode>$SiteCode</authoreventcode>
108 108
            <commclass>
109 109
                <commdetermination>
110 110
                    <commconcept_id>
inputs/SALVIAS/test/import.organisms.xml.ref
2 2
<VegBIEN>
3 3
    <location id="-1">
4 4
        <locationevent>
5
            <authorlocationcode>$Line</authorlocationcode>
5
            <authoreventcode>$Line</authoreventcode>
6 6
            <parent_id>
7 7
                <locationevent>
8 8
                    <location_id>
......
15 15
                            </sourceaccessioncode>
16 16
                        </location>
17 17
                    </location_id>
18
                    <authorlocationcode>$PlotCode</authorlocationcode>
18
                    <authoreventcode>$PlotCode</authoreventcode>
19 19
                    <sourceaccessioncode>$PlotID</sourceaccessioncode>
20 20
                </locationevent>
21 21
            </parent_id>
inputs/SALVIAS/maps/VegBIEN.plots.csv
13 13
MajorGeo,"/location/locationdetermination/namedplace_id/_simplifyPath:[next=""parent_id/namedplace"",require=placename]/path/_forEach:[in:[county,stateProvince,country,],do=""namedplace[rank=_val]/parent_id""]/namedplace[rank=continent]/placename",,http://rs.tdwg.org/dwc/terms/#continent,59
14 14
PlotMethod,/location/locationevent/*_id/method/name,,http://rs.tdwg.org/dwc/terms/#samplingProtocol,42
15 15
project_id,/location/locationevent/*_id/project/projectname,,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/projects/project, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName",", 1"
16
SiteCode,/location/locationevent/authorlocationcode,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project),http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
16
SiteCode,/location/locationevent/authoreventcode,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project),http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
17 17
life_zone_code,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,Table shortened for standardization,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept, http://rs.tdwg.org/dwc/terms/#occurrenceID",", 0"
18 18
life_zone,/location/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,Table shortened for standardization,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept/name,0
19 19
date_finish,/location/locationevent/obsenddate/_*/date/_dateRangeEnd/value/_*/date,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsEndDate",", 44, 6"
inputs/SALVIAS/maps/VegBIEN.organisms.csv
1 1
SALVIAS,VegBIEN:,Comments,Source,Order within table
2
Line,/location/locationevent/authorlocationcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
2
Line,/location/locationevent/authoreventcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
3 3
PlotID,/location/locationevent/parent_id/locationevent/*_id/location/sourceaccessioncode/_alt/1,"Brad: Not sure why this is repeated? This field and plotCode, as the same as above.","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://rs.tdwg.org/dwc/terms/#occurrenceID","3, 0"
4 4
PlotCode,/location/locationevent/parent_id/locationevent/*_id/location/sourceaccessioncode/_alt/2,"Brad: Same as plotCode, above","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
5
PlotCode,/location/locationevent/parent_id/locationevent/authorlocationcode,"Brad: Same as plotCode, above","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
5
PlotCode,/location/locationevent/parent_id/locationevent/authoreventcode,"Brad: Same as plotCode, above","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
6 6
PlotID,/location/locationevent/parent_id/locationevent/sourceaccessioncode,"Brad: Not sure why this is repeated? This field and plotCode, as the same as above.","http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://rs.tdwg.org/dwc/terms/#occurrenceID","3, 0"
7 7
census_date,/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date/_dateRangeStart/value/_*/date,,http://rs.tdwg.org/dwc/terms/#eventDate,44
8 8
NoInd,/location/locationevent/taxonoccurrence/aggregateoccurrence/count,"Brad: Incorrect for VegX. This is a count of number of indiiduals for an *aggregate* observation. For VegBank, I'm not sure. Not exactly the same as stemCount. An individual tree could have 3 stems but would still only count as 1. We need to check with Bob on this.",http://rs.tdwg.org/dwc/terms/#individualCount,25
schemas/vegbien.my.sql
771 771
    parent_id int(11),
772 772
    location_id int(11) NOT NULL,
773 773
    project_id int(11),
774
    authorlocationcode text,
774
    authoreventcode text,
775 775
    previous_id int(11),
776 776
    dateaccuracy text,
777 777
    method_id int(11),
......
3662 3662

  
3663 3663

  
3664 3664
--
3665
-- Name: locationevent_unique_within_parent_by_authorlocationcode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3665
-- Name: locationevent_unique_within_parent_by_authoreventcode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
3666 3666
--
3667 3667

  
3668 3668

  
schemas/vegbien.sql
1064 1064
    parent_id integer,
1065 1065
    location_id integer NOT NULL,
1066 1066
    project_id integer,
1067
    authorlocationcode text,
1067
    authoreventcode text,
1068 1068
    previous_id integer,
1069 1069
    dateaccuracy text,
1070 1070
    method_id integer,
......
4189 4189
-- Name: locationevent_unique_within_location; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4190 4190
--
4191 4191

  
4192
CREATE UNIQUE INDEX locationevent_unique_within_location ON locationevent USING btree (location_id, (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE (((parent_id IS NULL) AND (sourceaccessioncode IS NULL)) AND (authorlocationcode IS NULL));
4192
CREATE UNIQUE INDEX locationevent_unique_within_location ON locationevent USING btree (location_id, (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE (((parent_id IS NULL) AND (sourceaccessioncode IS NULL)) AND (authoreventcode IS NULL));
4193 4193

  
4194 4194

  
4195 4195
--
4196
-- Name: locationevent_unique_within_parent_by_authorlocationcode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4196
-- Name: locationevent_unique_within_parent_by_authoreventcode; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4197 4197
--
4198 4198

  
4199
CREATE UNIQUE INDEX locationevent_unique_within_parent_by_authorlocationcode ON locationevent USING btree ((COALESCE(parent_id, 2147483647)), (COALESCE(authorlocationcode, '\\N'::text))) WHERE ((parent_id IS NOT NULL) AND (authorlocationcode IS NOT NULL));
4199
CREATE UNIQUE INDEX locationevent_unique_within_parent_by_authoreventcode ON locationevent USING btree ((COALESCE(parent_id, 2147483647)), (COALESCE(authoreventcode, '\\N'::text))) WHERE ((parent_id IS NOT NULL) AND (authoreventcode IS NOT NULL));
4200 4200

  
4201 4201

  
4202 4202
--
......
4210 4210
-- Name: locationevent_unique_within_project; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4211 4211
--
4212 4212

  
4213
CREATE UNIQUE INDEX locationevent_unique_within_project ON locationevent USING btree ((COALESCE(project_id, 2147483647)), (COALESCE(authorlocationcode, '\\N'::text)), (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE ((((parent_id IS NULL) AND (project_id IS NOT NULL)) AND (authorlocationcode IS NOT NULL)) AND (obsstartdate IS NOT NULL));
4213
CREATE UNIQUE INDEX locationevent_unique_within_project ON locationevent USING btree ((COALESCE(project_id, 2147483647)), (COALESCE(authoreventcode, '\\N'::text)), (COALESCE(obsstartdate, 'infinity'::timestamp with time zone))) WHERE ((((parent_id IS NULL) AND (project_id IS NOT NULL)) AND (authoreventcode IS NOT NULL)) AND (obsstartdate IS NOT NULL));
4214 4214

  
4215 4215

  
4216 4216
--
mappings/VegCSV-VegBIEN.specimens.csv
17 17
samplingProtocol,/location/locationevent/*_id/method/name,,http://rs.tdwg.org/dwc/terms/#samplingProtocol,42
18 18
projectName,/location/locationevent/*_id/project/projectname,,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/projects/project, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName",", 1"
19 19
projectID,/location/locationevent/*_id/project/sourceaccessioncode,,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/projects/project, http://rs.tdwg.org/dwc/terms/#occurrenceID",", 0"
20
plotName,/location/locationevent/authorlocationcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
20
plotName,/location/locationevent/authoreventcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
21 21
communityID,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,Table shortened for standardization,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept, http://rs.tdwg.org/dwc/terms/#occurrenceID",", 0"
22 22
communityName,/location/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,Table shortened for standardization,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept/name,0
23 23
plotEventEndDate,/location/locationevent/obsenddate/_*/date/_dateRangeEnd/value,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsEndDate",", 44, 6"
24 24
plotEventStartDate,/location/locationevent/obsstartdate/_*/date/_dateRangeStart/value,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsStartDate",", 44, 5"
25 25
parentPlotID,/location/locationevent/parent_id/locationevent/*_id/location/sourceaccessioncode/_alt/1,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://rs.tdwg.org/dwc/terms/#occurrenceID","3, 0"
26 26
parentPlotName,/location/locationevent/parent_id/locationevent/*_id/location/sourceaccessioncode/_alt/2,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
27
parentPlotName,/location/locationevent/parent_id/locationevent/authorlocationcode,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
27
parentPlotName,/location/locationevent/parent_id/locationevent/authoreventcode,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
28 28
parentPlotID,/location/locationevent/parent_id/locationevent/sourceaccessioncode,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://rs.tdwg.org/dwc/terms/#occurrenceID","3, 0"
29 29
precipitation,/location/locationevent/precipitation,Expanded for clarity,http://salvias.net/Documents/salvias_data_dictionary.html#Plot+metadata.precip_mm,13
30 30
acidity,/location/locationevent/soilobs/acidity,,http://nimoy.nceas.ucsb.edu/phpmyadmin/index.php?db=salvias_plots&table=plotMetadata&target=tbl_structure.php#soil_acidity,42
mappings/for_review/VegCSV-VegBIEN.specimens.csv
17 17
samplingProtocol,//method/name,,http://rs.tdwg.org/dwc/terms/#samplingProtocol,42
18 18
projectName,//project/projectname,,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/projects/project, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName",", 1"
19 19
projectID,//project/sourceaccessioncode,,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/projects/project, http://rs.tdwg.org/dwc/terms/#occurrenceID",", 0"
20
plotName,//locationevent/authorlocationcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
20
plotName,//locationevent/authoreventcode,,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName,1
21 21
communityID,//*/commname,Table shortened for standardization,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept, http://rs.tdwg.org/dwc/terms/#occurrenceID",", 0"
22 22
communityName,//commconcept/commdescription,Table shortened for standardization,http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/communityDeterminations/communityDetermination/communityConcepts/communityConcept/name,0
23 23
plotEventEndDate,//locationevent/obsenddate/_*/date,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsEndDate",", 44, 6"
24 24
plotEventStartDate,//locationevent/obsstartdate/_*/date,Table added for uniqueness,"http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot, http://rs.tdwg.org/dwc/terms/#eventDate, http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=observation&entity=dba_tabledescription&where=where_tablename#obsStartDate",", 44, 5"
25 25
parentPlotID,//location/sourceaccessioncode,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://rs.tdwg.org/dwc/terms/#occurrenceID","3, 0"
26 26
parentPlotName,//location/sourceaccessioncode,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
27
parentPlotName,//locationevent/authorlocationcode,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
27
parentPlotName,//locationevent/authoreventcode,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/plots/plot/plotName","3, 1"
28 28
parentPlotID,//locationevent/sourceaccessioncode,,"http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=plot&entity=dba_tabledescription&where=where_tablename#PARENT_ID, http://rs.tdwg.org/dwc/terms/#occurrenceID","3, 0"
29 29
precipitation,//locationevent/precipitation,Expanded for clarity,http://salvias.net/Documents/salvias_data_dictionary.html#Plot+metadata.precip_mm,13
30 30
acidity,//soilobs/acidity,,http://nimoy.nceas.ucsb.edu/phpmyadmin/index.php?db=salvias_plots&table=plotMetadata&target=tbl_structure.php#soil_acidity,42

Also available in: Unified diff