Project

General

Profile

« Previous | Next » 

Revision 5977

mappings/VegCore-VegBIEN.csv: subplots: Also complete the locationevent/location diamond (subplot event -> {subplot location, parent plot event} -> parent plot location) when an eventDate or range is specified, as this is also an identifying field for locationevent. This fixes a bug where subplots data without explicit plot events (such as SALVIAS and TEAM) was not being connected to the appropriate parent plot event as well as parent plot location. This should fix the SALVIAS verification # location events, which should include only parent plots' locationevents to correspond with # locations, which only includes parent plots' locations, and uses locationevent.parent_id being NULL to determine what is a parent plot event.

View differences:

VegBIEN.csv
12 12
PLOT_ID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode",
13 13
subplot,/location/authorlocationcode,
14 14
subplot,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists",
15
plot_code,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if event""]/then/parent_id/locationevent/*_id/location/authorlocationcode",
16
PLOT_ID,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode",
15
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/cond/_exists","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
16
-----
17
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
18
FROM ""SALVIAS-CSV"".organisms
19
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
20
GROUP BY ""PLOT_ID"", subplot
21
HAVING count(DISTINCT census_date) > 1
22
-----"
23
plot_code,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/authorlocationcode",
24
PLOT_ID,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/*_id/location/sourceaccessioncode",
25
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsenddate/_*/date/_alt/2/_dateRangeEnd/value","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
26
-----
27
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
28
FROM ""SALVIAS-CSV"".organisms
29
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
30
GROUP BY ""PLOT_ID"", subplot
31
HAVING count(DISTINCT census_date) > 1
32
-----"
33
census_date,"/location/locationevent/_if[@name=""if subplot""]/then/_if[@name=""if has event""]/then/parent_id/locationevent/obsstartdate/_*/date/_alt/2/_dateRangeStart/value","This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
34
-----
35
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count
36
FROM ""SALVIAS-CSV"".organisms
37
WHERE subplot IS NOT NULL AND census_date IS NOT NULL
38
GROUP BY ""PLOT_ID"", subplot
39
HAVING count(DISTINCT census_date) > 1
40
-----"
17 41
census_date,/location/locationevent/obsenddate/_*/date/_alt/2/_dateRangeEnd/value,"This is for the subplot, not the organism, as all organisms in a subplot have the same value for it. The following query returns no rows:
18 42
-----
19 43
SELECT ""PLOT_ID"", subplot, count(DISTINCT census_date) AS census_date_count

Also available in: Unified diff