Project

General

Profile

« Previous | Next » 

Revision 4529

inputs/VegBank/: Added taxonobservation_/

View differences:

inputs/VegBank/import_order.txt
1 1
plot_
2
observation_
2
observation_
3
taxonobservation_
inputs/VegBank/taxonobservation_/create.sql
1
SELECT *
2
FROM taxonobservation
3
LEFT JOIN taxoninterpretation USING (taxonobservation_id)
4
LEFT JOIN plantconcept_ USING (plantconcept_id)
5
;
6
ALTER TABLE :table DROP COLUMN row_num;
inputs/VegBank/taxonobservation_/src.csv
1
VegBank[Veg+],Veg+,Comments
2
plantconcept_id,,
3
taxonobservation_id,,
4
observation_id,,
5
authorplantname,,
6
taxonobservation_reference_id,,
7
taxoninferencearea,,
8
emb_taxonobservation,,
9
int_origplantconcept_id,,
10
int_origplantscifull,,
11
int_origplantscinamenoauth,,
12
int_origplantcommon,,
13
int_origplantcode,,
14
int_currplantconcept_id,,
15
int_currplantscifull,,
16
int_currplantscinamenoauth,,
17
int_currplantcommon,,
18
int_currplantcode,,
19
taxonobservation_accessioncode,,
20
taxoninterpretation_id,,
21
stemlocation_id,,
22
taxoninterpretation_plantname_id,,
23
party_id,,
24
role_id,,
25
interpretationtype,,
26
reference_id,,
27
originalinterpretation,,
28
currentinterpretation,,
29
taxonfit,,
30
taxonconfidence,,
31
collector_id,,
32
collectionnumber,,
33
museum_id,,
34
museumaccessionnumber,,
35
grouptype,,
36
notes,,
37
notespublic,,
38
notesmgt,,
39
revisions,,
40
interpretationdate,,
41
collectiondate,,
42
emb_taxoninterpretation,,
43
taxoninterpretation_accessioncode,,
44
plantname_id,,
45
plantconcept__reference_id,,
46
plantname,,
47
plantcode,,
48
plantdescription,,
49
d_obscount,,
50
d_currentaccepted,,
51
plantconcept__accessioncode,,
52
Kingdom,,
53
Subkingdom,,
54
Superdivision,,
55
Division,,
56
Subdivision,,
57
Class,,
58
Subclass,,
59
Order,,
60
Family,,
61
Genus,,
62
Species,,
63
Subspecies,,
64
Variety,,
65
Forma,,
66
row_num,,
inputs/VegBank/taxonobservation_/header.csv
1
plantconcept_id,taxonobservation_id,observation_id,authorplantname,taxonobservation_reference_id,taxoninferencearea,emb_taxonobservation,int_origplantconcept_id,int_origplantscifull,int_origplantscinamenoauth,int_origplantcommon,int_origplantcode,int_currplantconcept_id,int_currplantscifull,int_currplantscinamenoauth,int_currplantcommon,int_currplantcode,taxonobservation_accessioncode,taxoninterpretation_id,stemlocation_id,taxoninterpretation_plantname_id,party_id,role_id,interpretationtype,reference_id,originalinterpretation,currentinterpretation,taxonfit,taxonconfidence,collector_id,collectionnumber,museum_id,museumaccessionnumber,grouptype,notes,notespublic,notesmgt,revisions,interpretationdate,collectiondate,emb_taxoninterpretation,taxoninterpretation_accessioncode,plantname_id,plantconcept__reference_id,plantname,plantcode,plantdescription,d_obscount,d_currentaccepted,plantconcept__accessioncode,Kingdom,Subkingdom,Superdivision,Division,Subdivision,Class,Subclass,Order,Family,Genus,Species,Subspecies,Variety,Forma,row_num
inputs/VegBank/taxonobservation_/map.csv
1
VegBank[Veg+],Veg+,Comments
2
plantconcept_id,,
3
taxonobservation_id,taxonOccurrenceID,
4
observation_id,,
5
authorplantname,verbatimScientificName,
6
taxonobservation_reference_id,,
7
taxoninferencearea,,
8
emb_taxonobservation,,
9
int_origplantconcept_id,,
10
int_origplantscifull,,
11
int_origplantscinamenoauth,,
12
int_origplantcommon,,
13
int_origplantcode,,
14
int_currplantconcept_id,,
15
int_currplantscifull,,
16
int_currplantscinamenoauth,,
17
int_currplantcommon,,
18
int_currplantcode,,
19
taxonobservation_accessioncode,,
20
taxoninterpretation_id,,
21
stemlocation_id,,
22
taxoninterpretation_plantname_id,,
23
party_id,,
24
role_id,,
25
interpretationtype,,
26
reference_id,,
27
originalinterpretation,,
28
currentinterpretation,,
29
taxonconfidence,,
30
collector_id,,
31
collectionnumber,,
32
museum_id,,
33
museumaccessionnumber,catalogNumber,
34
grouptype,,
35
notespublic,,
36
notesmgt,,
37
revisions,,
38
interpretationdate,identifiedDate,
39
collectiondate,collectedDate,
40
emb_taxoninterpretation,,
41
taxoninterpretation_accessioncode,,
42
plantname_id,,
43
plantconcept__reference_id,,
44
plantname,,
45
plantcode,,
46
plantdescription,,
47
d_obscount,,
48
d_currentaccepted,,
49
plantconcept__accessioncode,,
50
Subkingdom,,
51
Superdivision,,
52
Division,,
53
Subdivision,,
54
Subclass,,
55
Variety,,
56
Forma,,
57
row_num,,
inputs/VegBank/taxonobservation_/map.full.csv
1
VegBank[Veg+],Veg+,Comments
2
museumaccessionnumber,catalogNumber,
3
class,class
4
collectiondate,collectedDate,
5
family,family
6
genus,genus
7
interpretationdate,identifiedDate,
8
kingdom,kingdom
9
notes,notes
10
order,order
11
species,species
12
subspecies,subspecies
13
taxonFit,taxonFit
14
taxonobservation_id,taxonOccurrenceID,
15
authorplantname,verbatimScientificName,
inputs/VegBank/taxonobservation_/VegBIEN.csv
1
VegBank[Veg+],VegBIEN:,Comments
2
museumaccessionnumber,"/location/_if[@name=""if subplot""]/else/authorlocationcode/_first/3/_alt/2/_join/3/_if[@name=""if indirect voucher""]/else",
3
collectiondate,/location/locationevent/obsenddate/_*/date/_dateRangeEnd/value/_alt/2/_alt/3,
4
collectiondate,/location/locationevent/obsstartdate/_*/date/_dateRangeStart/value/_alt/2/_alt/3,
5
collectiondate,/location/locationevent/taxonoccurrence/aggregateoccurrence/collectiondate/_*/date/_alt/3,
6
notes,/location/locationevent/taxonoccurrence/aggregateoccurrence/notes,
7
museumaccessionnumber,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/else",
8
authorplantname,/location/locationevent/taxonoccurrence/authortaxoncode/_alt/2/_alt/1,
9
taxonobservation_id,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/1,
10
subspecies,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[binomial,authority,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=subspecies]/plantname/_name/last",
11
species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[binomial,authority,subspecies,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=species]/plantname",
12
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",
13
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",
14
order,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,family,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=order]/plantname",
15
class,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,family,order,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=class]/plantname",
16
kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[binomial,authority,subspecies,species,genus,family,order,class,subkingdom,],do=""plantname[rank=_val]/parent_id""]/plantname[rank=kingdom]/plantname",
17
interpretationdate,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_*/date/_dateRangeStart/value/_alt/3,
18
taxonFit,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/taxonfit,
19
authorplantname,"/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/plantconcept/plantname_id/_simplifyPath:[next=parent_id]/path/_forEach:[in:[],do=""plantname[rank=_val]/parent_id""]/plantname[rank=binomial]/plantname",
20
museumaccessionnumber,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then",
inputs/VegBank/taxonobservation_/test.xml.ref
1
Put template:
2
<VegBIEN>
3
    <location id="-1">
4
        <authorlocationcode>$museumaccessionnumber</authorlocationcode>
5
        <locationevent>
6
            <obsenddate><_date><date><_dateRangeEnd><value>$collectiondate</value></_dateRangeEnd></date></_date></obsenddate>
7
            <obsstartdate><_date><date><_dateRangeStart><value>$collectiondate</value></_dateRangeStart></date></_date></obsstartdate>
8
            <taxonoccurrence>
9
                <aggregateoccurrence>
10
                    <collectiondate><_date><date>$collectiondate</date></_date></collectiondate>
11
                    <notes>$notes</notes>
12
                    <plantobservation><specimenreplicate><catalognumber_dwc>$museumaccessionnumber</catalognumber_dwc></specimenreplicate></plantobservation>
13
                </aggregateoccurrence>
14
                <authortaxoncode>$authorplantname</authortaxoncode>
15
                <sourceaccessioncode>$taxonobservation_id</sourceaccessioncode>
16
                <taxondetermination>
17
                    <plantconcept_id>
18
                        <plantconcept>
19
                            <plantname_id>
20
                                <_simplifyPath>
21
                                    <next>parent_id</next>
22
                                    <path>
23
                                        <plantname>
24
                                            <rank>binomial</rank>
25
                                            <parent_id>
26
                                                <plantname>
27
                                                    <rank>authority</rank>
28
                                                    <parent_id>
29
                                                        <plantname>
30
                                                            <rank>subspecies</rank>
31
                                                            <plantname>$Subspecies</plantname>
32
                                                            <parent_id>
33
                                                                <plantname>
34
                                                                    <rank>species</rank>
35
                                                                    <plantname>$Species</plantname>
36
                                                                    <parent_id>
37
                                                                        <plantname>
38
                                                                            <rank>genus</rank>
39
                                                                            <plantname>$Genus</plantname>
40
                                                                            <parent_id>
41
                                                                                <plantname>
42
                                                                                    <rank>family</rank>
43
                                                                                    <plantname>$Family</plantname>
44
                                                                                    <parent_id>
45
                                                                                        <plantname>
46
                                                                                            <rank>order</rank>
47
                                                                                            <plantname>$Order</plantname>
48
                                                                                            <parent_id>
49
                                                                                                <plantname>
50
                                                                                                    <rank>class</rank>
51
                                                                                                    <plantname>$Class</plantname>
52
                                                                                                    <parent_id>
53
                                                                                                        <plantname>
54
                                                                                                            <rank>subkingdom</rank>
55
                                                                                                            <parent_id>
56
                                                                                                                <plantname>
57
                                                                                                                    <rank>kingdom</rank>
58
                                                                                                                    <plantname>$Kingdom</plantname>
59
                                                                                                                </plantname>
60
                                                                                                            </parent_id>
61
                                                                                                        </plantname>
62
                                                                                                    </parent_id>
63
                                                                                                </plantname>
64
                                                                                            </parent_id>
65
                                                                                        </plantname>
66
                                                                                    </parent_id>
67
                                                                                </plantname>
68
                                                                            </parent_id>
69
                                                                        </plantname>
70
                                                                    </parent_id>
71
                                                                </plantname>
72
                                                            </parent_id>
73
                                                        </plantname>
74
                                                    </parent_id>
75
                                                </plantname>
76
                                            </parent_id>
77
                                        </plantname>
78
                                    </path>
79
                                </_simplifyPath>
80
                            </plantname_id>
81
                        </plantconcept>
82
                    </plantconcept_id>
83
                    <determinationdate><_date><date><_dateRangeStart><value>$interpretationdate</value></_dateRangeStart></date></_date></determinationdate>
84
                    <taxonfit>$taxonfit</taxonfit>
85
                </taxondetermination>
86
                <taxondetermination>
87
                    <isoriginal>true</isoriginal>
88
                    <plantconcept_id>
89
                        <plantconcept>
90
                            <plantname_id>
91
                                <_simplifyPath>
92
                                    <next>parent_id</next>
93
                                    <path>
94
                                        <plantname>
95
                                            <rank>binomial</rank>
96
                                            <plantname>$authorplantname</plantname>
97
                                        </plantname>
98
                                    </path>
99
                                </_simplifyPath>
100
                            </plantname_id>
101
                        </plantconcept>
102
                    </plantconcept_id>
103
                </taxondetermination>
104
            </taxonoccurrence>
105
        </locationevent>
106
    </location>
107
</VegBIEN>
108
Inserted 18 new rows into database

Also available in: Unified diff