Project

General

Profile

« Previous | Next » 

Revision 1073

VegBIEN mappings: Mapped datasource name to new project.datasource. Fixes project duplicate elimination.

View differences:

inputs/SALVIAS/test/VegX.plots.xml.ref
42 42
        <party id="1"><organizationName>SALVIAS</organizationName></party>
43 43
    </parties>
44 44
    <projects>
45
        <project id="0"><title>1</title></project>
46
        <project id="1"><title>1</title></project>
45
        <project id="0">
46
            <personnel>
47
                <role>metadataProvider</role>
48
                <organizationName>SALVIAS</organizationName>
49
            </personnel>
50
            <title>1</title>
51
        </project>
52
        <project id="1">
53
            <personnel>
54
                <role>metadataProvider</role>
55
                <organizationName>SALVIAS</organizationName>
56
            </personnel>
57
            <title>1</title>
58
        </project>
47 59
    </projects>
48 60
    <plots>
49 61
        <plot id="0">
inputs/SALVIAS/test/VegBIEN.plots.xml.ref
31 31
            </location>
32 32
        </location_id>
33 33
        <plotmethod_id><plotmethod><name>0.1 ha  transect, stems &gt;= 2.5 cm dbh</name></plotmethod></plotmethod_id>
34
        <project_id><project><projectname>1</projectname></project></project_id>
34
        <project_id>
35
            <project>
36
                <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
37
                <projectname>1</projectname>
38
            </project>
39
        </project_id>
35 40
        <commclass>
36 41
            <commdetermination>
37 42
                <commconcept_id>
......
85 90
            </location>
86 91
        </location_id>
87 92
        <plotmethod_id><plotmethod><name>0.1 ha  transect, stems &gt;= 2.5 cm dbh</name></plotmethod></plotmethod_id>
88
        <project_id><project><projectname>1</projectname></project></project_id>
93
        <project_id>
94
            <project>
95
                <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
96
                <projectname>1</projectname>
97
            </project>
98
        </project_id>
89 99
        <commclass>
90 100
            <commdetermination>
91 101
                <commconcept_id>
inputs/SALVIAS/test/import.plots.out.ref
1
Inserted 32 new rows into database
1
Inserted 31 new rows into database
inputs/SALVIAS/maps/VegX.plots.csv
2 2
"PlotID",":[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=authorCode]/value","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
3 3
"orig_filename",,
4 4
"AccessCode",,
5
"project_id","/*ID->/*s/project/title",
5
"project_id","/*ID->/*s/project:[personnel[role=metadataProvider]/organizationName=$/_ignore/inLabel]/title",
6 6
"PrimOwnerID",,
7 7
"SiteCode","/*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier","Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)"
8 8
"SiteName",,
inputs/SALVIAS/maps/VegBIEN.plots.csv
14 14
LatDec,"/*_id/location/{locationdetermination[!namedplace_id]/latitude,centerlatitude}",
15 15
LongDec,"/*_id/location/{locationdetermination[!namedplace_id]/longitude,centerlongitude}",
16 16
PlotMethod,/*_id/plotmethod/name,
17
project_id,/*_id/project/projectname,
17
project_id,/*_id/project:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/projectname,
18 18
life_zone_code,/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
19 19
life_zone,/commclass/commdetermination/*_id/commconcept/commdescription,
20 20
Precip,"/definedvalue[*_id/userdefined[tablename=locationevent,userdefinedname=precipitationMm]]:[@fkey=tableRecord_ID]/definedvalue",
inputs/SALVIAS-CSV/test/VegX.plots.xml.ref
31 31
        </plotObservation>
32 32
    </plotObservations>
33 33
    <projects>
34
        <project id="0"><title>RAINFOR - 1 ha Peru</title></project>
35
        <project id="1"><title>RAINFOR - 1 ha Peru</title></project>
34
        <project id="0">
35
            <personnel>
36
                <role>metadataProvider</role>
37
                <organizationName>SALVIAS</organizationName>
38
            </personnel>
39
            <title>RAINFOR - 1 ha Peru</title>
40
        </project>
41
        <project id="1">
42
            <personnel>
43
                <role>metadataProvider</role>
44
                <organizationName>SALVIAS</organizationName>
45
            </personnel>
46
            <title>RAINFOR - 1 ha Peru</title>
47
        </project>
36 48
    </projects>
37 49
    <parties>
38 50
        <party id="0"><organizationName>SALVIAS</organizationName></party>
inputs/SALVIAS-CSV/test/VegBIEN.plots.xml.ref
40 40
            </location>
41 41
        </location_id>
42 42
        <plotmethod_id><plotmethod><name>1 ha, stems &gt;= 10 cm dbh</name></plotmethod></plotmethod_id>
43
        <project_id><project><projectname>RAINFOR - 1 ha Peru</projectname></project></project_id>
43
        <project_id>
44
            <project>
45
                <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
46
                <projectname>RAINFOR - 1 ha Peru</projectname>
47
            </project>
48
        </project_id>
44 49
        <obsstartdate>1990-11-16</obsstartdate>
45 50
        <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
46 51
        <authoreventcode>26102</authoreventcode>
......
85 90
            </location>
86 91
        </location_id>
87 92
        <plotmethod_id><plotmethod><name>1 ha, stems &gt;= 10 cm dbh</name></plotmethod></plotmethod_id>
88
        <project_id><project><projectname>RAINFOR - 1 ha Peru</projectname></project></project_id>
93
        <project_id>
94
            <project>
95
                <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
96
                <projectname>RAINFOR - 1 ha Peru</projectname>
97
            </project>
98
        </project_id>
89 99
        <obsstartdate>1990-11-16</obsstartdate>
90 100
        <datasource_id><party><organizationname>SALVIAS</organizationname></party></datasource_id>
91 101
        <authoreventcode>26103</authoreventcode>
inputs/SALVIAS-CSV/test/import.plots.out.ref
1
Inserted 15 new rows into database
1
Inserted 14 new rows into database
inputs/SALVIAS-CSV/maps/VegX.plots.csv
1 1
"SALVIAS","VegX:/*s/plotObservation","Comments"
2
"project","/*ID->/*s/project/title",
2
"project","/*ID->/*s/project:[personnel[role=metadataProvider]/organizationName=$/_ignore/inLabel]/title",
3 3
"PLOT_ID",":[partyWithRole/*ID->/parties/party/organizationName=$/_ignore/inLabel]/simpleUserdefined[name=authorCode]/value","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
4 4
"plot_code","/*UniqueIdentifierID->/*s/plot/plotUniqueIdentifier","Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)"
5 5
"major_geo","/*UniqueIdentifierID->/*s/plot/simpleUserdefined[name=majorGeo]/value",
inputs/SALVIAS-CSV/maps/VegBIEN.plots.csv
14 14
lat_decimal,"/*_id/location/{locationdetermination[!namedplace_id]/latitude,centerlatitude}",
15 15
long_decimal,"/*_id/location/{locationdetermination[!namedplace_id]/longitude,centerlongitude}",
16 16
plot_methodology,/*_id/plotmethod/name,
17
project,/*_id/project/projectname,
17
project,/*_id/project:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/projectname,
18 18
holdridge_life_zone,/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
19 19
life_zone_code,/commclass/commdetermination/*_id/commconcept/commdescription,
20 20
precip_mm,"/definedvalue[*_id/userdefined[tablename=locationevent,userdefinedname=precipitationMm]]:[@fkey=tableRecord_ID]/definedvalue",
mappings/VegX-VegBIEN.plots.csv
17 17
/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude,"/*_id/location/{locationdetermination[!namedplace_id]/latitude,centerlatitude}",
18 18
/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude,"/*_id/location/{locationdetermination[!namedplace_id]/longitude,centerlongitude}",
19 19
/simpleUserdefined[name=plotMethodology]/value,/*_id/plotmethod/name,
20
/*ID->/*s/project/title,/*_id/project/projectname,
20
/*ID->/*s/project/personnel[role=metadataProvider]/organizationName,/*_id/project:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1,
21
/*ID->/*s/project:[personnel[role=metadataProvider]/organizationName=$/_ignore/inLabel]/title,/*_id/project:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/projectname,
21 22
->/*s/communityDetermination[*ID]/*s/communityConcept/commonName,/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
22 23
->/*s/communityDetermination[*ID]/*s/communityConcept/name,/commclass/commdetermination/*_id/commconcept/commdescription,
23 24
/simpleUserdefined[name=precipMm]/value,"/definedvalue[*_id/userdefined[tablename=locationevent,userdefinedname=precipitationMm]]:[@fkey=tableRecord_ID]/definedvalue",
mappings/VegX-VegBIEN.organisms.csv
17 17
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLatitude,"/*_id/locationevent/*_id/location/{locationdetermination[!namedplace_id]/latitude,centerlatitude}",
18 18
/*ID->/*s/plotObservation/*UniqueIdentifierID->/*s/plot/geospatial/DecimalLongitude,"/*_id/locationevent/*_id/location/{locationdetermination[!namedplace_id]/longitude,centerlongitude}",
19 19
/*ID->/*s/plotObservation/simpleUserdefined[name=plotMethodology]/value,/*_id/locationevent/*_id/plotmethod/name,
20
/*ID->/*s/plotObservation/*ID->/*s/project/title,/*_id/locationevent/*_id/project/projectname,
20
/*ID->/*s/plotObservation/*ID->/*s/project/personnel[role=metadataProvider]/organizationName,/*_id/locationevent/*_id/project:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/datasource_id/party/organizationname/_alt/1,
21
/*ID->/*s/plotObservation/*ID->/*s/project:[personnel[role=metadataProvider]/organizationName=$/_ignore/inLabel]/title,/*_id/locationevent/*_id/project:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/projectname,
21 22
/*ID->/*s/plotObservation->/*s/communityDetermination[*ID]/*s/communityConcept/commonName,/*_id/locationevent/commclass/commdetermination/*_id/commconcept/*_id/*/commname,
22 23
/*ID->/*s/plotObservation->/*s/communityDetermination[*ID]/*s/communityConcept/name,/*_id/locationevent/commclass/commdetermination/*_id/commconcept/commdescription,
23 24
/*ID->/*s/plotObservation/simpleUserdefined[name=precipMm]/value,"/*_id/locationevent/definedvalue[*_id/userdefined[tablename=locationevent,userdefinedname=precipitationMm]]:[@fkey=tableRecord_ID]/definedvalue",
mappings/for_review/VegX-VegBIEN.plots.csv
17 17
//geospatial/DecimalLatitude,"/*_id/location/{locationdetermination[]/latitude,centerlatitude}",
18 18
//geospatial/DecimalLongitude,"/*_id/location/{locationdetermination[]/longitude,centerlongitude}",
19 19
/simpleUserdefined[name=plotMethodology]/value,//plotmethod/name,
20
//project/title,//project/projectname,
20
//project/personnel[role=metadataProvider]/organizationName,//party/organizationname/_alt/1,
21
//*s/project:[personnel[role=metadataProvider]/organizationName=$/_ignore/inLabel]/title,//project/projectname,
21 22
//*s/communityDetermination/*s/communityConcept/commonName,//*/commname,
22 23
//*s/communityDetermination/*s/communityConcept/name,//commconcept/commdescription,
23 24
/simpleUserdefined[name=precipMm]/value,"/definedvalue[*_id/userdefined[tablename=locationevent,userdefinedname=precipitationMm]]/definedvalue",
mappings/for_review/VegX-VegBIEN.organisms.csv
17 17
//geospatial/DecimalLatitude,"/*_id/locationevent/*_id/location/{locationdetermination[]/latitude,centerlatitude}",
18 18
//geospatial/DecimalLongitude,"/*_id/locationevent/*_id/location/{locationdetermination[]/longitude,centerlongitude}",
19 19
//plotObservation/simpleUserdefined[name=plotMethodology]/value,//plotmethod/name,
20
//project/title,//project/projectname,
20
//project/personnel[role=metadataProvider]/organizationName,//party/organizationname/_alt/1,
21
//*s/project:[personnel[role=metadataProvider]/organizationName=$/_ignore/inLabel]/title,//project/projectname,
21 22
//*s/communityDetermination/*s/communityConcept/commonName,//*/commname,
22 23
//*s/communityDetermination/*s/communityConcept/name,//commconcept/commdescription,
23 24
//plotObservation/simpleUserdefined[name=precipMm]/value,"//locationevent/definedvalue[*_id/userdefined[tablename=locationevent,userdefinedname=precipitationMm]]/definedvalue",

Also available in: Unified diff