Project

General

Profile

« Previous | Next » 

Revision 11717

inputs/: removed SALVIAS-CSV, because this is a sample datasource which was only there to test the mapping process. it should not be adding records that duplicate SALVIAS, nor should it take up maintenance effort (switching to new-style import, updating to match SALVIAS, etc.).

View differences:

inputs/SALVIAS-CSV/import_order.txt
1
Source
2
Plot
3
Organism
inputs/SALVIAS-CSV/table.run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/table.run
3 0

  
inputs/SALVIAS-CSV/new_terms.csv
1
-----
2
-----"
3
FROM ""SALVIAS-CSV"".organisms
4
GROUP BY ""PLOT_ID"", subplot
5
HAVING count(DISTINCT census_date) > 1
6
OBSERVATION_ID,individualID,,"Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
7
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
8
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
9
basal_diam,basalDiameter,,
10
census_date,eventDate,,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
11
census_no,censusNumber,,"Brad: Assigned by SALVIAS. 1 for first plot, then 2, 3, etc. I can't recall if we even have repeat censuses in SALVIAS. Probably not."
12
cf_aff,identificationQualifier,,"Brad: Not sure where this goes. Indicator of identification uncertainty. 'cf.'=similar to the species listed, 'aff.'=related to the species list, but not the same. You'll need to check with Bob and with Nick where these go in VegX and VegBank."
13
coll_firstname,recordedBy_givenName,,Brad: See comment above
14
coll_lastname,recordedBy_surName,,"Brad: This is the collector of a separate specimen which vouchers this tree or species. I worry that vouchers are not properly accommodated in VegX. Again, we need to check with Nick."
15
coll_number,recordNumber,/_alt/1,Brad: Map instead as for voucher_string
16
date_finish,endDate,,
17
date_start,startDate,,
18
det_type,voucherType,,"Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
19
elev_m,elevationInMeters,,Brad: Mean elevation in meters. This is a constrained decimal value; is there no place for this in VegX other than verbatimElevation? Check with Nick.
20
elev_max_m,maximumElevationInMeters,,
21
elev_min_m,minimumElevationInMeters,,
22
holdridge_life_zone,communityID,,
23
ht_first_branch_m,heightFirstBranch,,
24
infra_ep_1,infraspecificEpithet,,
25
infra_rank_1,taxonRank,,
26
lat_decimal,decimalLatitude,,
27
life_zone_code,communityName,,
28
locality_description,locality,,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
29
long_decimal,decimalLongitude,,
30
major_geo,continent,,
31
no_of_individuals,individualCount,,"Brad: 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."
32
orig_family,originalFamily,,Brad: OMIT
33
orig_species,originalSpecificEpithet,,Brad: OMIT
34
plot_code,locationName,,
35
plot_code,locationName,,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
36
plot_methodology,samplingProtocol,,
37
pol1,stateProvince,,Brad: No; pol1=stateProvince
38
pol2,county,,Brad: No pol2=countyParish
39
precip_mm,precipitation,,
40
project,projectName,,
41
soil_C,carbon_percent,,Assuming units are % based on the range of values
42
soil_Ca,calcium_percent,,Assuming units are % based on the range of values
43
soil_K,potassium_percent,,Assuming units are % based on the range of values
44
soil_Mg,magnesium_percent,,Assuming units are % based on the range of values
45
soil_N,nitrogen_percent,,Assuming units are % based on the range of values
46
soil_Na,sodium_percent,,Assuming units are % based on the range of values
47
soil_P,phosphorus_percent,"/_map:[""<0.05""=0,*=*]/value",Assuming units are % based on the range of values
48
soil_acidity,acidity_percent,"/_map:[""<0.05""=0,*=*]/value",Assuming units are % based on the range of values
49
soil_base,baseSaturation_percent,,Assuming units are % based on the range of values
50
soil_cation_cap,cationExchangeCapacity_cmol_kg,,
51
soil_conductivity,conductivity,,
52
soil_texture,texture,,
53
specific_authority,scientificNameAuthorship,,Brad: This is the author of the scientificName.
54
stem_canopy_form,canopyForm,,
55
stem_canopy_position,canopyPosition,,
56
stem_dbh,diameterBreastHeight_cm,,"Assuming units based on the units for intercept_cm, which measures the same dimension"
57
stem_height_first_branch_m,heightFirstBranch,,"Brad: Same as for ht_first_branch_m, but applies to individuals stems, not trees. Rare."
58
stem_height_m,height_m,/_alt/1,"""Total height of this stem only, in meters"" (stem_height_m definition at < http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: Same as for height, but applies to individuals stems, not trees. Rare."
59
stem_liana_infestation,lianaInfestation,,
60
stem_tag1,tag,/_alt/1/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
61
stem_tag2,tag,/_alt/1/_alt/1,The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: see above
62
tag1,tag,/_alt/2/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
63
tag2,tag,/_alt/2/_alt/1,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
64
temp_c,temperature,,
65
voucher_string,recordNumber,/_alt/2,"Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
66
x_position,organismX_m,,"""x coordinate in meters"" (x_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: These are important, fundamental values of many tree plots"
67
y_position,organismY_m,,"""y coordinate in meters"" (y_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: See comment above for x_position"
inputs/SALVIAS-CSV/unmapped_terms.csv
1
*collector_code
2
*comments
3
*fam_status
4
*gen_status
5
*ind_id
6
*recensused
7
*species_status
inputs/SALVIAS-CSV/Makefile
1
include ../input.Makefile
inputs/SALVIAS-CSV/Plot/map.csv
1
SALVIAS-CSV,VegCore,Filter,Comments
2
row_num,*row_num,,
3
project,projectName,,
4
PLOT_ID,locationID,,"Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
5
plot_code,locationName,,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
6
major_geo,continent,,
7
country,country,,
8
pol1,stateProvince,,Brad: No; pol1=stateProvince
9
pol2,county,,Brad: No pol2=countyParish
10
locality_description,locality,,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
11
lat_decimal,decimalLatitude,,
12
long_decimal,decimalLongitude,,
13
elev_m,elevationInMeters,,Brad: Mean elevation in meters. This is a constrained decimal value; is there no place for this in VegX other than verbatimElevation? Check with Nick.
14
elev_max_m,maximumElevationInMeters,,
15
elev_min_m,minimumElevationInMeters,,
16
temp_c,temperature_C,,
17
precip_mm,precipitation_mm,,
18
slope_aspect,slopeAspect,,
19
slope_gradient,slopeGradient,,
20
clay_percent,clay_percent,,
21
silt_percent,silt_percent,,
22
sand_percent,sand_percent,,
23
organic_percent,organic_percent,,
24
pH,ph,,"Brad: For all these soil variables, how do we store information on method, units. Seems like an ontological structure would be more appropriate (measurementName, measurementValue, measurementUnits, measurementMethod). Same as BIEN traits table. Something to discuss."
25
soil_N,nitrogen_percent,,Assuming units are % based on the range of values
26
soil_P,phosphorus_percent,"/_map:[""<0.05""=0,*=*]/value",Assuming units are % based on the range of values
27
soil_C,carbon_percent,,Assuming units are % based on the range of values
28
soil_K,potassium_percent,,Assuming units are % based on the range of values
29
soil_Mg,magnesium_percent,,Assuming units are % based on the range of values
30
soil_Ca,calcium_percent,,Assuming units are % based on the range of values
31
soil_Na,sodium_percent,,Assuming units are % based on the range of values
32
soil_acidity,acidity_percent,"/_map:[""<0.05""=0,*=*]/value",Assuming units are % based on the range of values
33
soil_base,baseSaturation_percent,,Assuming units are % based on the range of values
34
soil_cation_cap,cationExchangeCapacity_cmol_kg,,
35
soil_conductivity,conductivity,,
36
soil_texture,texture,,
37
holdridge_life_zone,communityID,,
38
life_zone_code,communityName,,
39
observation_type,observationMeasure,,"Brad: SALVIAS internal metadata indicating whether the record represents an individual or aggregate observation. Rather than storing, use to decide where to store in VegX.; Aaron: VegX aggregateOrganismObservation table is missing many fields available in individualOrganismObservation, so we're mapping to individualOrganismObservation regardless of observation type"
40
plot_methodology,samplingProtocol,,
41
plot_area_ha,plotArea_ha,,"Brad: Area in hectares. Is there any way to store units?; Aaron: VegX plot area annotation says ""Total area of the plot in square meters."" so units are fixed"
42
recensused,*recensused,,"Brad: This is a 0/1 value, internal to SALVIAS. 1 indicates that a  plot has >1 set of values, from different census events.; Aaron: Different censuses are distinguished in organisms data by different census_no values"
43
date_start,startDate,,
44
date_finish,endDate,,
inputs/SALVIAS-CSV/Plot/test.xml.ref
1
<!--put template-->
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>SALVIAS-CSV.new</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <authorlocationcode>$plot_code</authorlocationcode>
11
                        <sourceaccessioncode>$PLOT_ID</sourceaccessioncode>
12
                        <area_m2><_ha_to_m2><value>$plot_area_ha</value></_ha_to_m2></area_m2>
13
                        <elevation_m>
14
                            <_alt>
15
                                <1>$elev_m</1>
16
                                <2>
17
                                    <_avg>
18
                                        <1>$elev_min_m</1>
19
                                        <2>$elev_max_m</2>
20
                                    </_avg>
21
                                </2>
22
                            </_alt>
23
                        </elevation_m>
24
                        <iscultivated><_locationnarrative_is_cultivated><locationnarrative>$locality_description</locationnarrative></_locationnarrative_is_cultivated></iscultivated>
25
                        <locationevent>
26
                            <method_id>
27
                                <method>
28
                                    <name>$plot_methodology</name>
29
                                    <observationmeasure>$observation_type</observationmeasure>
30
                                </method>
31
                            </method_id>
32
                            <project_id><project><projectname>$project</projectname></project></project_id>
33
                            <commclass>
34
                                <commdetermination>
35
                                    <commconcept_id>
36
                                        <commconcept>
37
                                            <commname_id><commname><commname>$holdridge_life_zone</commname></commname></commname_id>
38
                                            <commdescription>$life_zone_code</commdescription>
39
                                        </commconcept>
40
                                    </commconcept_id>
41
                                </commdetermination>
42
                            </commclass>
43
                            <obsenddate>$date_finish</obsenddate>
44
                            <obsstartdate>$date_start</obsstartdate>
45
                            <precipitation_m><_mm_to_m><value>$precip_mm</value></_mm_to_m></precipitation_m>
46
                            <soilsample>
47
                                <acidity_fraction>
48
                                    <_percent_to_fraction>
49
                                        <value>
50
                                            <_map>
51
                                                <<0.05>0</<0.05>
52
                                                <*>*</*>
53
                                                <value>$soil_acidity</value>
54
                                            </_map>
55
                                        </value>
56
                                    </_percent_to_fraction>
57
                                </acidity_fraction>
58
                                <basesaturation_fraction><_percent_to_fraction><value>$soil_base</value></_percent_to_fraction></basesaturation_fraction>
59
                                <calcium_fraction><_percent_to_fraction><value>$soil_Ca</value></_percent_to_fraction></calcium_fraction>
60
                                <carbon_fraction><_percent_to_fraction><value>$soil_C</value></_percent_to_fraction></carbon_fraction>
61
                                <cationexchangecapacity_cmol_kg>$soil_cation_cap</cationexchangecapacity_cmol_kg>
62
                                <clay_fraction><_percent_to_fraction><value>$clay_percent</value></_percent_to_fraction></clay_fraction>
63
                                <conductivity>$soil_conductivity</conductivity>
64
                                <magnesium_fraction><_percent_to_fraction><value>$soil_Mg</value></_percent_to_fraction></magnesium_fraction>
65
                                <nitrogen_fraction><_percent_to_fraction><value>$soil_N</value></_percent_to_fraction></nitrogen_fraction>
66
                                <organic_fraction><_percent_to_fraction><value>$organic_percent</value></_percent_to_fraction></organic_fraction>
67
                                <ph>$pH</ph>
68
                                <phosphorus_fraction>
69
                                    <_percent_to_fraction>
70
                                        <value>
71
                                            <_map>
72
                                                <<0.05>0</<0.05>
73
                                                <*>*</*>
74
                                                <value>$soil_P</value>
75
                                            </_map>
76
                                        </value>
77
                                    </_percent_to_fraction>
78
                                </phosphorus_fraction>
79
                                <potassium_fraction><_percent_to_fraction><value>$soil_K</value></_percent_to_fraction></potassium_fraction>
80
                                <sand_fraction><_percent_to_fraction><value>$sand_percent</value></_percent_to_fraction></sand_fraction>
81
                                <silt_fraction><_percent_to_fraction><value>$silt_percent</value></_percent_to_fraction></silt_fraction>
82
                                <sodium_fraction><_percent_to_fraction><value>$soil_Na</value></_percent_to_fraction></sodium_fraction>
83
                                <texture>$soil_texture</texture>
84
                            </soilsample>
85
                            <temperature_c>$temp_c</temperature_c>
86
                        </locationevent>
87
                        <locationnarrative>$locality_description</locationnarrative>
88
                        <locationplace>
89
                            <place_id>
90
                                <place>
91
                                    <coordinates_id>
92
                                        <coordinates>
93
                                            <latitude_deg>
94
                                                <_nullIf>
95
                                                    <null>0</null>
96
                                                    <type>float</type>
97
                                                    <value>$lat_decimal</value>
98
                                                </_nullIf>
99
                                            </latitude_deg>
100
                                            <longitude_deg>
101
                                                <_nullIf>
102
                                                    <null>0</null>
103
                                                    <type>float</type>
104
                                                    <value>$long_decimal</value>
105
                                                </_nullIf>
106
                                            </longitude_deg>
107
                                        </coordinates>
108
                                    </coordinates_id>
109
                                    <continent>$major_geo</continent>
110
                                    <country>$country</country>
111
                                    <county>$pol2</county>
112
                                    <matched_place_id>
113
                                        <place>
114
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
115
                                            <coordinates_id>
116
                                                <coordinates>
117
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
118
                                                    <latitude_deg>
119
                                                        <_nullIf>
120
                                                            <null>0</null>
121
                                                            <type>float</type>
122
                                                            <value>$lat_decimal</value>
123
                                                        </_nullIf>
124
                                                    </latitude_deg>
125
                                                    <longitude_deg>
126
                                                        <_nullIf>
127
                                                            <null>0</null>
128
                                                            <type>float</type>
129
                                                            <value>$long_decimal</value>
130
                                                        </_nullIf>
131
                                                    </longitude_deg>
132
                                                </coordinates>
133
                                            </coordinates_id>
134
                                            <country>$country</country>
135
                                            <county>$pol2</county>
136
                                            <stateprovince>$pol1</stateprovince>
137
                                        </place>
138
                                    </matched_place_id>
139
                                    <stateprovince>$pol1</stateprovince>
140
                                </place>
141
                            </place_id>
142
                        </locationplace>
143
                        <slopeaspect_deg><_compass><value>$slope_aspect</value></_compass></slopeaspect_deg>
144
                        <slopegradient_fraction>$slope_gradient</slopegradient_fraction>
145
                    </location>
146
                </path>
147
            </_simplifyPath>
148
        </path>
149
    </_setDefault>
150
</VegBIEN>
151
Inserted 18 new rows into database
inputs/SALVIAS-CSV/Plot/VegBIEN.csv
1
SALVIAS-CSV,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
plot_code,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/1",Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
3
PLOT_ID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/2/_if[@name=""if locationID""]/cond/_exists","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
4
PLOT_ID,"/location/_if[@name=""if subplot""]/else/sourceaccessioncode","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
5
plot_code,"/location/_if[@name=""if subplot""]/then/parent_id/location/authorlocationcode",Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
6
PLOT_ID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
7
plot_area_ha,/location/area_m2/_ha_to_m2/value,"Brad: Area in hectares. Is there any way to store units?; Aaron: VegX plot area annotation says ""Total area of the plot in square meters."" so units are fixed"
8
elev_m,/location/elevation_m/_alt/1,Brad: Mean elevation in meters. This is a constrained decimal value; is there no place for this in VegX other than verbatimElevation? Check with Nick.
9
elev_min_m,/location/elevation_m/_alt/2/_avg/1,
10
elev_max_m,/location/elevation_m/_alt/2/_avg/2,
11
locality_description,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
12
plot_methodology,/location/locationevent/*_id/method/name,
13
observation_type,/location/locationevent/*_id/method/observationmeasure,"Brad: SALVIAS internal metadata indicating whether the record represents an individual or aggregate observation. Rather than storing, use to decide where to store in VegX.; Aaron: VegX aggregateOrganismObservation table is missing many fields available in individualOrganismObservation, so we're mapping to individualOrganismObservation regardless of observation type"
14
project,/location/locationevent/*_id/project/projectname,
15
date_finish,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/cond/_exists",
16
date_start,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/cond/_exists",
17
plot_code,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode/_if[@name=""if subplot""]/then",Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
18
PLOT_ID,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode/_if[@name=""if subplot""]/then","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
19
date_finish,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsenddate/_alt/1",
20
date_start,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsstartdate/_alt/1",
21
holdridge_life_zone,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
22
life_zone_code,/location/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,
23
PLOT_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
24
plot_code,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
25
date_finish,/location/locationevent/obsenddate/_alt/1,
26
date_start,/location/locationevent/obsstartdate/_alt/1,
27
precip_mm,/location/locationevent/precipitation_m/_mm_to_m/value,
28
soil_acidity,"/location/locationevent/soilsample/acidity_fraction/_percent_to_fraction/value/_map:[""<0.05""=0,*=*]/value",Assuming units are % based on the range of values
29
soil_base,/location/locationevent/soilsample/basesaturation_fraction/_percent_to_fraction/value,Assuming units are % based on the range of values
30
soil_Ca,/location/locationevent/soilsample/calcium_fraction/_percent_to_fraction/value,Assuming units are % based on the range of values
31
soil_C,/location/locationevent/soilsample/carbon_fraction/_percent_to_fraction/value,Assuming units are % based on the range of values
32
soil_cation_cap,/location/locationevent/soilsample/cationexchangecapacity_cmol_kg,
33
clay_percent,/location/locationevent/soilsample/clay_fraction/_percent_to_fraction/value,
34
soil_conductivity,/location/locationevent/soilsample/conductivity,
35
soil_Mg,/location/locationevent/soilsample/magnesium_fraction/_percent_to_fraction/value,Assuming units are % based on the range of values
36
soil_N,/location/locationevent/soilsample/nitrogen_fraction/_percent_to_fraction/value,Assuming units are % based on the range of values
37
organic_percent,/location/locationevent/soilsample/organic_fraction/_percent_to_fraction/value,
38
pH,/location/locationevent/soilsample/ph,"Brad: For all these soil variables, how do we store information on method, units. Seems like an ontological structure would be more appropriate (measurementName, measurementValue, measurementUnits, measurementMethod). Same as BIEN traits table. Something to discuss."
39
soil_P,"/location/locationevent/soilsample/phosphorus_fraction/_percent_to_fraction/value/_map:[""<0.05""=0,*=*]/value",Assuming units are % based on the range of values
40
soil_K,/location/locationevent/soilsample/potassium_fraction/_percent_to_fraction/value,Assuming units are % based on the range of values
41
sand_percent,/location/locationevent/soilsample/sand_fraction/_percent_to_fraction/value,
42
silt_percent,/location/locationevent/soilsample/silt_fraction/_percent_to_fraction/value,
43
soil_Na,/location/locationevent/soilsample/sodium_fraction/_percent_to_fraction/value,Assuming units are % based on the range of values
44
soil_texture,/location/locationevent/soilsample/texture,
45
temp_c,/location/locationevent/temperature_c,
46
locality_description,/location/locationnarrative/_merge/1,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
47
lat_decimal,"/location/locationplace/*_id/place/*_id/coordinates/latitude_deg/_nullIf:[null=0,type=float]/value",
48
long_decimal,"/location/locationplace/*_id/place/*_id/coordinates/longitude_deg/_nullIf:[null=0,type=float]/value",
49
major_geo,/location/locationplace/*_id/place/continent,
50
country,/location/locationplace/*_id/place/country,
51
pol2,/location/locationplace/*_id/place/county,Brad: No pol2=countyParish
52
lat_decimal,"/location/locationplace/*_id/place/matched_place_id/place:[.,source_id/source/shortname=geoscrub]/*_id/coordinates:[source_id/source/shortname=geoscrub]/_first/2/latitude_deg/_nullIf:[null=0,type=float]/value",""".,"" sorts it with other coordinates mappings"
53
long_decimal,"/location/locationplace/*_id/place/matched_place_id/place:[.,source_id/source/shortname=geoscrub]/*_id/coordinates:[source_id/source/shortname=geoscrub]/_first/2/longitude_deg/_nullIf:[null=0,type=float]/value",""".,"" sorts it with other coordinates mappings"
54
country,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/country/_first/2,
55
pol2,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/county/_first/2,Brad: No pol2=countyParish
56
pol1,/location/locationplace/*_id/place/matched_place_id/place:[source_id/source/shortname=geoscrub]/stateprovince/_first/2,Brad: No; pol1=stateProvince
57
pol1,/location/locationplace/*_id/place/stateprovince,Brad: No; pol1=stateProvince
58
slope_aspect,/location/slopeaspect_deg/_alt/1/_compass/value,
59
slope_gradient,/location/slopegradient_fraction/_alt/1,
60
PLOT_ID,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/cond/_exists","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
61
PLOT_ID,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/then/_if[@name=""if subplot""]/then/_join/1","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
62
recensused,,"** No join mapping for *recensused ** Brad: This is a 0/1 value, internal to SALVIAS. 1 indicates that a  plot has >1 set of values, from different census events.; Aaron: Different censuses are distinguished in organisms data by different census_no values"
63
row_num,,** No join mapping for *row_num ** 
inputs/SALVIAS-CSV/Plot/new_terms.csv
1
project,projectName,,
2
plot_code,locationName,,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
3
major_geo,continent,,
4
pol1,stateProvince,,Brad: No; pol1=stateProvince
5
pol2,county,,Brad: No pol2=countyParish
6
locality_description,locality,,"Brad: No; this is free text description of locality where plot was situated, same as for DwC. Not a description of vegetation. Most likely='namedPlace.placeDescription' in VB; not sure about VX, again need to ask Nick where locality descriptions live in VX"
7
lat_decimal,decimalLatitude,,
8
long_decimal,decimalLongitude,,
9
elev_m,elevationInMeters,,Brad: Mean elevation in meters. This is a constrained decimal value; is there no place for this in VegX other than verbatimElevation? Check with Nick.
10
elev_max_m,maximumElevationInMeters,,
11
elev_min_m,minimumElevationInMeters,,
12
soil_N,nitrogen_percent,,Assuming units are % based on the range of values
13
soil_P,phosphorus_percent,"/_map:[""<0.05""=0,*=*]/value",Assuming units are % based on the range of values
14
soil_K,potassium_percent,,Assuming units are % based on the range of values
15
soil_Mg,magnesium_percent,,Assuming units are % based on the range of values
16
soil_base,baseSaturation_percent,,Assuming units are % based on the range of values
17
holdridge_life_zone,communityID,,
18
life_zone_code,communityName,,
19
date_start,startDate,,
20
date_finish,endDate,,
inputs/SALVIAS-CSV/Plot/unmapped_terms.csv
1
*row_num
2
*recensused
inputs/SALVIAS-CSV/Plot/header.csv
1
row_num,project,PLOT_ID,plot_code,major_geo,country,pol1,pol2,locality_description,lat_decimal,long_decimal,elev_m,elev_max_m,elev_min_m,temp_c,precip_mm,slope_aspect,slope_gradient,clay_percent,silt_percent,sand_percent,organic_percent,pH,soil_N,soil_P,soil_C,soil_K,soil_Mg,soil_Ca,soil_Na,soil_acidity,soil_base,soil_cation_cap,soil_conductivity,soil_texture,holdridge_life_zone,life_zone_code,observation_type,plot_methodology,plot_area_ha,recensused,date_start,date_finish
inputs/SALVIAS-CSV/Organism/new_terms.csv
1
OBSERVATION_ID,individualID,,"Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
2
plot_code,locationName,,
3
census_date,eventDate,,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
4
-----
5
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
6
FROM ""SALVIAS-CSV"".organisms
7
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
8
GROUP BY ""PLOT_ID"", subplot
9
HAVING count(DISTINCT census_date) > 1
10
-----"
11
tag1,tag,/_alt/2/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
12
x_position,organismX_m,,"""x coordinate in meters"" (x_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: These are important, fundamental values of many tree plots"
13
y_position,organismY_m,,"""y coordinate in meters"" (y_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: See comment above for x_position"
14
voucher_string,collectorNumber,/_alt/2,"Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
15
coll_number,collectorNumber,/_alt/1,Brad: Map instead as for voucher_string
16
coll_lastname,recordedBy_surName,,"Brad: This is the collector of a separate specimen which vouchers this tree or species. I worry that vouchers are not properly accommodated in VegX. Again, we need to check with Nick."
17
coll_firstname,recordedBy_givenName,,Brad: See comment above
18
specific_authority,scientificNameAuthorship,,Brad: This is the author of the scientificName.
19
infra_rank_1,taxonRank,,
20
infra_ep_1,infraspecificEpithet,,
21
no_of_individuals,individualCount,,"Brad: 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."
22
stem_tag1,tag,/_alt/1/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
23
stem_height_m,height_m,/_alt/1,"""Total height of this stem only, in meters"" (stem_height_m definition at < http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: Same as for height, but applies to individuals stems, not trees. Rare."
24
stem_height_first_branch_m,heightFirstBranch_m,,"Brad: Same as for ht_first_branch_m, but applies to individuals stems, not trees. Rare."
25
orig_family,originalFamily,,Brad: OMIT
26
orig_species,originalSpecificEpithet,,Brad: OMIT
inputs/SALVIAS-CSV/Organism/unmapped_terms.csv
1
*row_num
2
*ind_id
3
*collector_code
4
*fam_status
5
*gen_status
6
*species_status
7
*comments
inputs/SALVIAS-CSV/Organism/header.csv
1
row_num,OBSERVATION_ID,PLOT_ID,plot_code,census_no,census_date,subplot,individual_code,ind_id,tag1,tag2,x_position,y_position,voucher_string,coll_number,collector_code,coll_lastname,coll_firstname,det_type,fam_status,gen_status,species_status,family,genus,specific_epithet,specific_authority,infra_rank_1,infra_ep_1,cf_aff,comments,habit,no_of_individuals,cover_percent,intercept_cm,height_m,ht_first_branch_m,stem_tag1,stem_tag2,stem_dbh,basal_diam,stem_height_m,stem_height_first_branch_m,stem_canopy_form,stem_canopy_position,stem_liana_infestation,notes,orig_family,orig_species
inputs/SALVIAS-CSV/Organism/map.csv
1
SALVIAS-CSV,VegCore,Filter,Comments
2
row_num,*row_num,,
3
OBSERVATION_ID,individualID,,"Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
4
PLOT_ID,locationID,,
5
plot_code,locationName,,
6
census_no,censusNumber,,"Brad: Assigned by SALVIAS. 1 for first plot, then 2, 3, etc. I can't recall if we even have repeat censuses in SALVIAS. Probably not."
7
census_date,eventDate,,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
8
-----
9
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
10
FROM ""SALVIAS-CSV"".organisms
11
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
12
GROUP BY ""PLOT_ID"", subplot
13
HAVING count(DISTINCT census_date) > 1
14
-----"
15
subplot,subplot,,
16
individual_code,individualCode,,"Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
17
ind_id,*ind_id,,Brad: OMIT
18
tag1,tag,/_alt/2/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
19
tag2,tag,/_alt/2/_alt/1,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
20
x_position,organismX_m,,"""x coordinate in meters"" (x_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: These are important, fundamental values of many tree plots"
21
y_position,organismY_m,,"""y coordinate in meters"" (y_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: See comment above for x_position"
22
voucher_string,collectorNumber,/_alt/2,"Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
23
coll_number,collectorNumber,/_alt/1,Brad: Map instead as for voucher_string
24
collector_code,*collector_code,,Brad: OMIT
25
coll_lastname,recordedBy_surName,,"Brad: This is the collector of a separate specimen which vouchers this tree or species. I worry that vouchers are not properly accommodated in VegX. Again, we need to check with Nick."
26
coll_firstname,recordedBy_givenName,,Brad: See comment above
27
det_type,voucherType,,"Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
28
fam_status,*fam_status,,Brad: OMIT. This will be determined later by using TNRS.
29
gen_status,*gen_status,,Brad: OMIT. This will be determined later by using TNRS.
30
species_status,*species_status,,"Brad: OMIT. Except, note that if species_status=3, this indicate that name is a morphospecies and not a standard latin name. Not exactly sure how to use this in BIEN, but could be useful during the name-scrubbing process with TNRS."
31
family,family,,
32
genus,genus,,
33
specific_epithet,specificEpithet,,
34
specific_authority,scientificNameAuthorship,,Brad: This is the author of the scientificName.
35
infra_rank_1,taxonRank,,
36
infra_ep_1,infraspecificEpithet,,
37
cf_aff,identificationQualifier,,"Brad: Not sure where this goes. Indicator of identification uncertainty. 'cf.'=similar to the species listed, 'aff.'=related to the species list, but not the same. You'll need to check with Bob and with Nick where these go in VegX and VegBank."
38
comments,*comments,,Brad: OMIT
39
habit,growthForm,"/_map:[./{T,Arbol,palm}=tree,./{H,""Hemiepífito""}=hemiepiphyte,./{L,l,""L?"",Liana}=liana,E=epiphyte,S=shrub,Hb=herb,""vine-herbaceous""=vine,graminoid=grass,rosette=forb,*=*]/value","Brad: This is growth form (tree, shrub, herb, etc.). It is an observation of a trait."
40
no_of_individuals,individualCount,,"Brad: 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."
41
cover_percent,coverPercent,,
42
intercept_cm,intercept_cm,,"Brad: This is an aggregate observation. Used in line-intercept methodology only, describes the point along centerline at which an individual intercepts the center line of the plot. Used to determin relative abundance."
43
height_m,height_m,/_alt/2,"""Total height of individual, in meters"" (height_m definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>)"
44
ht_first_branch_m,heightFirstBranch_m,,
45
stem_tag1,tag,/_alt/1/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
46
stem_tag2,tag,/_alt/1/_alt/1,The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: see above
47
stem_dbh,diameterBreastHeight_cm,,"Assuming units based on the units for intercept_cm, which measures the same dimension"
48
basal_diam,basalDiameter_cm,,Assuming units are the same as for stem_dbh because the values are similar and they measure the same dimension
49
stem_height_m,height_m,/_alt/1,"""Total height of this stem only, in meters"" (stem_height_m definition at < http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: Same as for height, but applies to individuals stems, not trees. Rare."
50
stem_height_first_branch_m,heightFirstBranch_m,,"Brad: Same as for ht_first_branch_m, but applies to individuals stems, not trees. Rare."
51
stem_canopy_form,canopyForm,,
52
stem_canopy_position,canopyPosition,,
53
stem_liana_infestation,lianaInfestation,,
54
notes,stemNotes,,
55
orig_family,originalFamily,,Brad: OMIT
56
orig_species,originalSpecificEpithet,,Brad: OMIT
inputs/SALVIAS-CSV/Organism/test.xml.ref
1
<!--put template-->
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>SALVIAS-CSV.new</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <parent_id>
11
                            <location>
12
                                <authorlocationcode>$plot_code</authorlocationcode>
13
                                <sourceaccessioncode>$PLOT_ID</sourceaccessioncode>
14
                            </location>
15
                        </parent_id>
16
                        <authorlocationcode>$subplot</authorlocationcode>
17
                        <locationevent>
18
                            <parent_id>
19
                                <locationevent>
20
                                    <location_id>
21
                                        <location>
22
                                            <authorlocationcode>
23
                                                <_if name="if subplot">
24
                                                    <cond>$subplot</cond>
25
                                                    <then>$plot_code</then>
26
                                                </_if>
27
                                            </authorlocationcode>
28
                                            <sourceaccessioncode>
29
                                                <_if name="if subplot">
30
                                                    <cond>$subplot</cond>
31
                                                    <then>$PLOT_ID</then>
32
                                                </_if>
33
                                            </sourceaccessioncode>
34
                                        </location>
35
                                    </location_id>
36
                                    <obsenddate><_dateRangeEnd><value>$census_date</value></_dateRangeEnd></obsenddate>
37
                                    <obsstartdate><_dateRangeStart><value>$census_date</value></_dateRangeStart></obsstartdate>
38
                                </locationevent>
39
                            </parent_id>
40
                            <locationevent fkey="parent_id">
41
                                <taxonoccurrence>
42
                                    <aggregateoccurrence>
43
                                        <count>$no_of_individuals</count>
44
                                        <cover_fraction><_percent_to_fraction><value>$cover_percent</value></_percent_to_fraction></cover_fraction>
45
                                        <definedvalue fkey="tablerecord_id">
46
                                            <userdefined_id>
47
                                                <userdefined>
48
                                                    <tablename>aggregateoccurrence</tablename>
49
                                                    <userdefinedname>censusNo</userdefinedname>
50
                                                </userdefined>
51
                                            </userdefined_id>
52
                                            <definedvalue>$census_no</definedvalue>
53
                                        </definedvalue>
54
                                        <linecover_m><_cm_to_m><value>$intercept_cm</value></_cm_to_m></linecover_m>
55
                                        <plantobservation>
56
                                            <authorplantcode>$individual_code</authorplantcode>
57
                                            <sourceaccessioncode>$OBSERVATION_ID</sourceaccessioncode>
58
                                            <specimenreplicate>
59
                                                <collectionnumber>
60
                                                    <_if name="if indirect voucher">
61
                                                        <cond>
62
                                                            <_eq>
63
                                                                <right>indirect</right>
64
                                                                <left>$det_type</left>
65
                                                            </_eq>
66
                                                        </cond>
67
                                                        <else>
68
                                                            <_alt>
69
                                                                <1>$coll_number</1>
70
                                                                <2>$voucher_string</2>
71
                                                            </_alt>
72
                                                        </else>
73
                                                    </_if>
74
                                                </collectionnumber>
75
                                            </specimenreplicate>
76
                                            <stemobservation>
77
                                                <basaldiameter_m><_cm_to_m><value>$basal_diam</value></_cm_to_m></basaldiameter_m>
78
                                                <definedvalue fkey="tablerecord_id">
79
                                                    <userdefined_id>
80
                                                        <userdefined>
81
                                                            <tablename>stemobservation</tablename>
82
                                                            <userdefinedname>canopyForm</userdefinedname>
83
                                                        </userdefined>
84
                                                    </userdefined_id>
85
                                                    <definedvalue>$stem_canopy_form</definedvalue>
86
                                                </definedvalue>
87
                                                <definedvalue fkey="tablerecord_id">
88
                                                    <userdefined_id>
89
                                                        <userdefined>
90
                                                            <tablename>stemobservation</tablename>
91
                                                            <userdefinedname>canopyPosition</userdefinedname>
92
                                                        </userdefined>
93
                                                    </userdefined_id>
94
                                                    <definedvalue>$stem_canopy_position</definedvalue>
95
                                                </definedvalue>
96
                                                <definedvalue fkey="tablerecord_id">
97
                                                    <userdefined_id>
98
                                                        <userdefined>
99
                                                            <tablename>stemobservation</tablename>
100
                                                            <userdefinedname>lianaInfestation</userdefinedname>
101
                                                        </userdefined>
102
                                                    </userdefined_id>
103
                                                    <definedvalue>$stem_liana_infestation</definedvalue>
104
                                                </definedvalue>
105
                                                <definedvalue fkey="tablerecord_id">
106
                                                    <userdefined_id>
107
                                                        <userdefined>
108
                                                            <tablename>stemobservation</tablename>
109
                                                            <userdefinedname>notes</userdefinedname>
110
                                                        </userdefined>
111
                                                    </userdefined_id>
112
                                                    <definedvalue>$notes</definedvalue>
113
                                                </definedvalue>
114
                                                <diameterbreastheight_m><_cm_to_m><value>$stem_dbh</value></_cm_to_m></diameterbreastheight_m>
115
                                                <height_m>
116
                                                    <_alt>
117
                                                        <1>$stem_height_m</1>
118
                                                        <2>$height_m</2>
119
                                                    </_alt>
120
                                                </height_m>
121
                                                <heightfirstbranch_m>
122
                                                    <_alt>
123
                                                        <0>$ht_first_branch_m</0>
124
                                                        <1>$stem_height_first_branch_m</1>
125
                                                    </_alt>
126
                                                </heightfirstbranch_m>
127
                                                <tag>
128
                                                    <_alt>
129
                                                        <1>
130
                                                            <_alt>
131
                                                                <1>$stem_tag2</1>
132
                                                                <2>$stem_tag1</2>
133
                                                            </_alt>
134
                                                        </1>
135
                                                        <2>
136
                                                            <_alt>
137
                                                                <1>$tag2</1>
138
                                                                <2>$tag1</2>
139
                                                            </_alt>
140
                                                        </2>
141
                                                    </_alt>
142
                                                </tag>
143
                                                <xposition_m>$x_position</xposition_m>
144
                                                <yposition_m>$y_position</yposition_m>
145
                                            </stemobservation>
146
                                        </plantobservation>
147
                                    </aggregateoccurrence>
148
                                    <authortaxoncode>$individual_code</authortaxoncode>
149
                                    <collector_id>
150
                                        <party>
151
                                            <fullname>
152
                                                <_join_words>
153
                                                    <1>$coll_firstname</1>
154
                                                    <2>$coll_lastname</2>
155
                                                </_join_words>
156
                                            </fullname>
157
                                        </party>
158
                                    </collector_id>
159
                                    <growthform>
160
                                        <_map>
161
                                            <T>tree</T>
162
                                            <Arbol>tree</Arbol>
163
                                            <palm>tree</palm>
164
                                            <H>hemiepiphyte</H>
165
                                            <Hemiepífito>hemiepiphyte</Hemiepífito>
166
                                            <L>liana</L>
167
                                            <l>liana</l>
168
                                            <L?>liana</L?>
169
                                            <Liana>liana</Liana>
170
                                            <E>epiphyte</E>
171
                                            <S>shrub</S>
172
                                            <Hb>herb</Hb>
173
                                            <vine-herbaceous>vine</vine-herbaceous>
174
                                            <graminoid>grass</graminoid>
175
                                            <rosette>forb</rosette>
176
                                            <*>*</*>
177
                                            <value>$habit</value>
178
                                        </_map>
179
                                    </growthform>
180
                                    <sourceaccessioncode>$OBSERVATION_ID</sourceaccessioncode>
181
                                    <taxondetermination>
182
                                        <taxonverbatim_id>
183
                                            <taxonverbatim>
184
                                                <taxonlabel_id>
185
                                                    <taxonlabel>
186
                                                        <parent_id>
187
                                                            <taxonlabel>
188
                                                                <rank>$infra_rank_1</rank>
189
                                                                <parent_id>
190
                                                                    <taxonlabel>
191
                                                                        <rank>cultivar</rank>
192
                                                                        <parent_id>
193
                                                                            <taxonlabel>
194
                                                                                <rank>forma</rank>
195
                                                                                <parent_id>
196
                                                                                    <taxonlabel>
197
                                                                                        <rank>variety</rank>
198
                                                                                        <parent_id>
199
                                                                                            <taxonlabel>
200
                                                                                                <rank>subspecies</rank>
201
                                                                                                <parent_id>
202
                                                                                                    <taxonlabel>
203
                                                                                                        <rank>species</rank>
204
                                                                                                        <taxonepithet>$specific_epithet</taxonepithet>
205
                                                                                                        <parent_id>
206
                                                                                                            <taxonlabel>
207
                                                                                                                <rank>genus</rank>
208
                                                                                                                <taxonepithet>$genus</taxonepithet>
209
                                                                                                                <parent_id>
210
                                                                                                                    <taxonlabel>
211
                                                                                                                        <rank>family</rank>
212
                                                                                                                        <taxonepithet>$family</taxonepithet>
213
                                                                                                                    </taxonlabel>
214
                                                                                                                </parent_id>
215
                                                                                                            </taxonlabel>
216
                                                                                                        </parent_id>
217
                                                                                                    </taxonlabel>
218
                                                                                                </parent_id>
219
                                                                                            </taxonlabel>
220
                                                                                        </parent_id>
221
                                                                                    </taxonlabel>
222
                                                                                </parent_id>
223
                                                                            </taxonlabel>
224
                                                                        </parent_id>
225
                                                                    </taxonlabel>
226
                                                                </parent_id>
227
                                                                <taxonepithet>$infra_ep_1</taxonepithet>
228
                                                            </taxonlabel>
229
                                                        </parent_id>
230
                                                        <rank>$infra_rank_1</rank>
231
                                                        <taxonomicname>
232
                                                            <_merge_prefix>
233
                                                                <prefix><_taxon_family_require_std><family>$family</family></_taxon_family_require_std></prefix>
234
                                                                <value>
235
                                                                    <_join_words>
236
                                                                        <1>
237
                                                                            <_join_words>
238
                                                                                <2><_filter_genus><value>$genus</value></_filter_genus></2>
239
                                                                                <3>$specific_epithet</3>
240
                                                                                <5>
241
                                                                                    <_join_words>
242
                                                                                        <1>
243
                                                                                            <_if name="if has infraspecificEpithet">
244
                                                                                                <cond>$infra_ep_1</cond>
245
                                                                                                <then>$infra_rank_1</then>
246
                                                                                            </_if>
247
                                                                                        </1>
248
                                                                                        <2>$infra_ep_1</2>
249
                                                                                    </_join_words>
250
                                                                                </5>
251
                                                                            </_join_words>
252
                                                                        </1>
253
                                                                        <2>$specific_authority</2>
254
                                                                    </_join_words>
255
                                                                </value>
256
                                                            </_merge_prefix>
257
                                                        </taxonomicname>
258
                                                    </taxonlabel>
259
                                                </taxonlabel_id>
260
                                                <author>$specific_authority</author>
261
                                                <family>$family</family>
262
                                                <genus>$genus</genus>
263
                                                <specific_epithet>$specific_epithet</specific_epithet>
264
                                                <verbatimrank>$infra_rank_1</verbatimrank>
265
                                            </taxonverbatim>
266
                                        </taxonverbatim_id>
267
                                        <taxonfit>$cf_aff</taxonfit>
268
                                    </taxondetermination>
269
                                    <taxondetermination>
270
                                        <isoriginal>true</isoriginal>
271
                                        <taxonverbatim_id>
272
                                            <taxonverbatim>
273
                                                <family>$orig_family</family>
274
                                                <specific_epithet>$orig_species</specific_epithet>
275
                                            </taxonverbatim>
276
                                        </taxonverbatim_id>
277
                                    </taxondetermination>
278
                                    <voucher>
279
                                        <specimenreplicate_id>
280
                                            <specimenreplicate>
281
                                                <collectionnumber>
282
                                                    <_if name="if indirect voucher">
283
                                                        <cond>
284
                                                            <_eq>
285
                                                                <right>indirect</right>
286
                                                                <left>$det_type</left>
287
                                                            </_eq>
288
                                                        </cond>
289
                                                        <then>
290
                                                            <_alt>
291
                                                                <1>$coll_number</1>
292
                                                                <2>$voucher_string</2>
293
                                                            </_alt>
294
                                                        </then>
295
                                                    </_if>
296
                                                </collectionnumber>
297
                                            </specimenreplicate>
298
                                        </specimenreplicate_id>
299
                                    </voucher>
300
                                </taxonoccurrence>
301
                            </locationevent>
302
                            <obsenddate><_dateRangeEnd><value>$census_date</value></_dateRangeEnd></obsenddate>
303
                            <obsstartdate><_dateRangeStart><value>$census_date</value></_dateRangeStart></obsstartdate>
304
                        </locationevent>
305
                        <sourceaccessioncode>
306
                            <_join>
307
                                <1>$PLOT_ID</1>
308
                                <2>$subplot</2>
309
                            </_join>
310
                        </sourceaccessioncode>
311
                    </location>
312
                </path>
313
            </_simplifyPath>
314
        </path>
315
    </_setDefault>
316
</VegBIEN>
317
Inserted 45 new rows into database
inputs/SALVIAS-CSV/Organism/VegBIEN.csv
1
SALVIAS-CSV,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
subplot,"/location/_if[@name=""if subplot""]/cond/_exists",
3
plot_code,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/1",
4
PLOT_ID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/2/_if[@name=""if locationID""]/cond/_exists",
5
det_type,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/3/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
6
PLOT_ID,"/location/_if[@name=""if subplot""]/else/sourceaccessioncode",
7
plot_code,"/location/_if[@name=""if subplot""]/then/parent_id/location/authorlocationcode",
8
PLOT_ID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
9
subplot,/location/authorlocationcode,
10
OBSERVATION_ID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
11
coll_number,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_alt/1",Brad: Map instead as for voucher_string
12
voucher_string,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
13
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists",
14
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/cond/_exists","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
15
-----
16
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
17
FROM ""SALVIAS-CSV"".organisms
18
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
19
GROUP BY ""PLOT_ID"", subplot
20
HAVING count(DISTINCT census_date) > 1
21
-----"
22
subplot,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode/_if[@name=""if subplot""]/cond/_first/2",
23
plot_code,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode/_if[@name=""if subplot""]/then",
24
subplot,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode/_if[@name=""if subplot""]/cond/_first/2",
25
PLOT_ID,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode/_if[@name=""if subplot""]/then",
26
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsenddate/_alt/2/_dateRangeEnd/value","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
27
-----
28
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
29
FROM ""SALVIAS-CSV"".organisms
30
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
31
GROUP BY ""PLOT_ID"", subplot
32
HAVING count(DISTINCT census_date) > 1
33
-----"
34
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsstartdate/_alt/2/_dateRangeStart/value","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
35
-----
36
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
37
FROM ""SALVIAS-CSV"".organisms
38
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
39
GROUP BY ""PLOT_ID"", subplot
40
HAVING count(DISTINCT census_date) > 1
41
-----"
42
cf_aff,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit","Brad: Not sure where this goes. Indicator of identification uncertainty. 'cf.'=similar to the species listed, 'aff.'=related to the species list, but not the same. You'll need to check with Bob and with Nick where these go in VegX and VegBank."
43
no_of_individuals,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/count,"Brad: 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."
44
cover_percent,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/cover_fraction/_percent_to_fraction/value,
45
census_no,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/definedvalue[*_id/userdefined[tablename=aggregateoccurrence,userdefinedname=censusNo]]:[@fkey=tablerecord_id]/definedvalue","Brad: Assigned by SALVIAS. 1 for first plot, then 2, 3, etc. I can't recall if we even have repeat censuses in SALVIAS. Probably not."
46
intercept_cm,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/linecover_m/_cm_to_m/value,"Brad: This is an aggregate observation. Used in line-intercept methodology only, describes the point along centerline at which an individual intercepts the center line of the plot. Used to determin relative abundance."
47
individual_code,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/1,"Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
48
coll_number,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/2/_alt/1,Brad: Map instead as for voucher_string
49
voucher_string,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/2/_alt/2,"Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
50
OBSERVATION_ID,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/sourceaccessioncode/_first/2,"Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
51
det_type,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
52
det_type,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
53
coll_number,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else/_alt/1",Brad: Map instead as for voucher_string
54
voucher_string,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
55
basal_diam,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/basaldiameter_m/_cm_to_m/value,Assuming units are the same as for stem_dbh because the values are similar and they measure the same dimension
56
stem_canopy_form,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyForm]]:[@fkey=tablerecord_id]/definedvalue",
57
stem_canopy_position,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyPosition]]:[@fkey=tablerecord_id]/definedvalue",
58
stem_liana_infestation,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=lianaInfestation]]:[@fkey=tablerecord_id]/definedvalue",
59
notes,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=notes]]:[@fkey=tablerecord_id]/definedvalue",
60
stem_dbh,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value,"Assuming units based on the units for intercept_cm, which measures the same dimension"
61
stem_height_m,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m/_alt/1,"""Total height of this stem only, in meters"" (stem_height_m definition at < http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: Same as for height, but applies to individuals stems, not trees. Rare."
62
height_m,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m/_alt/2,"""Total height of individual, in meters"" (height_m definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>)"
63
ht_first_branch_m,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/heightfirstbranch_m,
64
stem_height_first_branch_m,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/heightfirstbranch_m,"Brad: Same as for ht_first_branch_m, but applies to individuals stems, not trees. Rare."
65
stem_tag2,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag/_alt/1/_alt/1,The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: see above
66
stem_tag1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag/_alt/1/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
67
tag2,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag/_alt/2/_alt/1,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
68
tag1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag/_alt/2/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
69
x_position,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/xposition_m,"""x coordinate in meters"" (x_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: These are important, fundamental values of many tree plots"
70
y_position,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/yposition_m,"""y coordinate in meters"" (y_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: See comment above for x_position"
71
PLOT_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
72
plot_code,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
73
OBSERVATION_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/1/_if[@name=""if individual""]/cond/_exists","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
74
individual_code,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/1","Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
75
stem_tag2,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2/_alt/1/_alt/1",The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: see above
76
stem_tag1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2/_alt/1/_alt/2","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
77
tag2,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2/_alt/2/_alt/1","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
78
tag1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2/_alt/2/_alt/2","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
79
coll_number,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3/_alt/1",Brad: Map instead as for voucher_string
80
voucher_string,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
81
coll_firstname,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/collector_id/party/fullname/_join_words/1,Brad: See comment above
82
coll_lastname,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/collector_id/party/fullname/_join_words/2,"Brad: This is the collector of a separate specimen which vouchers this tree or species. I worry that vouchers are not properly accommodated in VegX. Again, we need to check with Nick."
83
habit,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/growthform/_map:[./{T,Arbol,palm}=tree,./{H,""Hemiepífito""}=hemiepiphyte,./{L,l,""L?"",Liana}=liana,E=epiphyte,S=shrub,Hb=herb,""vine-herbaceous""=vine,graminoid=grass,rosette=forb,*=*]/value","Brad: This is growth form (tree, shrub, herb, etc.). It is an observation of a trait."
84
OBSERVATION_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
85
coll_number,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_alt/1",Brad: Map instead as for voucher_string
86
voucher_string,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
87
OBSERVATION_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else/_first/2","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
88
infra_rank_1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
89
specific_epithet,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
90
genus,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet",
91
family,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet",
92
infra_ep_1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/taxonepithet,
93
infra_rank_1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/rank,
94
infra_rank_1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
95
family,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family,
96
genus,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2/_filter_genus/value,
97
specific_epithet,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1,
98
infra_ep_1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
99
infra_rank_1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
100
infra_ep_1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2,
101
specific_authority,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/2,Brad: This is the author of the scientificName.
102
specific_authority,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/author,Brad: This is the author of the scientificName.
103
family,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/family,
104
genus,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/genus,
105
specific_epithet,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/specific_epithet,
106
infra_rank_1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/verbatimrank,
107
cf_aff,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/taxonfit,"Brad: Not sure where this goes. Indicator of identification uncertainty. 'cf.'=similar to the species listed, 'aff.'=related to the species list, but not the same. You'll need to check with Bob and with Nick where these go in VegX and VegBank."
108
orig_family,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/family,Brad: OMIT
109
orig_species,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/specific_epithet,Brad: OMIT
110
det_type,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
111
det_type,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
112
coll_number,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/then/_alt/1",Brad: Map instead as for voucher_string
113
voucher_string,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/then/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
114
census_date,/location/locationevent/obsenddate/_alt/2/_dateRangeEnd/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
115
-----
116
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
117
FROM ""SALVIAS-CSV"".organisms
118
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
119
GROUP BY ""PLOT_ID"", subplot
120
HAVING count(DISTINCT census_date) > 1
121
-----"
122
census_date,/location/locationevent/obsstartdate/_alt/2/_dateRangeStart/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
123
-----
124
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
125
FROM ""SALVIAS-CSV"".organisms
126
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
127
GROUP BY ""PLOT_ID"", subplot
128
HAVING count(DISTINCT census_date) > 1
129
-----"
130
PLOT_ID,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/cond/_exists",
131
subplot,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/then/_if[@name=""if subplot""]/cond/_exists",
132
PLOT_ID,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/then/_if[@name=""if subplot""]/then/_join/1",
133
subplot,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/then/_if[@name=""if subplot""]/then/_join/2",
134
collector_code,,** No join mapping for *collector_code ** Brad: OMIT
135
comments,,** No join mapping for *comments ** Brad: OMIT
136
fam_status,,** No join mapping for *fam_status ** Brad: OMIT. This will be determined later by using TNRS.
137
gen_status,,** No join mapping for *gen_status ** Brad: OMIT. This will be determined later by using TNRS.
138
ind_id,,** No join mapping for *ind_id ** Brad: OMIT
139
row_num,,** No join mapping for *row_num ** 
140
species_status,,"** No join mapping for *species_status ** Brad: OMIT. Except, note that if species_status=3, this indicate that name is a morphospecies and not a standard latin name. Not exactly sure how to use this in BIEN, but could be useful during the name-scrubbing process with TNRS."
inputs/SALVIAS-CSV/Source/map.csv
1
SALVIAS-CSV,VegCore,Filter,Comments
2
row_num,*row_num,,
3
:aggregator,sourceType,,
4
:plot,observationGranularity,,
inputs/SALVIAS-CSV/Source/test.xml.ref
1
<!--put template-->
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>SALVIAS-CSV.new</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <source>
10
                        <shortname>SALVIAS-CSV.new</shortname>
11
                        <observationtype>plot</observationtype>
12
                        <sourcetype>aggregator</sourcetype>
13
                    </source>
14
                </path>
15
            </_simplifyPath>
16
        </path>
17
    </_setDefault>
18
</VegBIEN>
19
Inserted 1 new rows into database
inputs/SALVIAS-CSV/Source/VegBIEN.csv
1
link ../../../mappings/VegCore-VegBIEN.csv
2 0

  
inputs/SALVIAS-CSV/Source/unmapped_terms.csv
1
*row_num
inputs/SALVIAS-CSV/Source/header.csv
1
row_num
inputs/SALVIAS-CSV/Source/data.csv
1

  
2

  
inputs/SALVIAS-CSV/Source/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
3 0

  
inputs/.archive/SALVIAS-CSV/unmapped_terms.csv
1
*collector_code
2
*comments
3
*fam_status
4
*gen_status
5
*ind_id
6
*recensused
7
*species_status
inputs/.archive/SALVIAS-CSV/Organism/VegBIEN.csv
1
SALVIAS-CSV,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
subplot,"/location/_if[@name=""if subplot""]/cond/_exists",
3
plot_code,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/1",
4
PLOT_ID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/2/_if[@name=""if locationID""]/cond/_exists",
5
det_type,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_if[@name=""if plot""]/else/_alt/2/_if[@name=""if catalogNumber""]/then/_join/3/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
6
PLOT_ID,"/location/_if[@name=""if subplot""]/else/sourceaccessioncode",
7
plot_code,"/location/_if[@name=""if subplot""]/then/parent_id/location/authorlocationcode",
8
PLOT_ID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
9
subplot,/location/authorlocationcode,
10
OBSERVATION_ID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
11
coll_number,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_alt/1",Brad: Map instead as for voucher_string
12
voucher_string,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
13
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists",
14
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/cond/_exists","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
15
-----
16
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
17
FROM ""SALVIAS-CSV"".organisms
18
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
19
GROUP BY ""PLOT_ID"", subplot
20
HAVING count(DISTINCT census_date) > 1
21
-----"
22
subplot,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode/_if[@name=""if subplot""]/cond/_first/2",
23
plot_code,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode/_if[@name=""if subplot""]/then",
24
subplot,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode/_if[@name=""if subplot""]/cond/_first/2",
25
PLOT_ID,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode/_if[@name=""if subplot""]/then",
26
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsenddate/_alt/2/_dateRangeEnd/value","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
27
-----
28
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
29
FROM ""SALVIAS-CSV"".organisms
30
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
31
GROUP BY ""PLOT_ID"", subplot
32
HAVING count(DISTINCT census_date) > 1
33
-----"
34
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsstartdate/_alt/2/_dateRangeStart/value","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
35
-----
36
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
37
FROM ""SALVIAS-CSV"".organisms
38
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
39
GROUP BY ""PLOT_ID"", subplot
40
HAVING count(DISTINCT census_date) > 1
41
-----"
42
cf_aff,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit","Brad: Not sure where this goes. Indicator of identification uncertainty. 'cf.'=similar to the species listed, 'aff.'=related to the species list, but not the same. You'll need to check with Bob and with Nick where these go in VegX and VegBank."
43
no_of_individuals,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/count,"Brad: 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."
44
cover_percent,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/cover_fraction/_percent_to_fraction/value,
45
census_no,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/definedvalue[*_id/userdefined[tablename=aggregateoccurrence,userdefinedname=censusNo]]:[@fkey=tablerecord_id]/definedvalue","Brad: Assigned by SALVIAS. 1 for first plot, then 2, 3, etc. I can't recall if we even have repeat censuses in SALVIAS. Probably not."
46
intercept_cm,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/linecover_m/_cm_to_m/value,"Brad: This is an aggregate observation. Used in line-intercept methodology only, describes the point along centerline at which an individual intercepts the center line of the plot. Used to determin relative abundance."
47
individual_code,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/1,"Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
48
coll_number,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/2/_alt/1,Brad: Map instead as for voucher_string
49
voucher_string,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/authorplantcode/_first/2/_alt/2,"Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
50
OBSERVATION_ID,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/sourceaccessioncode/_first/2,"Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
51
det_type,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
52
det_type,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
53
coll_number,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else/_alt/1",Brad: Map instead as for voucher_string
54
voucher_string,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/else/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
55
basal_diam,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/basaldiameter_m/_cm_to_m/value,Assuming units are the same as for stem_dbh because the values are similar and they measure the same dimension
56
stem_canopy_form,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyForm]]:[@fkey=tablerecord_id]/definedvalue",
57
stem_canopy_position,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyPosition]]:[@fkey=tablerecord_id]/definedvalue",
58
stem_liana_infestation,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=lianaInfestation]]:[@fkey=tablerecord_id]/definedvalue",
59
notes,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=notes]]:[@fkey=tablerecord_id]/definedvalue",
60
stem_dbh,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value,"Assuming units based on the units for intercept_cm, which measures the same dimension"
61
stem_height_m,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m/_alt/1,"""Total height of this stem only, in meters"" (stem_height_m definition at < http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: Same as for height, but applies to individuals stems, not trees. Rare."
62
height_m,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m/_alt/2,"""Total height of individual, in meters"" (height_m definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>)"
63
ht_first_branch_m,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/heightfirstbranch_m,
64
stem_height_first_branch_m,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/heightfirstbranch_m,"Brad: Same as for ht_first_branch_m, but applies to individuals stems, not trees. Rare."
65
stem_tag2,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag/_alt/1/_alt/1,The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: see above
66
stem_tag1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag/_alt/1/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
67
tag2,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag/_alt/2/_alt/1,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
68
tag1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag/_alt/2/_alt/2,"The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
69
x_position,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/xposition_m,"""x coordinate in meters"" (x_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: These are important, fundamental values of many tree plots"
70
y_position,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/yposition_m,"""y coordinate in meters"" (y_position definition at <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>). Brad: See comment above for x_position"
71
PLOT_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
72
plot_code,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
73
OBSERVATION_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/1/_if[@name=""if individual""]/cond/_exists","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
74
individual_code,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/1","Brad: Code, if any, used by the data provider to indicate an individual tree. Scope is unknown, although typically this value is unique only within plot, or sometimes only within subplot."
75
stem_tag2,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2/_alt/1/_alt/1",The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: see above
76
stem_tag1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2/_alt/1/_alt/2","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Same as tag1 & tag2, but applied to individual stems. I'm still not clear how to distinguish between methods which tag only individuals trees, and those which tag individual stems."
77
tag2,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2/_alt/2/_alt/1","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: See commend for tag1. Your mapping for tag2 looks correct. Probably both values would go here, only nested, with one superceding the other."
78
tag1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2/_alt/2/_alt/2","The second tag supercedes the first. The stem tag supercedes the tree tag. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
79
coll_number,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3/_alt/1",Brad: Map instead as for voucher_string
80
voucher_string,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
81
coll_firstname,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/collector_id/party/fullname/_join_words/1,Brad: See comment above
82
coll_lastname,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/collector_id/party/fullname/_join_words/2,"Brad: This is the collector of a separate specimen which vouchers this tree or species. I worry that vouchers are not properly accommodated in VegX. Again, we need to check with Nick."
83
habit,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/growthform/_map:[./{T,Arbol,palm}=tree,./{H,""Hemiepífito""}=hemiepiphyte,./{L,l,""L?"",Liana}=liana,E=epiphyte,S=shrub,Hb=herb,""vine-herbaceous""=vine,graminoid=grass,rosette=forb,*=*]/value","Brad: This is growth form (tree, shrub, herb, etc.). It is an observation of a trait."
84
OBSERVATION_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
85
coll_number,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_alt/1",Brad: Map instead as for voucher_string
86
voucher_string,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
87
OBSERVATION_ID,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else/_first/2","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
88
infra_rank_1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
89
specific_epithet,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
90
genus,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet",
91
family,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet",
92
infra_ep_1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/taxonepithet,
93
infra_rank_1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/rank,
94
infra_rank_1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonepithet/_if[@name=""if taxonomic name is epithet""]/cond/_alt:[2=true]/1/_taxonomic_name_is_epithet/rank",
95
family,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family,
96
genus,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2/_filter_genus/value,
97
specific_epithet,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1,
98
infra_ep_1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
99
infra_rank_1,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
100
infra_ep_1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2,
101
specific_authority,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/2,Brad: This is the author of the scientificName.
102
specific_authority,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/author,Brad: This is the author of the scientificName.
103
family,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/family,
104
genus,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/genus,
105
specific_epithet,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/specific_epithet,
106
infra_rank_1,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/*_id/taxonverbatim/verbatimrank,
107
cf_aff,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[!isoriginal=true]/taxonfit,"Brad: Not sure where this goes. Indicator of identification uncertainty. 'cf.'=similar to the species listed, 'aff.'=related to the species list, but not the same. You'll need to check with Bob and with Nick where these go in VegX and VegBank."
108
orig_family,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/family,Brad: OMIT
109
orig_species,/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/specific_epithet,Brad: OMIT
110
det_type,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
111
det_type,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
112
coll_number,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/then/_alt/1",Brad: Map instead as for voucher_string
113
voucher_string,"/location/locationevent/locationevent:[@fkey=parent_id]/taxonoccurrence/voucher/*_id/specimenreplicate/collectionnumber/_if[@name=""if indirect voucher""]/then/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
114
census_date,/location/locationevent/obsenddate/_alt/2/_dateRangeEnd/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
115
-----
116
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
117
FROM ""SALVIAS-CSV"".organisms
118
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
119
GROUP BY ""PLOT_ID"", subplot
120
HAVING count(DISTINCT census_date) > 1
121
-----"
122
census_date,/location/locationevent/obsstartdate/_alt/2/_dateRangeStart/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
123
-----
124
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
125
FROM ""SALVIAS-CSV"".organisms
126
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
127
GROUP BY ""PLOT_ID"", subplot
128
HAVING count(DISTINCT census_date) > 1
129
-----"
130
PLOT_ID,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/cond/_exists",
131
subplot,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/then/_if[@name=""if subplot""]/cond/_exists",
132
PLOT_ID,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/then/_if[@name=""if subplot""]/then/_join/1",
133
subplot,"/location/sourceaccessioncode/_first/2/_if[@name=""if locationID""]/then/_if[@name=""if subplot""]/then/_join/2",
134
collector_code,,** No join mapping for *collector_code ** Brad: OMIT
135
comments,,** No join mapping for *comments ** Brad: OMIT
136
fam_status,,** No join mapping for *fam_status ** Brad: OMIT. This will be determined later by using TNRS.
137
gen_status,,** No join mapping for *gen_status ** Brad: OMIT. This will be determined later by using TNRS.
138
ind_id,,** No join mapping for *ind_id ** Brad: OMIT
139
row_num,,** No join mapping for *row_num ** 
140
species_status,,"** No join mapping for *species_status ** Brad: OMIT. Except, note that if species_status=3, this indicate that name is a morphospecies and not a standard latin name. Not exactly sure how to use this in BIEN, but could be useful during the name-scrubbing process with TNRS."
inputs/.archive/SALVIAS-CSV/Organism/test.xml.ref
1
<!--put template-->
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>SALVIAS-CSV.new</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <parent_id>
11
                            <location>
12
                                <authorlocationcode>$plot_code</authorlocationcode>
13
                                <sourceaccessioncode>$PLOT_ID</sourceaccessioncode>
14
                            </location>
15
                        </parent_id>
16
                        <authorlocationcode>$subplot</authorlocationcode>
17
                        <locationevent>
18
                            <parent_id>
19
                                <locationevent>
20
                                    <location_id>
21
                                        <location>
22
                                            <authorlocationcode>
23
                                                <_if name="if subplot">
24
                                                    <cond>$subplot</cond>
25
                                                    <then>$plot_code</then>
26
                                                </_if>
27
                                            </authorlocationcode>
28
                                            <sourceaccessioncode>
29
                                                <_if name="if subplot">
30
                                                    <cond>$subplot</cond>
31
                                                    <then>$PLOT_ID</then>
32
                                                </_if>
33
                                            </sourceaccessioncode>
34
                                        </location>
35
                                    </location_id>
36
                                    <obsenddate><_dateRangeEnd><value>$census_date</value></_dateRangeEnd></obsenddate>
37
                                    <obsstartdate><_dateRangeStart><value>$census_date</value></_dateRangeStart></obsstartdate>
38
                                </locationevent>
39
                            </parent_id>
40
                            <locationevent fkey="parent_id">
41
                                <taxonoccurrence>
42
                                    <aggregateoccurrence>
43
                                        <count>$no_of_individuals</count>
44
                                        <cover_fraction><_percent_to_fraction><value>$cover_percent</value></_percent_to_fraction></cover_fraction>
45
                                        <definedvalue fkey="tablerecord_id">
46
                                            <userdefined_id>
47
                                                <userdefined>
48
                                                    <tablename>aggregateoccurrence</tablename>
49
                                                    <userdefinedname>censusNo</userdefinedname>
50
                                                </userdefined>
51
                                            </userdefined_id>
52
                                            <definedvalue>$census_no</definedvalue>
53
                                        </definedvalue>
54
                                        <linecover_m><_cm_to_m><value>$intercept_cm</value></_cm_to_m></linecover_m>
55
                                        <plantobservation>
56
                                            <authorplantcode>$individual_code</authorplantcode>
57
                                            <sourceaccessioncode>$OBSERVATION_ID</sourceaccessioncode>
58
                                            <specimenreplicate>
59
                                                <collectionnumber>
60
                                                    <_if name="if indirect voucher">
61
                                                        <cond>
62
                                                            <_eq>
63
                                                                <right>indirect</right>
64
                                                                <left>$det_type</left>
65
                                                            </_eq>
66
                                                        </cond>
67
                                                        <else>
68
                                                            <_alt>
69
                                                                <1>$coll_number</1>
70
                                                                <2>$voucher_string</2>
71
                                                            </_alt>
72
                                                        </else>
73
                                                    </_if>
74
                                                </collectionnumber>
75
                                            </specimenreplicate>
76
                                            <stemobservation>
77
                                                <basaldiameter_m><_cm_to_m><value>$basal_diam</value></_cm_to_m></basaldiameter_m>
78
                                                <definedvalue fkey="tablerecord_id">
79
                                                    <userdefined_id>
80
                                                        <userdefined>
81
                                                            <tablename>stemobservation</tablename>
82
                                                            <userdefinedname>canopyForm</userdefinedname>
83
                                                        </userdefined>
84
                                                    </userdefined_id>
85
                                                    <definedvalue>$stem_canopy_form</definedvalue>
86
                                                </definedvalue>
87
                                                <definedvalue fkey="tablerecord_id">
88
                                                    <userdefined_id>
89
                                                        <userdefined>
90
                                                            <tablename>stemobservation</tablename>
91
                                                            <userdefinedname>canopyPosition</userdefinedname>
92
                                                        </userdefined>
93
                                                    </userdefined_id>
94
                                                    <definedvalue>$stem_canopy_position</definedvalue>
95
                                                </definedvalue>
96
                                                <definedvalue fkey="tablerecord_id">
97
                                                    <userdefined_id>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff