Project

General

Profile

« Previous | Next » 

Revision 10173

mappings/VegCore-VegBIEN.csv: cultivated, oldGrowth: use just cultivated if it's provided, rather than /_alt-ing it back with oldGrowth (which it was generated from)

View differences:

inputs/NCU/Specimen/VegBIEN.csv
13 13
CatalogNumber,"/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""]/else",
14 14
SpecimenPK,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
15 15
firstCollectorRemarks,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Actually the collector's number, not remarks"
16
Cultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/1/_map:[0=,""-1""=true,*=*]/value","cultivated can only be true or NULL, not false"
16
Cultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1/_map:[0=,""-1""=true,*=*]/value","cultivated can only be true or NULL, not false"
17 17
VerbatimLocality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/2/_alt/1,
18 18
CityLocality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/2/_alt/2,
19 19
CollectionDate,/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_alt/1,
......
35 35
firstCollectorName,/location/locationevent/taxonoccurrence/collector_id/party/fullname,
36 36
SpecimenPK,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
37 37
firstCollectorRemarks,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists","Actually the collector's number, not remarks"
38
Cultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/1/_map:[0=,""-1""=true,*=*]/value","cultivated can only be true or NULL, not false"
38
Cultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1/_map:[0=,""-1""=true,*=*]/value","cultivated can only be true or NULL, not false"
39 39
SpecimenPK,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
40 40
CurrentScientificNameWithAuthor,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/1,
41 41
CurrentScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/1,
inputs/bien_web/observation/VegBIEN.csv
15 15
elevation_m,/location/elevation_m/_alt/1,
16 16
collectionNumber,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
17 17
observationID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
18
isCultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/1",
18
isCultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1",
19 19
plotMethod,/location/locationevent/*_id/method/name,
20 20
plotCode,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode/_if[@name=""if subplot""]/then",
21 21
plotID,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode/_if[@name=""if subplot""]/then",
......
34 34
collector,/location/locationevent/taxonoccurrence/collector_id/party/fullname,
35 35
collectionNumber,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
36 36
observationID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
37
isCultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/1",
37
isCultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1",
38 38
observationID,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
39 39
identifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname,
40 40
species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_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",
inputs/UNCC/Specimen/VegBIEN.csv
38 38
HAVING count(*) > 1
39 39
-----"
40 40
collectno,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
41
cultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/1/_alt/1/_map:[*=true]/value","For our purposes, anything non-NULL should be assumed to be cultivated"
42
campus,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/1/_alt/2/_map:[*=true]/value","""this refers to occurrence on the UNCC campus, but I do not know the meaning of the codes. Presumably C = cultivated"" (https://projects.nceas.ucsb.edu/nceas/attachments/download/723/UNCC-validate_rkp_bb_rkp.xlsx#Campus)"
41
cultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1/_alt/1/_map:[*=true]/value","For our purposes, anything non-NULL should be assumed to be cultivated"
42
campus,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1/_alt/2/_map:[*=true]/value","""this refers to occurrence on the UNCC campus, but I do not know the meaning of the codes. Presumably C = cultivated"" (https://projects.nceas.ucsb.edu/nceas/attachments/download/723/UNCC-validate_rkp_bb_rkp.xlsx#Campus)"
43 43
locality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1,
44 44
habitat,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/3,
45 45
collday,"/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_alt/2/_date/day/_nullIf:[null=0,type=float]/value",
......
82 82
collector2,/location/locationevent/taxonoccurrence/collector_id/party/fullname/_join/3,
83 83
collector3,/location/locationevent/taxonoccurrence/collector_id/party/fullname/_join/4,
84 84
collectno,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
85
cultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/1/_alt/1/_map:[*=true]/value","For our purposes, anything non-NULL should be assumed to be cultivated"
86
campus,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/1/_alt/2/_map:[*=true]/value","""this refers to occurrence on the UNCC campus, but I do not know the meaning of the codes. Presumably C = cultivated"" (https://projects.nceas.ucsb.edu/nceas/attachments/download/723/UNCC-validate_rkp_bb_rkp.xlsx#Campus)"
85
cultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1/_alt/1/_map:[*=true]/value","For our purposes, anything non-NULL should be assumed to be cultivated"
86
campus,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1/_alt/2/_map:[*=true]/value","""this refers to occurrence on the UNCC campus, but I do not know the meaning of the codes. Presumably C = cultivated"" (https://projects.nceas.ucsb.edu/nceas/attachments/download/723/UNCC-validate_rkp_bb_rkp.xlsx#Campus)"
87 87
usdaRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank/_alt/1",
88 88
infrarank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank/_alt/2",
89 89
species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_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",
inputs/FIA/occurrence_all/VegBIEN.csv
9 9
locationID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
10 10
subplot,/location/authorlocationcode,
11 11
individualObservationID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
12
cultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/1",
13
oldGrowth,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/2/_not/value",
12
cultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1",
13
oldGrowth,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/2/_not/value",
14 14
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists",
15 15
subplotID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists",
16 16
authorEventCode,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
......
36 36
scientificName,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/2",
37 37
taxonName,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/3",
38 38
individualObservationID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
39
cultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/1",
40
oldGrowth,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/2/_not/value",
39
cultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1",
40
oldGrowth,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/2/_not/value",
41 41
individualObservationID,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else/_first/1",
42 42
forma,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=forma]/taxonepithet",
43 43
variety,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=variety]/taxonepithet",
inputs/FIA/occurrence_all/test.xml.ref
58 58
                                    </plantobservation>
59 59
                                </aggregateoccurrence>
60 60
                                <authortaxoncode>$individualCode</authortaxoncode>
61
                                <iscultivated>
62
                                    <_alt>
63
                                        <1>$cultivated</1>
64
                                        <2><_not><value>$oldGrowth</value></_not></2>
65
                                    </_alt>
66
                                </iscultivated>
61
                                <iscultivated>$cultivated</iscultivated>
67 62
                                <sourceaccessioncode>$individualObservationID</sourceaccessioncode>
68 63
                                <taxondetermination>
69 64
                                    <taxonverbatim_id>
inputs/ARIZ/omoccurrences/VegBIEN.csv
15 15
recordNumber,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
16 16
occid,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_first/1",
17 17
occurrenceID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_first/2",Not populated for all rows
18
cultivationStatus,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/1/_map:[0=,*=*]/value","cultivated can only be true or NULL, not false "
18
cultivationStatus,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1/_map:[0=,*=*]/value","cultivated can only be true or NULL, not false "
19 19
locality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1,
20 20
habitat,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/3,
21 21
samplingProtocol,/location/locationevent/*_id/method/name,
......
45 45
recordNumber,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
46 46
occid,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_first/1",
47 47
occurrenceID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists/_first/2",Not populated for all rows
48
cultivationStatus,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/1/_map:[0=,*=*]/value","cultivated can only be true or NULL, not false "
48
cultivationStatus,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1/_map:[0=,*=*]/value","cultivated can only be true or NULL, not false "
49 49
occid,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3/_first/1,
50 50
occurrenceID,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3/_first/2,Not populated for all rows
51 51
identifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname,
inputs/MO/Specimen/VegBIEN.csv
7 7
minimumelevation,/location/elevation_m/_alt/2/_avg/1,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
8 8
maximumelevation,/location/elevation_m/_alt/2/_avg/2,Setting units to m for now because only 4% of rows have valid elevationunits other than Meters (these rows all have units of Feet)
9 9
collectionnumber,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
10
iscultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/1",
10
iscultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1",
11 11
locality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1,
12 12
determinationyear,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/determinationdate/_alt/2/_date/year/_nullIf:[null=0,type=float]/value",
13 13
qualifier,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit",
......
24 24
collectorstring,/location/locationevent/taxonoccurrence/collector_id/party/fullname,
25 25
collectionnumber,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
26 26
specimenid,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
27
iscultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/1",
27
iscultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1",
28 28
specimenid,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
29 29
determinedby,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname,
30 30
rankabbreviation,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/_if[@name=""if has explicit parent""]/else/rank",
mappings/VegCore-VegBIEN.csv
43 43
individualObservationID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
44 44
occurrenceID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
45 45
taxonOccurrenceID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
46
cultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/1",
47
oldGrowth,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_alt/2/_not/value",
46
cultivated,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/1",
47
oldGrowth,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/else/_first/2/_not/value",
48 48
locality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/1,
49 49
verbatimLocality,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/2,
50 50
habitat,/location/iscultivated/_or/2/_locationnarrative_is_cultivated/locationnarrative/_join/3,
......
229 229
individualObservationID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
230 230
occurrenceID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
231 231
taxonOccurrenceID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
232
cultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/1",
233
oldGrowth,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_alt/2/_not/value",
232
cultivated,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/1",
233
oldGrowth,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/then/_first/2/_not/value",
234 234
establishmentMeans,"/location/locationevent/taxonoccurrence/iscultivated/_alt/2/_map:[cultivated=t,wild=f,*=]/value",
235 235
establishmentMeans,"/location/locationevent/taxonoccurrence/isnative/_map:[native=t,exotic=f,*=]/value",
236 236
taxonOccurrenceID,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/1,

Also available in: Unified diff