Project

General

Profile

« Previous | Next » 

Revision 6761

inputs/CVS/: Joined together stemCount and stemLocation tables to create stemLocation_, in order to include the stem size class's measurements in each tagged stem's stemobservation (in addition to in the stemobservation for the aggregateoccurrence as a whole)

View differences:

inputs/CVS/stemLocation/new_terms.csv
1
STEMLOCATION_ID,stemID,,
2
STEMLOCATION_ID,individualID,,
3
STEMCOUNT_ID,aggregateOccurrenceID,,
4
stemCode,authorStemCode,,
5
stemXPosition,organismX_m,,
6
stemYPosition,organismY_m,,
inputs/CVS/stemLocation/unmapped_terms.csv
1
*stemHealth
2
*dba_src_ID
3
*cust_cvs_stemSource
4
*cust_cvs_stemComment
5
*cust_cvs_resprout
6
*entry_sortOrder
inputs/CVS/stemLocation/header.csv
1
STEMLOCATION_ID,STEMCOUNT_ID,stemCode,stemXPosition,stemYPosition,stemHealth,dba_src_ID,cust_cvs_stemSource,cust_cvs_stemComment,cust_cvs_resprout,entry_sortOrder
inputs/CVS/stemLocation/map.csv
1
CVS,VegCore,Filter,Comments
2
STEMLOCATION_ID,stemID,,
3
STEMLOCATION_ID,individualID,,
4
STEMCOUNT_ID,aggregateOccurrenceID,,
5
stemCode,authorStemCode,,
6
stemXPosition,organismX_m,,
7
stemYPosition,organismY_m,,
8
stemHealth,*stemHealth,,
9
dba_src_ID,*dba_src_ID,,
10
cust_cvs_stemSource,*cust_cvs_stemSource,,
11
cust_cvs_stemComment,*cust_cvs_stemComment,,
12
cust_cvs_resprout,*cust_cvs_resprout,,
13
entry_sortOrder,*entry_sortOrder,,
inputs/CVS/stemLocation/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>CVS</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <taxonoccurrence>
12
                                <aggregateoccurrence>
13
                                    <plantobservation>
14
                                        <sourceaccessioncode>$STEMLOCATION_ID</sourceaccessioncode>
15
                                        <stemobservation>
16
                                            <authorstemcode>$stemCode</authorstemcode>
17
                                            <sourceaccessioncode>$STEMLOCATION_ID</sourceaccessioncode>
18
                                            <xposition_m>$stemXPosition</xposition_m>
19
                                            <yposition_m>$stemYPosition</yposition_m>
20
                                        </stemobservation>
21
                                    </plantobservation>
22
                                    <sourceaccessioncode>$STEMCOUNT_ID</sourceaccessioncode>
23
                                </aggregateoccurrence>
24
                            </taxonoccurrence>
25
                        </locationevent>
26
                    </location>
27
                </path>
28
            </_simplifyPath>
29
        </path>
30
    </_setDefault>
31
</VegBIEN>
32
Inserted 0 new rows into database
inputs/CVS/stemLocation/VegBIEN.csv
1
CVS,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
STEMLOCATION_ID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
3
STEMLOCATION_ID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/sourceaccessioncode,
4
stemCode,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/authorstemcode,
5
STEMLOCATION_ID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/sourceaccessioncode,
6
stemXPosition,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/xposition_m,
7
stemYPosition,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/yposition_m,
8
STEMCOUNT_ID,/location/locationevent/taxonoccurrence/aggregateoccurrence/sourceaccessioncode,
9
STEMLOCATION_ID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
10
STEMCOUNT_ID,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/cond/_exists",
11
STEMLOCATION_ID,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else",
12
cust_cvs_resprout,,** No join mapping for *cust_cvs_resprout ** 
13
cust_cvs_stemComment,,** No join mapping for *cust_cvs_stemComment ** 
14
cust_cvs_stemSource,,** No join mapping for *cust_cvs_stemSource ** 
15
dba_src_ID,,** No join mapping for *dba_src_ID ** 
16
entry_sortOrder,,** No join mapping for *entry_sortOrder ** 
17
stemHealth,,** No join mapping for *stemHealth ** 
inputs/CVS/import_order.txt
3 3
observation_
4 4
taxonObservation_
5 5
stemCount_
6
stemLocation
6
stemLocation_
inputs/CVS/cvs.~.clean_up.sql
13 13
ALTER TABLE "stemCount" RENAME "dba_src_ID" TO "stemCount_dba_src_ID";
14 14
ALTER TABLE "stemCount" RENAME "entry_herbLineID" TO "stemCount_entry_herbLineID";
15 15
ALTER TABLE "stemCount" RENAME "entry_treeLineID" TO "stemCount_entry_treeLineID";
16
ALTER TABLE "stemCount" RENAME "entry_sortOrder" TO "stemCount_entry_sortOrder";
17
ALTER TABLE "stemLocation" RENAME "entry_sortOrder" TO "stemLocation_entry_sortOrder";
16 18
ALTER TABLE "taxonInterpretation" RENAME "PARTY_ID" TO "taxonInterpretation_PARTY_ID";
17 19
ALTER TABLE "taxonInterpretation" RENAME "PLANTNAME_ID" TO "taxonInterpretation_PLANTNAME_ID";
18 20
ALTER TABLE "taxonInterpretation" RENAME "dba_src_ID" TO "taxonInterpretation_dba_src_ID";
inputs/CVS/stemLocation_/create.sql
1
SELECT *
2
FROM "stemCount"
3
LEFT JOIN "stemLocation" USING ("STEMCOUNT_ID")
4
;
inputs/CVS/stemLocation_/header.csv
1
STEMCOUNT_ID,taxonImportance_ID,stemDiameter,stemDiameterAccuracy,stemHeight,stemHeightAccuracy,stemCount,stemTaxonArea,stemCount_dba_src_ID,cust_cvs_ddh,cust_cvs_ddhAccuracy,cust_cvs_isPlanted,cust_cvs_subsamplingFactor,stemCount_entry_herbLineID,stemCount_entry_treeLineID,entry_recordCount,stemCount_entry_sortOrder,STEMLOCATION_ID,stemCode,stemXPosition,stemYPosition,stemHealth,dba_src_ID,cust_cvs_stemSource,cust_cvs_stemComment,cust_cvs_resprout,stemLocation_entry_sortOrder
inputs/CVS/stemLocation_/map.csv
1
CVS,VegCore,Filter,Comments
2
STEMCOUNT_ID,aggregateOccurrenceID,,
3
taxonImportance_ID,OMIT,,Omitted because STEMCOUNT_ID is more specific
4
stemDiameter,diameterBreastHeight_cm,,
5
stemDiameterAccuracy,*stemdiameteraccuracy,,
6
stemHeight,height_m,,
7
stemHeightAccuracy,*stemheightaccuracy,,
8
stemCount,individualCount,,
9
stemTaxonArea,*stemtaxonarea,,
10
stemCount_dba_src_ID,*stemCount_dba_src_ID,,
11
cust_cvs_ddh,*cust_cvs_ddh,,
12
cust_cvs_ddhAccuracy,*cust_cvs_ddhAccuracy,,
13
cust_cvs_isPlanted,*cust_cvs_isPlanted,,
14
cust_cvs_subsamplingFactor,*cust_cvs_subsamplingFactor,,
15
stemCount_entry_herbLineID,*stemCount_entry_herbLineID,,
16
stemCount_entry_treeLineID,*stemCount_entry_treeLineID,,
17
entry_recordCount,*entry_recordCount,,
18
stemCount_entry_sortOrder,*stemCount_entry_sortOrder,,
19
STEMLOCATION_ID,stemID,,
20
STEMLOCATION_ID,individualID,,
21
stemCode,authorStemCode,,
22
stemXPosition,organismX_m,,
23
stemYPosition,organismY_m,,
24
stemHealth,*stemhealth,,
25
dba_src_ID,*dba_src_ID,,
26
cust_cvs_stemSource,*cust_cvs_stemSource,,
27
cust_cvs_stemComment,*cust_cvs_stemComment,,
28
cust_cvs_resprout,*cust_cvs_resprout,,
29
stemLocation_entry_sortOrder,*stemLocation_entry_sortOrder,,
inputs/CVS/stemLocation_/VegBIEN.csv
1
CVS,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2
STEMLOCATION_ID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
3
stemCount,/location/locationevent/taxonoccurrence/aggregateoccurrence/count,
4
STEMLOCATION_ID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/sourceaccessioncode,
5
stemCode,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/authorstemcode,
6
stemDiameter,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value,
7
stemHeight,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m,
8
STEMLOCATION_ID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/sourceaccessioncode,
9
stemXPosition,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/xposition_m,
10
stemYPosition,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/yposition_m,
11
STEMCOUNT_ID,/location/locationevent/taxonoccurrence/aggregateoccurrence/sourceaccessioncode,
12
STEMLOCATION_ID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
13
STEMCOUNT_ID,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/cond/_exists",
14
STEMLOCATION_ID,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else",
15
cust_cvs_ddh,,** No join mapping for *cust_cvs_ddh ** 
16
cust_cvs_ddhAccuracy,,** No join mapping for *cust_cvs_ddhAccuracy ** 
17
cust_cvs_isPlanted,,** No join mapping for *cust_cvs_isPlanted ** 
18
cust_cvs_resprout,,** No join mapping for *cust_cvs_resprout ** 
19
cust_cvs_stemComment,,** No join mapping for *cust_cvs_stemComment ** 
20
cust_cvs_stemSource,,** No join mapping for *cust_cvs_stemSource ** 
21
cust_cvs_subsamplingFactor,,** No join mapping for *cust_cvs_subsamplingFactor ** 
22
dba_src_ID,,** No join mapping for *dba_src_ID ** 
23
entry_recordCount,,** No join mapping for *entry_recordCount ** 
24
stemCount_dba_src_ID,,** No join mapping for *stemCount_dba_src_ID ** 
25
stemCount_entry_herbLineID,,** No join mapping for *stemCount_entry_herbLineID ** 
26
stemCount_entry_sortOrder,,** No join mapping for *stemCount_entry_sortOrder ** 
27
stemCount_entry_treeLineID,,** No join mapping for *stemCount_entry_treeLineID ** 
28
stemDiameterAccuracy,,** No join mapping for *stemdiameteraccuracy ** 
29
stemHealth,,** No join mapping for *stemhealth ** 
30
stemHeightAccuracy,,** No join mapping for *stemheightaccuracy ** 
31
stemLocation_entry_sortOrder,,** No join mapping for *stemLocation_entry_sortOrder ** 
32
stemTaxonArea,,** No join mapping for *stemtaxonarea ** 
33
taxonImportance_ID,,** No non-empty join mapping for OMIT ** Omitted because STEMCOUNT_ID is more specific
inputs/CVS/stemLocation_/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>CVS</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <taxonoccurrence>
12
                                <aggregateoccurrence>
13
                                    <count>$stemCount</count>
14
                                    <plantobservation>
15
                                        <sourceaccessioncode>$STEMLOCATION_ID</sourceaccessioncode>
16
                                        <stemobservation>
17
                                            <authorstemcode>$stemCode</authorstemcode>
18
                                            <diameterbreastheight_m><_cm_to_m><value>$stemDiameter</value></_cm_to_m></diameterbreastheight_m>
19
                                            <height_m>$stemHeight</height_m>
20
                                            <sourceaccessioncode>$STEMLOCATION_ID</sourceaccessioncode>
21
                                            <xposition_m>$stemXPosition</xposition_m>
22
                                            <yposition_m>$stemYPosition</yposition_m>
23
                                        </stemobservation>
24
                                    </plantobservation>
25
                                    <sourceaccessioncode>$STEMCOUNT_ID</sourceaccessioncode>
26
                                </aggregateoccurrence>
27
                            </taxonoccurrence>
28
                        </locationevent>
29
                    </location>
30
                </path>
31
            </_simplifyPath>
32
        </path>
33
    </_setDefault>
34
</VegBIEN>
35
Inserted 7 new rows into database
inputs/CVS/stemLocation_/unmapped_terms.csv
1
*stemdiameteraccuracy
2
*stemheightaccuracy
3
*stemtaxonarea
4
*stemCount_dba_src_ID
5
*cust_cvs_ddh
6
*cust_cvs_ddhAccuracy
7
*cust_cvs_isPlanted
8
*cust_cvs_subsamplingFactor
9
*stemCount_entry_herbLineID
10
*stemCount_entry_treeLineID
11
*entry_recordCount
12
*stemCount_entry_sortOrder
13
*stemhealth
14
*dba_src_ID
15
*cust_cvs_stemSource
16
*cust_cvs_stemComment
17
*cust_cvs_resprout
18
*stemLocation_entry_sortOrder
inputs/CVS/stemLocation_/new_terms.csv
1
STEMCOUNT_ID,aggregateOccurrenceID,,
2
taxonImportance_ID,OMIT,,Omitted because STEMCOUNT_ID is more specific
3
stemDiameter,diameterBreastHeight_cm,,
4
stemHeight,height_m,,
5
STEMLOCATION_ID,stemID,,
6
STEMLOCATION_ID,individualID,,
7
stemCode,authorStemCode,,
8
stemXPosition,organismX_m,,
9
stemYPosition,organismY_m,,

Also available in: Unified diff