Project

General

Profile

« Previous | Next » 

Revision 4340

mappings/VegCore-VegBIEN.csv: Redirect eventID, fieldNumber (authoreventcode) to parent locationevent when subplot columns exist

View differences:

inputs/CVS/1.organisms/VegBIEN.csv
7 7
publicLongitude,"/location/locationdetermination/longitude/_alt/1/_nullIf:[null=0,type=float]/value/_alt/2",
8 8
county,"/location/locationdetermination/namedplace_id/_simplifyPath:[next=""parent_id/namedplace"",require=placename]/path/_forEach:[in:[],do=""namedplace[rank=_val]/parent_id""]/namedplace[rank=county]/placename",
9 9
state,"/location/locationdetermination/namedplace_id/_simplifyPath:[next=""parent_id/namedplace"",require=placename]/path/_forEach:[in:[county,],do=""namedplace[rank=_val]/parent_id""]/namedplace[rank=stateProvince]/placename",
10
authorObsCode,/location/locationevent/authoreventcode,
10
authorObsCode,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
11
authorObsCode,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
11 12
obsStartDate,/location/locationevent/obsstartdate/_*/date/_dateRangeStart/value,
12 13
%cover,/location/locationevent/taxonoccurrence/aggregateoccurrence/cover,
13 14
currentTaxonName sec Weakley 2006,/location/locationevent/taxonoccurrence/authortaxoncode/_alt/2/_alt/2,
inputs/SALVIAS-CSV/1.organisms/VegBIEN.csv
9 9
plot_code,"/location/_if[@name=""if subplot""]/then/parent_id/location/authorlocationcode",
10 10
PLOT_ID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
11 11
subplot,/location/authorlocationcode,
12
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
12 13
census_date,/location/locationevent/obsstartdate/_*/date/_dateRangeStart/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
13 14
-----
14 15
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
inputs/CTFS/Subplot/VegBIEN.csv
5 5
PlotID,"/location/_if[@name=""if subplot""]/else/sourceaccessioncode",
6 6
PlotID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
7 7
QuadratName,/location/authorlocationcode,
8
QuadratID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/1",
9
QuadratName,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
8 10
QuadratID,/location/sourceaccessioncode,
9 11
StartX,/location/sublocationxposition,
10 12
StartY,/location/sublocationyposition,
inputs/CTFS/PlotObservation/VegBIEN.csv
3 3
PlotCensusNumber,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/2/_if[@name=""if locationID""]/else",
4 4
PlotID,"/location/_if[@name=""if subplot""]/else/sourceaccessioncode",
5 5
PlotID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
6
PlotCensusNumber,/location/locationevent/authoreventcode,
6
PlotCensusNumber,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
7
CensusID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
8
PlotCensusNumber,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
9
CensusID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
7 10
EndDate,/location/locationevent/obsenddate/_*/date/_dateRangeEnd/value,
8 11
StartDate,/location/locationevent/obsstartdate/_*/date/_dateRangeStart/value,
9
CensusID,/location/locationevent/sourceaccessioncode,
inputs/CTFS/PlotObservation/test.xml.ref
4 4
        <sourceaccessioncode>$PlotID</sourceaccessioncode>
5 5
        <locationevent>
6 6
            <authoreventcode>$PlotCensusNumber</authoreventcode>
7
            <sourceaccessioncode>$CensusID</sourceaccessioncode>
7 8
            <obsenddate><_date><date><_dateRangeEnd><value>$EndDate</value></_dateRangeEnd></date></_date></obsenddate>
8 9
            <obsstartdate><_date><date><_dateRangeStart><value>$StartDate</value></_dateRangeStart></date></_date></obsstartdate>
9
            <sourceaccessioncode>$CensusID</sourceaccessioncode>
10 10
        </locationevent>
11 11
    </location>
12 12
</VegBIEN>
inputs/SALVIAS/1.organisms/VegBIEN.csv
9 9
PlotCode,"/location/_if[@name=""if subplot""]/then/parent_id/location/authorlocationcode",
10 10
PlotID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
11 11
Line,/location/authorlocationcode,
12
Line,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
12 13
census_date,/location/locationevent/obsenddate/_*/date/_dateRangeEnd/value/_alt/1,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
13 14
-----
14 15
SELECT ""PlotID"", ""Line"", count(DISTINCT census_date) AS census_date_count
mappings/VegCore-VegBIEN.csv
36 36
samplingProtocol,/location/locationevent/*_id/method/name,
37 37
projectName,/location/locationevent/*_id/project/projectname,
38 38
projectID,/location/locationevent/*_id/project/sourceaccessioncode,
39
fieldNumber,/location/locationevent/authoreventcode,
39
subplotID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/1",
40
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
41
fieldNumber,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
42
eventID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
43
fieldNumber,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
44
eventID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
40 45
communityID,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
41 46
communityName,/location/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,
42 47
endDate,/location/locationevent/obsenddate/_*/date/_dateRangeEnd/value,
......
63 68
silt,/location/locationevent/soilobs/silt,
64 69
sodium,/location/locationevent/soilobs/sodium,
65 70
texture,/location/locationevent/soilobs/texture,
66
eventID,/location/locationevent/sourceaccessioncode,
67 71
dateCollected,/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date,
68 72
individualCount,/location/locationevent/taxonoccurrence/aggregateoccurrence/count,
69 73
coverPercent,/location/locationevent/taxonoccurrence/aggregateoccurrence/cover,
mappings/Veg+-VegBIEN.csv
113 113
projectName,/location/locationevent/*_id/project/projectname,
114 114
ProjectID,/location/locationevent/*_id/project/sourceaccessioncode,
115 115
projectID,/location/locationevent/*_id/project/sourceaccessioncode,
116
AuthorObsCode,/location/locationevent/authoreventcode,
117
FieldNumber,/location/locationevent/authoreventcode,
118
PlotCensusNumber,/location/locationevent/authoreventcode,
119
authorObsCode,/location/locationevent/authoreventcode,
120
fieldNumber,/location/locationevent/authoreventcode,
116
QuadratID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/1",
117
SubplotID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/1",
118
subplotID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/1",
119
QuadratName,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
120
Subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
121
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
122
AuthorObsCode,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
123
FieldNumber,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
124
PlotCensusNumber,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
125
authorObsCode,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
126
fieldNumber,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
127
CensusID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
128
EventID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
129
PlotEventID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
130
eventID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
131
plotEventID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
132
AuthorObsCode,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
133
FieldNumber,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
134
PlotCensusNumber,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
135
authorObsCode,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
136
fieldNumber,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
137
CensusID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
138
EventID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
139
PlotEventID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
140
eventID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
141
plotEventID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
121 142
CommunityID,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
122 143
communityID,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
123 144
CommunityName,/location/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,
......
194 215
sodium,/location/locationevent/soilobs/sodium,
195 216
Texture,/location/locationevent/soilobs/texture,
196 217
texture,/location/locationevent/soilobs/texture,
197
CensusID,/location/locationevent/sourceaccessioncode,
198
EventID,/location/locationevent/sourceaccessioncode,
199
PlotEventID,/location/locationevent/sourceaccessioncode,
200
eventID,/location/locationevent/sourceaccessioncode,
201
plotEventID,/location/locationevent/sourceaccessioncode,
202 218
DateCollected/_alt,/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date/_alt,
203 219
dateCollected/_alt,/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date/_alt,
204 220
DayCollected,"/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date/_alt/1/_date/day/_nullIf:[null=0,type=float]/value",
mappings/Veg+.cs-VegBIEN.csv
60 60
samplingProtocol,/location/locationevent/*_id/method/name,
61 61
projectName,/location/locationevent/*_id/project/projectname,
62 62
projectID,/location/locationevent/*_id/project/sourceaccessioncode,
63
PlotCensusNumber,/location/locationevent/authoreventcode,
64
authorObsCode,/location/locationevent/authoreventcode,
65
fieldNumber,/location/locationevent/authoreventcode,
63
QuadratID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/1",
64
subplotID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/1",
65
QuadratName,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
66
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/2",
67
PlotCensusNumber,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
68
authorObsCode,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
69
fieldNumber,"/location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
70
CensusID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
71
eventID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
72
plotEventID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
73
PlotCensusNumber,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
74
authorObsCode,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
75
fieldNumber,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
76
CensusID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
77
eventID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
78
plotEventID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
66 79
communityID,/location/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
67 80
communityName,/location/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,
68 81
endDate,/location/locationevent/obsenddate/_*/date/_dateRangeEnd/value,
......
101 114
silt,/location/locationevent/soilobs/silt,
102 115
sodium,/location/locationevent/soilobs/sodium,
103 116
texture,/location/locationevent/soilobs/texture,
104
CensusID,/location/locationevent/sourceaccessioncode,
105
eventID,/location/locationevent/sourceaccessioncode,
106
plotEventID,/location/locationevent/sourceaccessioncode,
107 117
dateCollected/_alt,/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date/_alt,
108 118
dayCollected,"/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date/_alt/1/_date/day/_nullIf:[null=0,type=float]/value",
109 119
monthCollected,"/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date/_alt/1/_date/month/_nullIf:[null=0,type=float]/value",
mappings/for_review/VegCore-VegBIEN.csv
36 36
samplingProtocol,//method/name,
37 37
projectName,//project/projectname,
38 38
projectID,//project/sourceaccessioncode,
39
fieldNumber,//locationevent/authoreventcode,
39
subplotID,"//location/locationevent/_if[@name=""if subplot""]/cond/1",
40
subplot,"//location/locationevent/_if[@name=""if subplot""]/cond/2",
41
fieldNumber,"//location/locationevent/_if[@name=""if subplot""]/else/authoreventcode",
42
eventID,"//location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode",
43
fieldNumber,"//location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/authorlocationcode",
44
eventID,"//location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode",
40 45
communityID,//*/commname,
41 46
communityName,//commconcept/commdescription,
42 47
endDate,//locationevent/obsenddate/_*/date,
......
63 68
silt,//soilobs/silt,
64 69
sodium,//soilobs/sodium,
65 70
texture,//soilobs/texture,
66
eventID,//locationevent/sourceaccessioncode,
67 71
dateCollected,//aggregateoccurrence/collectiondate/_*/date,
68 72
individualCount,//aggregateoccurrence/count,
69 73
coverPercent,//aggregateoccurrence/cover,

Also available in: Unified diff