Project

General

Profile

« Previous | Next » 

Revision 3223

mappings/VegX-VegBIEN.stems.csv: Fixing specimenreplicate->taxonoccurrence mapping bug where taxonoccurrence_id is no longer used as an fkey because it's instead a pkey inherited from taxonoccurrence, by instead using the new fkey to plantobservation for direct vouchers. Note that a duplicate aggregateoccurrence is created, because the _if XML function runs after the XPaths have created the initial tree, and thus the nodes it pulls forward do not automatically get merged with adjacent nodes of the same name. This will eventually need to be fixed by auto-merging the nodes.

View differences:

inputs/SALVIAS-CSV/test/VegBIEN.organisms.xml.ref
4 4
        <aggregateoccurrence>
5 5
            <taxonoccurrence_id>
6 6
                <taxonoccurrence>
7
                    <voucher>
8
                        <specimenreplicate_id>
9
                            <specimenreplicate>
10
                                <taxonoccurrence_id><taxonoccurrence/></taxonoccurrence_id>
11
                                <datasource_id><party><organizationname>SALVIAS-CSV</organizationname></party></datasource_id>
12
                                <catalognumber_dwc>14598</catalognumber_dwc>
13
                            </specimenreplicate>
14
                        </specimenreplicate_id>
15
                    </voucher>
16
                </taxonoccurrence>
17
            </taxonoccurrence_id>
18
        </aggregateoccurrence>
19
        <aggregateoccurrence>
20
            <taxonoccurrence_id>
21
                <taxonoccurrence>
7 22
                    <locationevent_id>
8 23
                        <locationevent>
9 24
                            <obsstartdate>2001-01-01</obsstartdate>
......
30 45
                            <authorlocationcode>1</authorlocationcode>
31 46
                        </locationevent>
32 47
                    </locationevent_id>
33
                    <voucher>
34
                        <specimenreplicate_id>
35
                            <specimenreplicate>
36
                                <taxonoccurrence_id><taxonoccurrence/></taxonoccurrence_id>
37
                                <datasource_id><party><organizationname>SALVIAS-CSV</organizationname></party></datasource_id>
38
                                <catalognumber_dwc>14598</catalognumber_dwc>
39
                            </specimenreplicate>
40
                        </specimenreplicate_id>
41
                    </voucher>
42 48
                    <growthform>tree</growthform>
43 49
                    <taxondetermination>
44 50
                        <iscurrent>true</iscurrent>
......
118 124
        <aggregateoccurrence>
119 125
            <taxonoccurrence_id>
120 126
                <taxonoccurrence>
127
                    <voucher>
128
                        <specimenreplicate_id>
129
                            <specimenreplicate>
130
                                <taxonoccurrence_id><taxonoccurrence/></taxonoccurrence_id>
131
                                <datasource_id><party><organizationname>SALVIAS-CSV</organizationname></party></datasource_id>
132
                                <catalognumber_dwc>14669</catalognumber_dwc>
133
                            </specimenreplicate>
134
                        </specimenreplicate_id>
135
                    </voucher>
136
                </taxonoccurrence>
137
            </taxonoccurrence_id>
138
        </aggregateoccurrence>
139
        <aggregateoccurrence>
140
            <taxonoccurrence_id>
141
                <taxonoccurrence>
121 142
                    <locationevent_id>
122 143
                        <locationevent>
123 144
                            <obsstartdate>2001-01-01</obsstartdate>
......
144 165
                            <authorlocationcode>4</authorlocationcode>
145 166
                        </locationevent>
146 167
                    </locationevent_id>
147
                    <voucher>
148
                        <specimenreplicate_id>
149
                            <specimenreplicate>
150
                                <taxonoccurrence_id><taxonoccurrence/></taxonoccurrence_id>
151
                                <datasource_id><party><organizationname>SALVIAS-CSV</organizationname></party></datasource_id>
152
                                <catalognumber_dwc>14669</catalognumber_dwc>
153
                            </specimenreplicate>
154
                        </specimenreplicate_id>
155
                    </voucher>
156 168
                    <growthform>tree</growthform>
157 169
                    <taxondetermination>
158 170
                        <iscurrent>true</iscurrent>
inputs/SALVIAS-CSV/test/import.organisms.out.ref
1
Inserted 46 new rows into database
1
Inserted 48 new rows into database
inputs/SALVIAS-CSV/maps/VegBIEN.organisms.csv
1 1
SALVIAS-CSV,VegBIEN:/plantobservation,Comments
2
coll_number,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/1",Brad: Incorrect. Map instead as for voucher_string
3
voucher_string,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
2 4
census_date,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/obsstartdate/_date/year,
3 5
plot_code,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{parent_id/locationevent/{authorlocationcode,*_id/location/sourceaccessioncode/_alt/2},*_id/location/sourceaccessioncode/_merge/1/_alt/2}","Brad: Same as plotCode, above"
4 6
PLOT_ID,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{parent_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{sourceaccessioncode,*_id/location/sourceaccessioncode/_alt/1},*_id/location/sourceaccessioncode/_merge/1/_alt/1}","Brad: Not sure why this is repeated? This field and plotCode, as the same as above."
5 7
subplot,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{authorlocationcode,*_id/location/sourceaccessioncode/_merge/2/_alt/2}",
6
coll_number,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/1",Brad: Incorrect. Map instead as for voucher_string
7
voucher_string,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
8 8
habit,"/aggregateoccurrence/*_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: Incorrect for VegBank, correct for VegX. This is growth form (tree, shrub, herb, etc.). It is an observation of a trait."
9 9
infra_rank_1,"/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=subspecies]/plantname/_name/first",
10 10
specific_authority,"/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]:[iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=authority]/plantname",Brad: Incorrect. This is the author of the scientificName. The should be a place for this in the taxonomic name elements of VegB and VegX. Let's discuss.
......
17 17
orig_family,"/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=identifier]:[isoriginal=true,iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=family]/plantname",Brad: OMIT
18 18
coll_firstname,/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/first,Brad: See comment above
19 19
coll_lastname,/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/last,"Brad: Correct for VegBank. 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."
20
det_type,/aggregateoccurrence/*_id/taxonoccurrence/{.}/_ignore/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.; ""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
21 20
no_of_individuals,/aggregateoccurrence/count,"Brad: Incorrect for VegX. This is a count of number of indiiduals for an *aggregate* observation. For VegBank, I'm not sure. Not exactly the same as stemCount. An individual tree could have 3 stems but would still only count as 1. We need to check with Bob on this."
22 21
cover_percent,/aggregateoccurrence/cover,
23 22
census_no,"/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."
......
32 31
stem_tag2,/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/tag/_alt/2,Brad: see above
33 32
x_position,/stemobservation/xposition,"Brad: Correct for VegBank. I'm not so sure for VegX. Let's ask Nick about this. These are important, fundamental values of many tree plots, and should be accommodated within VegX."
34 33
y_position,/stemobservation/yposition,Brad: See comment above for x_position
34
det_type,/{.}/_ignore/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.; ""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
35 35
basal_diam,,** No join mapping for /diameterBaseDistance[baseDistance/value=0]/diameter ** 
36 36
collector_code,,Brad: OMIT
37 37
comments,,Brad: OMIT
inputs/CTFS/test/import.organisms.out.ref
1
Inserted 41 new rows into database
1
Inserted 43 new rows into database
inputs/CTFS/maps/VegBIEN.organisms.csv
1 1
CTFS[VegX]:/*s/individualOrganismObservation,VegBIEN:/plantobservation,Comments
2
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
3
/simpleUserdefined[name=collectionDate]/value,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
4
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
2 5
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/area,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/area,
3 6
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/elevation/_alt/1,
4 7
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination/coordsaccuracy,
......
48 51
/*ID->/*s/plotObservation/partyWithRole/*ID->/parties/party/organizationName,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{.,*_id/location}/datasource_id/party/organizationname/_alt/1",
49 52
/*ID->/*s/plotObservation/plotUniqueIdentifierID->/*s/plot[plotUniqueIdentifier]/plotName,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{authorlocationcode,*_id/location/sourceaccessioncode/_merge/2/_alt/2}",
50 53
/*ID->/*s/plotObservation/plotUniqueIdentifierID->/*s/plot[plotUniqueIdentifier]/plotUniqueIdentifier,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{sourceaccessioncode,*_id/location/sourceaccessioncode/_merge/2/_alt/1}",
51
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
52
/simpleUserdefined[name=collectionDate]/value,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
53
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
54 54
/simpleUserdefined[name=growthForm]/value,/aggregateoccurrence/*_id/taxonoccurrence/growthform,
55 55
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=TaxonomicRankBelowSubspeciesEnum])/tcs:Rank","/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=subspecies]/plantname/_name/first",
56 56
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=auth])/tcs:Name","/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]:[iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=authority]/plantname",
......
72 72
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,!partyWithRole]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=reg])/tcs:Name","/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=identifier]:[isoriginal=true,iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,family,order,class,subkingdom,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=kingdom]/plantname",
73 73
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/givenName",/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/first,
74 74
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/surName",/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/last,
75
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/aggregateoccurrence/*_id/taxonoccurrence/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
76 75
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/aggregateOrganismObservation[*ID]/*/aggregateValue/value,/aggregateoccurrence/count,
77 76
/volumeCanopy/*ID->/*s/attribute/ordinal/coverPercent,/aggregateoccurrence/cover,
78 77
/*ID->/*s/plotObservation/simpleUserdefined[name=CensusNumber]/value,"/aggregateoccurrence/definedvalue[*_id/userdefined[tablename=aggregateoccurrence,userdefinedname=censusNo]]:[@fkey=tablerecord_id]/definedvalue",
......
85 84
/*ID->/*s/individualOrganism/identificationLabel[@id=2],/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/tag,
86 85
/relativePlotPosition/relativeX,/stemobservation/xposition,
87 86
/relativePlotPosition/relativeY,/stemobservation/yposition,
87
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
88 88
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/*/relatedPlot[plotRelationship=Quadrat]/relatedPlotID,,** No input mapping for /*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/*/relatedPlot[plotRelationship=Quadrat]/relatedPlotID ** 
inputs/SALVIAS/test/VegBIEN.organisms.xml.ref
1 1
<?xml version="1.0" ?>
2 2
<VegBIEN>
3 3
    <plantobservation id="0">
4
        <specimenreplicate>
5
            <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
6
            <catalognumber_dwc>931</catalognumber_dwc>
7
        </specimenreplicate>
4 8
        <aggregateoccurrence>
5 9
            <taxonoccurrence_id>
6 10
                <taxonoccurrence>
......
29 33
                            <authorlocationcode>1</authorlocationcode>
30 34
                        </locationevent>
31 35
                    </locationevent_id>
32
                    <specimenreplicate>
33
                        <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
34
                        <catalognumber_dwc>931</catalognumber_dwc>
35
                    </specimenreplicate>
36 36
                    <growthform>tree</growthform>
37 37
                    <taxondetermination>
38 38
                        <iscurrent>true</iscurrent>
......
104 104
        <sourceaccessioncode>1</sourceaccessioncode>
105 105
    </plantobservation>
106 106
    <plantobservation id="1">
107
        <specimenreplicate>
108
            <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
109
            <catalognumber_dwc>933</catalognumber_dwc>
110
        </specimenreplicate>
107 111
        <aggregateoccurrence>
108 112
            <taxonoccurrence_id>
109 113
                <taxonoccurrence>
......
132 136
                            <authorlocationcode>1</authorlocationcode>
133 137
                        </locationevent>
134 138
                    </locationevent_id>
135
                    <specimenreplicate>
136
                        <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
137
                        <catalognumber_dwc>933</catalognumber_dwc>
138
                    </specimenreplicate>
139 139
                    <growthform>tree</growthform>
140 140
                    <taxondetermination>
141 141
                        <iscurrent>true</iscurrent>
inputs/SALVIAS/maps/VegBIEN.stems.csv
1 1
SALVIAS,VegBIEN:/stemobservation,Comments
2
PlotObsID,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
2
PlotObsID,"/*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
3 3
NoInd,/*_id/plantobservation/stemcount,
4 4
basal_diam,/basaldiameter,
5 5
stem_canopy_form,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyForm]]:[@fkey=tablerecord_id]/definedvalue",
inputs/SALVIAS/maps/VegBIEN.organisms.csv
1 1
SALVIAS,VegBIEN:/plantobservation,Comments
2
coll_number,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/1",Brad: Incorrect. Map instead as for voucher_string
3
SourceVoucher,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
4
census_date,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate/_*/date",
2 5
PlotCode,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{parent_id/locationevent/{authorlocationcode,*_id/location/sourceaccessioncode/_alt/2},*_id/location/sourceaccessioncode/_merge/1/_alt/2}","Brad: Same as plotCode, above"
3 6
PlotID,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{parent_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{sourceaccessioncode,*_id/location/sourceaccessioncode/_alt/1},*_id/location/sourceaccessioncode/_merge/1/_alt/1}","Brad: Not sure why this is repeated? This field and plotCode, as the same as above."
4 7
Line,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{authorlocationcode,*_id/location/sourceaccessioncode/_merge/2/_alt/2}",
5
coll_number,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/1",Brad: Incorrect. Map instead as for voucher_string
6
SourceVoucher,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc/_alt/2","Brad: OMIT. This is the verbatim text, which includes both collectors name and collection number. I would use coll_number, below."
7
census_date,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate/_*/date",
8 8
Habit,"/aggregateoccurrence/*_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: Incorrect for VegBank, correct for VegX. This is growth form (tree, shrub, herb, etc.). It is an observation of a trait."
9 9
infra_rank_1,"/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=subspecies]/plantname/_name/first",
10 10
auth,"/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]:[iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=authority]/plantname",Brad: Incorrect. This is the author of the scientificName. The should be a place for this in the taxonomic name elements of VegB and VegX. Let's discuss.
......
18 18
OrigFamily,"/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=identifier]:[isoriginal=true,iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=family]/plantname",Brad: OMIT
19 19
coll_firstname,/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/first,Brad: See comment above
20 20
coll_lastname,/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/last,"Brad: Correct for VegBank. 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."
21
DetType,/aggregateoccurrence/*_id/taxonoccurrence/{.}/_ignore/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.; ""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
22 21
NoInd,/aggregateoccurrence/count,"Brad: Incorrect for VegX. This is a count of number of indiiduals for an *aggregate* observation. For VegBank, I'm not sure. Not exactly the same as stemCount. An individual tree could have 3 stems but would still only count as 1. We need to check with Bob on this."
23 22
cover_percent,/aggregateoccurrence/cover,
24 23
census_no,"/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."
......
30 29
tag2,/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/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."
31 30
x_position,/stemobservation/xposition,"Brad: Correct for VegBank. I'm not so sure for VegX. Let's ask Nick about this. These are important, fundamental values of many tree plots, and should be accommodated within VegX."
32 31
y_position,/stemobservation/yposition,Brad: See comment above for x_position
32
DetType,/{.}/_ignore/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.; ""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
33 33
GenAuth,,** No input mapping for GenAuth ** 
34 34
IsMorpho,,** No input mapping for IsMorpho ** 
35 35
Notes,,** No join mapping for /*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/note/text ** 
mappings/VegX-VegBIEN.organisms.csv
1 1
"VegX::[@xmlns:tcs=""http://www.tdwg.org/schemas/tcs/1.01""]/*s/individualOrganismObservation",VegBIEN:/plantobservation,Comments
2
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
3
/simpleUserdefined[name=collectionDate]/value,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
4
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
2 5
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/area,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/area,
3 6
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/elevation/_alt/1,
4 7
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination/coordsaccuracy,
......
48 51
/*ID->/*s/plotObservation/partyWithRole/*ID->/parties/party/organizationName,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{.,*_id/location}/datasource_id/party/organizationname/_alt/1",
49 52
/*ID->/*s/plotObservation:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/*UniqueIdentifierID->/*s/plot/plotName,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{authorlocationcode,*_id/location/sourceaccessioncode/_merge/2/_alt/2}",
50 53
/*ID->/*s/plotObservation:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{sourceaccessioncode,*_id/location/sourceaccessioncode/_merge/2/_alt/1}",
51
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
52
/simpleUserdefined[name=collectionDate]/value,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
53
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
54 54
/simpleUserdefined[name=growthForm]/value,/aggregateoccurrence/*_id/taxonoccurrence/growthform,
55 55
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=TaxonomicRankBelowSubspeciesEnum])/tcs:Rank","/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=subspecies]/plantname/_name/first",
56 56
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=auth])/tcs:Name","/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]:[iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=authority]/plantname",
......
72 72
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,!partyWithRole]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=reg])/tcs:Name","/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=identifier]:[isoriginal=true,iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,family,order,class,subkingdom,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=kingdom]/plantname",
73 73
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/givenName",/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/first,
74 74
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/surName",/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/last,
75
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/aggregateoccurrence/*_id/taxonoccurrence/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
76 75
/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/aggregateOrganismObservation[*ID]/*/aggregateValue/value,/aggregateoccurrence/count,
77 76
/volumeCanopy/*ID->/*s/attribute/ordinal/coverPercent,/aggregateoccurrence/cover,
78 77
/simpleUserdefined[name=censusNo]/value,"/aggregateoccurrence/definedvalue[*_id/userdefined[tablename=aggregateoccurrence,userdefinedname=censusNo]]:[@fkey=tablerecord_id]/definedvalue",
......
85 84
/*ID->/*s/individualOrganism/identificationLabel[@id=2],/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/tag,
86 85
/relativePlotPosition/relativeX,/stemobservation/xposition,
87 86
/relativePlotPosition/relativeY,/stemobservation/yposition,
87
"/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
mappings/for_review/VegX-VegBIEN.organisms.csv
1 1
"VegX::[@xmlns:tcs=""http://www.tdwg.org/schemas/tcs/1.01""]/*s/individualOrganismObservation",VegBIEN:/plantobservation,Comments
2
//taxonNameUsageConcept/voucher,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//catalognumber_dwc",
3
/simpleUserdefined[name=collectionDate]/value,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//collectiondate",
4
//party/organizationName,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//datasource_id/party/organizationname/_alt/1",
2 5
//plot/area,//location/area,
3 6
//geospatial/verbatimElevation,//location/elevation/_alt/1,
4 7
//geospatial/CoordinateUncertaintyInMeters,//locationdetermination/coordsaccuracy,
......
48 51
//party/organizationName,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{.,*_id/location}/datasource_id/party/organizationname/_alt/1",
49 52
//plot/plotName,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{authorlocationcode,*_id/location/sourceaccessioncode/_merge/2/_alt/2}",
50 53
//plot/plotUniqueIdentifier,"/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{sourceaccessioncode,*_id/location/sourceaccessioncode/_merge/2/_alt/1}",
51
//taxonNameUsageConcept/voucher,"//*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate}//catalognumber_dwc",
52
/simpleUserdefined[name=collectionDate]/value,"//*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate}//collectiondate",
53
//party/organizationName,"//*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate}//datasource_id/party/organizationname/_alt/1",
54 54
/simpleUserdefined[name=growthForm]/value,//taxonoccurrence/growthform,
55 55
//*s/taxonConcept[tcs:@code=TaxonomicRankBelowSubspeciesEnum]/tcs:Rank,"//taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath/path/_forEach:[do=""plantname[rank=_val]/parent_id""]/plantname[rank=subspecies]/plantname/_name/first",
56 56
//*s/taxonConcept[tcs:@code=auth]/tcs:Name,"//taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath/path/_forEach:[do=""plantname[rank=_val]/parent_id""]/plantname[rank=authority]/plantname",
......
72 72
//*s/taxonConcept[tcs:@code=reg]/tcs:Name,"//taxonoccurrence/taxondetermination[role=identifier]/*_id/plantconcept/plantname_id/_simplifyPath/path/_forEach:[do=""plantname[rank=_val]/parent_id""]/plantname[rank=kingdom]/plantname",
73 73
//individualName/givenName,//taxonoccurrence/verbatimcollectorname/_name/first,
74 74
//individualName/surName,//taxonoccurrence/verbatimcollectorname/_name/last,
75
//*s/taxonDetermination[role=collector]/groupType,/aggregateoccurrence/*_id/taxonoccurrence/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
76 75
//*s/aggregateOrganismObservation/*/aggregateValue/value,//aggregateoccurrence/count,
77 76
//ordinal/coverPercent,//aggregateoccurrence/cover,
78 77
/simpleUserdefined[name=censusNo]/value,"//aggregateoccurrence/definedvalue[*_id/userdefined[tablename=aggregateoccurrence,userdefinedname=censusNo]]/definedvalue",
......
85 84
//individualOrganism/identificationLabel[@id=2],//stemobservation/stemtag[iscurrent=true]:[../stemtag?[2=true]/1=false]/tag,
86 85
//relativePlotPosition/relativeX,//stemobservation/xposition,
87 86
//relativePlotPosition/relativeY,//stemobservation/yposition,
87
//*s/taxonDetermination[role=collector]/groupType,/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
mappings/for_review/VegX-VegBIEN.stems.csv
1 1
"VegX::[@xmlns:tcs=""http://www.tdwg.org/schemas/tcs/1.01""]/*s/individualOrganismObservation[relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID]",VegBIEN:/stemobservation,Comments
2
//taxonNameUsageConcept/voucher,"//*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//catalognumber_dwc",
3
//individualOrganismObservation/simpleUserdefined[name=collectionDate]/value,"//*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//collectiondate",
4
//party/organizationName,"//*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}//datasource_id/party/organizationname/_alt/1",
2 5
//plot/area,//location/area,
3 6
//geospatial/verbatimElevation,//location/elevation/_alt/1,
4 7
//geospatial/CoordinateUncertaintyInMeters,//locationdetermination/coordsaccuracy,
......
48 51
//party/organizationName,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{.,*_id/location}/datasource_id/party/organizationname/_alt/1",
49 52
//plot/plotName,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{authorlocationcode,*_id/location/sourceaccessioncode/_merge/2/_alt/2}",
50 53
//plot/plotUniqueIdentifier,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/{sourceaccessioncode,*_id/location/sourceaccessioncode/_merge/2/_alt/1}",
51
//taxonNameUsageConcept/voucher,"//*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate}//catalognumber_dwc",
52
//individualOrganismObservation/simpleUserdefined[name=collectionDate]/value,"//*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate}//collectiondate",
53
//party/organizationName,"//*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate}//datasource_id/party/organizationname/_alt/1",
54 54
//individualOrganismObservation/simpleUserdefined[name=growthForm]/value,//taxonoccurrence/growthform,
55 55
//*s/taxonConcept[tcs:@code=TaxonomicRankBelowSubspeciesEnum]/tcs:Rank,"//taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath/path/_forEach:[do=""plantname[rank=_val]/parent_id""]/plantname[rank=subspecies]/plantname/_name/first",
56 56
//*s/taxonConcept[tcs:@code=auth]/tcs:Name,"//taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath/path/_forEach:[do=""plantname[rank=_val]/parent_id""]/plantname[rank=authority]/plantname",
......
72 72
//*s/taxonConcept[tcs:@code=reg]/tcs:Name,"//taxonoccurrence/taxondetermination[role=identifier]/*_id/plantconcept/plantname_id/_simplifyPath/path/_forEach:[do=""plantname[rank=_val]/parent_id""]/plantname[rank=kingdom]/plantname",
73 73
//individualName/givenName,//taxonoccurrence/verbatimcollectorname/_name/first,
74 74
//individualName/surName,//taxonoccurrence/verbatimcollectorname/_name/last,
75
//*s/taxonDetermination[role=collector]/groupType,/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
76 75
//*s/aggregateOrganismObservation/*/aggregateValue/value,//aggregateoccurrence/count,
77 76
//ordinal/coverPercent,//aggregateoccurrence/cover,
78 77
//individualOrganismObservation/simpleUserdefined[name=censusNo]/value,"//aggregateoccurrence/definedvalue[*_id/userdefined[tablename=aggregateoccurrence,userdefinedname=censusNo]]/definedvalue",
......
86 85
//individualOrganism/identificationLabel[@id=2],//stemobservation/stemtag[iscurrent=true]:[../stemtag?[2=true]/1=false]/tag,
87 86
//relativePlotPosition/relativeX,//stemobservation/xposition,
88 87
//relativePlotPosition/relativeY,//stemobservation/yposition,
88
//*s/taxonDetermination[role=collector]/groupType,/*_id/plantobservation/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
89 89
/diameterBaseDistance[value=0]/diameter,/basaldiameter,
90 90
/simpleUserdefined[name=canopyForm]/value,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyForm]]/definedvalue",
91 91
/simpleUserdefined[name=canopyPosition]/value,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyPosition]]/definedvalue",
mappings/VegX-VegBIEN.stems.csv
1 1
"VegX::[@xmlns:tcs=""http://www.tdwg.org/schemas/tcs/1.01""]/*s/individualOrganismObservation[relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID]",VegBIEN:/stemobservation,Comments
2
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
3
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/simpleUserdefined[name=collectionDate]/value,"/*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
4
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/*_id/plantobservation/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
2 5
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/area,/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/area,
3 6
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation,/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/elevation/_alt/1,
4 7
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters,/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination/coordsaccuracy,
......
48 51
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/plotObservation/partyWithRole/*ID->/parties/party/organizationName,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{.,*_id/location}/datasource_id/party/organizationname/_alt/1",
49 52
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/plotObservation:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/*UniqueIdentifierID->/*s/plot/plotName,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{authorlocationcode,*_id/location/sourceaccessioncode/_merge/2/_alt/2}",
50 53
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/plotObservation:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent:[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{sourceaccessioncode,*_id/location/sourceaccessioncode/_merge/2/_alt/1}",
51
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept:[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/voucher,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/catalognumber_dwc",
52
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/simpleUserdefined[name=collectionDate]/value,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate",
53
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept/partyWithRole/*ID->/parties/party/organizationName,"/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/voucher/*_id/specimenreplicate:[*_id/taxonoccurrence]}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
54 54
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/simpleUserdefined[name=growthForm]/value,/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/growthform,
55 55
"/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=TaxonomicRankBelowSubspeciesEnum])/tcs:Rank","/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=subspecies]/plantname/_name/first",
56 56
"/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=computer]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=auth])/tcs:Name","/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=computer]:[iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=authority]/plantname",
......
72 72
"/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,!partyWithRole]/*s/taxonRelationshipAssertion(/assertion/*ID->/*s/taxonConcept[tcs:Rank/@code=reg])/tcs:Name","/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/taxondetermination[role=identifier]:[isoriginal=true,iscurrent=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=""parent_id/plantname"",require=plantname]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,family,order,class,subkingdom,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=kingdom]/plantname",
73 73
"/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/givenName",/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/first,
74 74
"/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/partyWithRole/*ID->/parties/party/individualName/surName",/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/verbatimcollectorname/_name/last,
75
"/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/*_id/plantobservation/aggregateoccurrence/*_id/taxonoccurrence/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
76 75
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/aggregateOrganismObservation[*ID]/*/aggregateValue/value,/*_id/plantobservation/aggregateoccurrence/count,
77 76
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/volumeCanopy/*ID->/*s/attribute/ordinal/coverPercent,/*_id/plantobservation/aggregateoccurrence/cover,
78 77
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/simpleUserdefined[name=censusNo]/value,"/*_id/plantobservation/aggregateoccurrence/definedvalue[*_id/userdefined[tablename=aggregateoccurrence,userdefinedname=censusNo]]:[@fkey=tablerecord_id]/definedvalue",
......
86 85
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/identificationLabel[@id=2],/*_id/plantobservation/stemobservation/stemtag[iscurrent=true]:[../stemtag?[iscurrent/_alt/2=true]/iscurrent/_alt/1=false]/tag,
87 86
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/relativePlotPosition/relativeX,/*_id/plantobservation/stemobservation/xposition,
88 87
/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/relativePlotPosition/relativeY,/*_id/plantobservation/stemobservation/yposition,
88
"/relatedIndividual/relatedItem[itemRelationship=stemParent]/relatedItemID->/*s/individualOrganismObservation/*ID->/*s/individualOrganism/*ID->/*s/taxonNameUsageConcept->/*s/taxonDetermination[*ID,partyWithRole/role=collector]/groupType",/*_id/plantobservation/{.}/_ignore/voucherType,"""{"" sorts it after what uses it, so the _ignore is executed after the _refs"
89 89
/diameterBaseDistance[baseDistance/value=0]/diameter,/basaldiameter,
90 90
/simpleUserdefined[name=canopyForm]/value,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyForm]]:[@fkey=tablerecord_id]/definedvalue",
91 91
/simpleUserdefined[name=canopyPosition]/value,"/definedvalue[*_id/userdefined[tablename=stemobservation,userdefinedname=canopyPosition]]:[@fkey=tablerecord_id]/definedvalue",

Also available in: Unified diff