Revision 4350
Added by Aaron Marcuse-Kubitza over 12 years ago
inputs/CTFS/import_order.txt | ||
---|---|---|
1 | 1 |
Plot |
2 | 2 |
Subplot |
3 | 3 |
PlotObservation |
4 |
SubplotObservation |
|
4 |
SubplotObservation |
|
5 |
StemObservation |
inputs/CTFS/StemObservation/create.sql | ||
---|---|---|
1 |
SELECT * |
|
2 |
FROM "StemObservation.src" |
|
3 |
LEFT JOIN "Stem.src" USING ("TreeID", "StemID") |
|
4 |
LEFT JOIN "Organism.src" USING ("TreeID") |
|
5 |
LEFT JOIN "InfraspecificEpithet.src" USING ("SpeciesID", "SubSpeciesID") |
|
6 |
LEFT JOIN "SpecificEpithet.src" USING ("SpeciesID") |
|
7 |
LEFT JOIN "Genus.src" USING ("GenusID") |
|
8 |
LEFT JOIN "Family.src" USING ("FamilyID") |
inputs/CTFS/StemObservation/src.csv | ||
---|---|---|
1 |
CTFS[Veg+],Veg+,Comments |
|
2 |
FamilyID,, |
|
3 |
GenusID,, |
|
4 |
SpeciesID,, |
|
5 |
SubSpeciesID,, |
|
6 |
TreeID,, |
|
7 |
StemID,, |
|
8 |
MeasureID,, |
|
9 |
CensusID,, |
|
10 |
DBH,, |
|
11 |
HOM,, |
|
12 |
PrimaryStem,, |
|
13 |
ExactDate,, |
|
14 |
StemTag,, |
|
15 |
StemDescription,, |
|
16 |
QuadratID,, |
|
17 |
PlotID,, |
|
18 |
Tag,, |
|
19 |
x,, |
|
20 |
y,, |
|
21 |
SubSpeciesCurrentTaxonFlag,, |
|
22 |
SubSpeciesObsoleteTaxonFlag,, |
|
23 |
SubSpeciesName,, |
|
24 |
SubSpeciesMnemonic,, |
|
25 |
SubSpeciesAuthority,, |
|
26 |
InfraSpecificLevel,, |
|
27 |
SpeciesCurrentTaxonFlag,, |
|
28 |
SpeciesObsoleteTaxonFlag,, |
|
29 |
SpeciesReferenceID,, |
|
30 |
SpeciesName,, |
|
31 |
SpeciesMnemonic,, |
|
32 |
SpeciesAuthority,, |
|
33 |
IDLevel,, |
|
34 |
FieldFamily,, |
|
35 |
Description,, |
|
36 |
Genus,, |
|
37 |
GenusReferenceID,, |
|
38 |
GenusAuthority,, |
|
39 |
Family,, |
|
40 |
ReferenceID,, |
|
41 |
row_num,, |
inputs/CTFS/StemObservation/header.csv | ||
---|---|---|
1 |
FamilyID,GenusID,SpeciesID,SubSpeciesID,TreeID,StemID,MeasureID,CensusID,DBH,HOM,PrimaryStem,ExactDate,StemTag,StemDescription,QuadratID,PlotID,Tag,x,y,SubSpeciesCurrentTaxonFlag,SubSpeciesObsoleteTaxonFlag,SubSpeciesName,SubSpeciesMnemonic,SubSpeciesAuthority,InfraSpecificLevel,SpeciesCurrentTaxonFlag,SpeciesObsoleteTaxonFlag,SpeciesReferenceID,SpeciesName,SpeciesMnemonic,SpeciesAuthority,IDLevel,FieldFamily,Description,Genus,GenusReferenceID,GenusAuthority,Family,ReferenceID,row_num |
inputs/CTFS/StemObservation/map.csv | ||
---|---|---|
1 |
CTFS[Veg+],Veg+,Comments |
|
2 |
FamilyID,, |
|
3 |
GenusID,, |
|
4 |
SpeciesID,, |
|
5 |
SubSpeciesID,, |
|
6 |
TreeID,, |
|
7 |
StemID,, |
|
8 |
MeasureID,individualID, |
|
9 |
HOM,, |
|
10 |
PrimaryStem,, |
|
11 |
ExactDate,, |
|
12 |
StemDescription,, |
|
13 |
x,organismX, |
|
14 |
y,organismY, |
|
15 |
SubSpeciesCurrentTaxonFlag,, |
|
16 |
SubSpeciesObsoleteTaxonFlag,, |
|
17 |
SubSpeciesName,, |
|
18 |
SubSpeciesMnemonic,, |
|
19 |
SubSpeciesAuthority,, |
|
20 |
InfraSpecificLevel,, |
|
21 |
SpeciesCurrentTaxonFlag,, |
|
22 |
SpeciesObsoleteTaxonFlag,, |
|
23 |
SpeciesReferenceID,, |
|
24 |
SpeciesName,, |
|
25 |
SpeciesMnemonic,, |
|
26 |
SpeciesAuthority,scientificNameAuthorship, |
|
27 |
IDLevel,, |
|
28 |
FieldFamily,, |
|
29 |
Description,, |
|
30 |
GenusReferenceID,, |
|
31 |
GenusAuthority,, |
|
32 |
ReferenceID,, |
|
33 |
row_num,, |
inputs/CTFS/StemObservation/map.full.csv | ||
---|---|---|
1 |
CTFS[Veg+],Veg+,Comments |
|
2 |
CensusID,CensusID |
|
3 |
DBH,DBH |
|
4 |
Family,Family |
|
5 |
Genus,Genus |
|
6 |
PlotID,PlotID |
|
7 |
QuadratID,QuadratID |
|
8 |
StemTag,StemTag |
|
9 |
Tag,Tag |
|
10 |
MeasureID,individualID, |
|
11 |
x,organismX, |
|
12 |
y,organismY, |
|
13 |
SpeciesAuthority,scientificNameAuthorship, |
inputs/CTFS/StemObservation/VegBIEN.csv | ||
---|---|---|
1 |
CTFS[Veg+],VegBIEN:,Comments |
|
2 |
QuadratID,"/location/_if[@name=""if subplot""]/cond/_exists/_first/1", |
|
3 |
PlotID,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/2/_if[@name=""if locationID""]/cond/_exists", |
|
4 |
PlotID,"/location/_if[@name=""if subplot""]/else/sourceaccessioncode", |
|
5 |
PlotID,"/location/_if[@name=""if subplot""]/then/parent_id/location/sourceaccessioncode", |
|
6 |
QuadratID,"/location/locationevent/_if[@name=""if subplot""]/cond/_exists/_first/1", |
|
7 |
CensusID,"/location/locationevent/_if[@name=""if subplot""]/else/sourceaccessioncode", |
|
8 |
CensusID,"/location/locationevent/_if[@name=""if subplot""]/then/parent_id/locationevent/sourceaccessioncode", |
|
9 |
MeasureID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/sourceaccessioncode, |
|
10 |
DBH,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight, |
|
11 |
StemTag,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag",Quotes sort it before tag2 |
|
12 |
Tag,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/stemtag[""""/iscurrent/_alt/2=true]/tag",Quotes sort it before tag2 |
|
13 |
x,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/xposition, |
|
14 |
y,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/yposition, |
|
15 |
MeasureID,/location/locationevent/taxonoccurrence/sourceaccessioncode, |
|
16 |
SpeciesAuthority,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[binomial,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=authority]/plantname/_alt/1", |
|
17 |
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[binomial,authority,subspecies,species,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=genus]/plantname", |
|
18 |
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=family]/plantname", |
|
19 |
QuadratID,/location/sourceaccessioncode, |
inputs/CTFS/StemObservation/test.xml.ref | ||
---|---|---|
1 |
Put template: |
|
2 |
<VegBIEN> |
|
3 |
<location id="-1"> |
|
4 |
<parent_id><location><sourceaccessioncode>$PlotID</sourceaccessioncode></location></parent_id> |
|
5 |
<locationevent> |
|
6 |
<parent_id><locationevent><sourceaccessioncode>$CensusID</sourceaccessioncode></locationevent></parent_id> |
|
7 |
<taxonoccurrence> |
|
8 |
<aggregateoccurrence> |
|
9 |
<plantobservation> |
|
10 |
<sourceaccessioncode>$MeasureID</sourceaccessioncode> |
|
11 |
<stemobservation> |
|
12 |
<diameterbreastheight>$DBH</diameterbreastheight> |
|
13 |
<stemtag> |
|
14 |
<iscurrent>true</iscurrent> |
|
15 |
<tag> |
|
16 |
<_alt> |
|
17 |
<0>$StemTag</0> |
|
18 |
<1>$Tag</1> |
|
19 |
</_alt> |
|
20 |
</tag> |
|
21 |
</stemtag> |
|
22 |
<xposition>$x</xposition> |
|
23 |
<yposition>$y</yposition> |
|
24 |
</stemobservation> |
|
25 |
</plantobservation> |
|
26 |
</aggregateoccurrence> |
|
27 |
<sourceaccessioncode>$MeasureID</sourceaccessioncode> |
|
28 |
<taxondetermination> |
|
29 |
<plantconcept_id> |
|
30 |
<plantconcept> |
|
31 |
<plantname_id> |
|
32 |
<_simplifyPath> |
|
33 |
<next>parent_id</next> |
|
34 |
<path> |
|
35 |
<plantname> |
|
36 |
<rank>binomial</rank> |
|
37 |
<parent_id> |
|
38 |
<plantname> |
|
39 |
<rank>authority</rank> |
|
40 |
<plantname>$SpeciesAuthority</plantname> |
|
41 |
<parent_id> |
|
42 |
<plantname> |
|
43 |
<rank>subspecies</rank> |
|
44 |
<parent_id> |
|
45 |
<plantname> |
|
46 |
<rank>species</rank> |
|
47 |
<parent_id> |
|
48 |
<plantname> |
|
49 |
<rank>genus</rank> |
|
50 |
<plantname>$Genus</plantname> |
|
51 |
<parent_id> |
|
52 |
<plantname> |
|
53 |
<rank>family</rank> |
|
54 |
<plantname>$Family</plantname> |
|
55 |
</plantname> |
|
56 |
</parent_id> |
|
57 |
</plantname> |
|
58 |
</parent_id> |
|
59 |
</plantname> |
|
60 |
</parent_id> |
|
61 |
</plantname> |
|
62 |
</parent_id> |
|
63 |
</plantname> |
|
64 |
</parent_id> |
|
65 |
</plantname> |
|
66 |
</path> |
|
67 |
</_simplifyPath> |
|
68 |
</plantname_id> |
|
69 |
</plantconcept> |
|
70 |
</plantconcept_id> |
|
71 |
</taxondetermination> |
|
72 |
</taxonoccurrence> |
|
73 |
</locationevent> |
|
74 |
<sourceaccessioncode>$QuadratID</sourceaccessioncode> |
|
75 |
</location> |
|
76 |
</VegBIEN> |
|
77 |
Inserted 14 new rows into database |
inputs/CTFS/SpecificEpithet.src/+header.csv | ||
---|---|---|
1 |
!"SpeciesID","SpeciesCurrentTaxonFlag","SpeciesObsoleteTaxonFlag","GenusID","SpeciesReferenceID","SpeciesName","SpeciesMnemonic","SpeciesAuthority","IDLevel","FieldFamily","Description" |
inputs/CTFS/Genus.src/+header.csv | ||
---|---|---|
1 |
!"GenusID","Genus","GenusReferenceID","GenusAuthority","FamilyID" |
inputs/CTFS/InfraspecificEpithet.src/+header.csv | ||
---|---|---|
1 |
!"SubSpeciesID","SpeciesID","SubSpeciesCurrentTaxonFlag","SubSpeciesObsoleteTaxonFlag","SubSpeciesName","SubSpeciesMnemonic","SubSpeciesAuthority","InfraSpecificLevel" |
Also available in: Unified diff
inputs/CTFS/: Added StemObservation/ and tables it is joined from