Project

General

Profile

« Previous | Next » 

Revision 6403

mappings/VegCore-VegBIEN.csv: Set the source_id col_default to the datasource name using the new _setDefault() built-in function and _env()

View differences:

test.xml.ref
1 1
Put template:
2 2
<VegBIEN>
3
    <_simplifyPath id="-1">
4
        <next>parent_id</next>
3
    <_setDefault id="-1">
4
        <col>source_id</col>
5
        <value><source><shortname>CTFS</shortname></source></value>
5 6
        <path>
6
            <location>
7
                <authorlocationcode>$PlotName</authorlocationcode>
8
                <sourceaccessioncode>$PlotID</sourceaccessioncode>
9
                <area_m2><_ha_to_m2><value>$SizeOfSite</value></_ha_to_m2></area_m2>
10
                <elevation_m>$Elevation</elevation_m>
11
                <locationnarrative>
12
                    <_alt>
13
                        <0>$DescriptionOfSite</0>
14
                        <1>$LocationName</1>
15
                    </_alt>
16
                </locationnarrative>
17
                <locationplace>
18
                    <place_id>
19
                        <place>
20
                            <coordinates_id>
21
                                <coordinates>
22
                                    <footprintgeometry_dwc>$ShapeOfSite</footprintgeometry_dwc>
23
                                    <latitude_deg>
24
                                        <_nullIf>
25
                                            <null>0</null>
26
                                            <type>float</type>
27
                                            <value>$Latitude</value>
28
                                        </_nullIf>
29
                                    </latitude_deg>
30
                                    <longitude_deg>
31
                                        <_nullIf>
32
                                            <null>0</null>
33
                                            <type>float</type>
34
                                            <value>$Longitude</value>
35
                                        </_nullIf>
36
                                    </longitude_deg>
37
                                </coordinates>
38
                            </coordinates_id>
39
                            <country>$CountryName</country>
40
                            <matched_place_id>
7
            <_simplifyPath>
8
                <next>parent_id</next>
9
                <path>
10
                    <location>
11
                        <authorlocationcode>$PlotName</authorlocationcode>
12
                        <sourceaccessioncode>$PlotID</sourceaccessioncode>
13
                        <area_m2><_ha_to_m2><value>$SizeOfSite</value></_ha_to_m2></area_m2>
14
                        <elevation_m>$Elevation</elevation_m>
15
                        <locationnarrative>
16
                            <_alt>
17
                                <0>$DescriptionOfSite</0>
18
                                <1>$LocationName</1>
19
                            </_alt>
20
                        </locationnarrative>
21
                        <locationplace>
22
                            <place_id>
41 23
                                <place>
42
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
43 24
                                    <coordinates_id>
44 25
                                        <coordinates>
45
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
26
                                            <footprintgeometry_dwc>$ShapeOfSite</footprintgeometry_dwc>
46 27
                                            <latitude_deg>
47 28
                                                <_nullIf>
48 29
                                                    <null>0</null>
......
60 41
                                        </coordinates>
61 42
                                    </coordinates_id>
62 43
                                    <country>$CountryName</country>
44
                                    <matched_place_id>
45
                                        <place>
46
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
47
                                            <coordinates_id>
48
                                                <coordinates>
49
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
50
                                                    <latitude_deg>
51
                                                        <_nullIf>
52
                                                            <null>0</null>
53
                                                            <type>float</type>
54
                                                            <value>$Latitude</value>
55
                                                        </_nullIf>
56
                                                    </latitude_deg>
57
                                                    <longitude_deg>
58
                                                        <_nullIf>
59
                                                            <null>0</null>
60
                                                            <type>float</type>
61
                                                            <value>$Longitude</value>
62
                                                        </_nullIf>
63
                                                    </longitude_deg>
64
                                                </coordinates>
65
                                            </coordinates_id>
66
                                            <country>$CountryName</country>
67
                                        </place>
68
                                    </matched_place_id>
63 69
                                </place>
64
                            </matched_place_id>
65
                        </place>
66
                    </place_id>
67
                </locationplace>
68
            </location>
70
                            </place_id>
71
                        </locationplace>
72
                    </location>
73
                </path>
74
            </_simplifyPath>
69 75
        </path>
70
    </_simplifyPath>
76
    </_setDefault>
71 77
</VegBIEN>
72 78
Inserted 14 new rows into database

Also available in: Unified diff