Project

General

Profile

« Previous | Next » 

Revision 3224

mappings/VegX-VegBIEN.stems.csv: Indirect voucher mappings: Removed no longer needed ":[*_id/taxonoccurrence]" because a specimenreplicate is a taxonoccurrence, so it doesn't need to have an empty taxonoccurrence

View differences:

inputs/SALVIAS-CSV/test/VegBIEN.organisms.xml.ref
7 7
                    <voucher>
8 8
                        <specimenreplicate_id>
9 9
                            <specimenreplicate>
10
                                <taxonoccurrence_id><taxonoccurrence/></taxonoccurrence_id>
11 10
                                <datasource_id><party><organizationname>SALVIAS-CSV</organizationname></party></datasource_id>
12 11
                                <catalognumber_dwc>14598</catalognumber_dwc>
13 12
                            </specimenreplicate>
......
127 126
                    <voucher>
128 127
                        <specimenreplicate_id>
129 128
                            <specimenreplicate>
130
                                <taxonoccurrence_id><taxonoccurrence/></taxonoccurrence_id>
131 129
                                <datasource_id><party><organizationname>SALVIAS-CSV</organizationname></party></datasource_id>
132 130
                                <catalognumber_dwc>14669</catalognumber_dwc>
133 131
                            </specimenreplicate>
inputs/SALVIAS-CSV/test/import.organisms.out.ref
1
Inserted 48 new rows into database
1
Inserted 46 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
coll_number,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[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}/:[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 4
census_date,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/obsstartdate/_date/year,
5 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"
6 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."
inputs/CTFS/test/import.organisms.out.ref
1
Inserted 43 new rows into database
1
Inserted 41 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
/*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}/:[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}/:[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}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
5 5
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/area,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/area,
6 6
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/elevation/_alt/1,
7 7
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination/coordsaccuracy,
inputs/SALVIAS/test/VegBIEN.stems.xml.ref
9 9
                            <voucher>
10 10
                                <specimenreplicate_id>
11 11
                                    <specimenreplicate>
12
                                        <taxonoccurrence_id><taxonoccurrence/></taxonoccurrence_id>
13 12
                                        <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
14 13
                                        <catalognumber_dwc>1</catalognumber_dwc>
15 14
                                    </specimenreplicate>
......
32 31
                            <voucher>
33 32
                                <specimenreplicate_id>
34 33
                                    <specimenreplicate>
35
                                        <taxonoccurrence_id><taxonoccurrence/></taxonoccurrence_id>
36 34
                                        <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
37 35
                                        <catalognumber_dwc>2</catalognumber_dwc>
38 36
                                    </specimenreplicate>
inputs/SALVIAS/test/import.stems.out.ref
1
Inserted 30 new rows into database
1
Inserted 28 new rows into database
inputs/SALVIAS/maps/VegBIEN.stems.csv
1 1
SALVIAS,VegBIEN:/stemobservation,Comments
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",
2
PlotObsID,"/*_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/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
coll_number,"/_if:[cond/_eq:[left/_ref[addr=""../../../../_ignore/voucherType""],right=direct]]/{then/specimenreplicate,else/aggregateoccurrence/*_id/taxonoccurrence/voucher/*_id/specimenreplicate}/:[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}/:[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}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/collectiondate/_*/date",
5 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"
6 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."
7 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}",
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
/*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}/:[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}/:[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}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
5 5
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/area,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/area,
6 6
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/verbatimElevation,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/elevation/_alt/1,
7 7
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/CoordinateUncertaintyInMeters,/aggregateoccurrence/*_id/taxonoccurrence/*_id/locationevent/*_id/location/locationdetermination/coordsaccuracy,
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
/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}/:[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}/:[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}/:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1",
5 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,
6 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,
7 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,

Also available in: Unified diff