JorgeDeJesus

Untitled

Oct 30th, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.79 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd">
  3. <namespaces>
  4.                 <Namespace><prefix>gml</prefix><uri>http://www.opengis.net/gml/3.2</uri></Namespace>
  5.                 <Namespace><prefix>om</prefix><uri>http://www.opengis.net/om/2.0</uri></Namespace>
  6.                 <Namespace><prefix>sam</prefix><uri>http://www.opengis.net/sampling/2.0</uri></Namespace>
  7.                 <Namespace><prefix>sams</prefix><uri>http://www.opengis.net/samplingSpatial/2.0</uri></Namespace>
  8.                 <Namespace><prefix>xlink</prefix><uri>http://www.w3.org/1999/xlink</uri></Namespace>
  9.                 <Namespace><prefix>xsi</prefix><uri>http://www.w3.org/2001/XMLSchema-instance</uri></Namespace>
  10.                 <Namespace><prefix>soil</prefix><uri>http://www.opengis.net/soil-data-ie/0.1</uri></Namespace>
  11. </namespaces>
  12.  
  13.         <sourceDataStores>
  14.                 <DataStore>
  15.                         <id>datastore</id>
  16.                         <parameters>
  17.                         <Parameter><name>dbtype</name><value>postgisng</value></Parameter>
  18.                         <Parameter><name>host</name><value>85.214.35.184</value></Parameter>
  19.                         <Parameter><name>port</name><value>5432</value></Parameter>
  20.                         <Parameter><name>database</name><value>isric</value></Parameter>
  21.                         <Parameter><name>schema</name><value>rest</value></Parameter>
  22.                         <Parameter><name>Expose primary keys</name><value>true</value></Parameter>
  23.                         </parameters>
  24.                 </DataStore>
  25.         </sourceDataStores>
  26.         <targetTypes>
  27.                 <FeatureType>
  28.                   <schemaUri>http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd</schemaUri>
  29.                   <schemaUri>http://schemas.opengis.net/om/2.0/observation.xsd</schemaUri>
  30.                   <schemaUri>http://schemas.opengis.net/sampling/2.0/samplingFeature.xsd</schemaUri>
  31.                   <schemaUri>http://lab.scinfo.org.nz/static/schema/soil-data-ie/0.1/soil-data-ie.xsd</schemaUri>
  32.                   <schemaUri>http://schemas.opengis.net/gml/3.2.1/gml.xsd</schemaUri>
  33.                 </FeatureType>
  34.         </targetTypes>
  35.         <typeMappings>
  36.                 <FeatureTypeMapping>
  37.                         <sourceDataStore>datastore</sourceDataStore>
  38.                         <sourceType>soil</sourceType>
  39.                         <targetElement>soil:SO_Soil</targetElement>
  40.                         <attributeMappings>
  41.                                 <AttributeMapping>
  42.                                         <targetAttribute>soil:SO_Soil</targetAttribute>
  43.                                         <idExpression>
  44.                                            <!--this works-->
  45.                                            <!--<OCQL>strConCat('so_' , profile_code)</OCQL>-->
  46.                                         <OCQL>strConCat('soil.so_soil.' , profile_id)</OCQL>
  47.                                         </idExpression>
  48.                                 </AttributeMapping>
  49.                                 <AttributeMapping>
  50.                                         <targetAttribute>gml:identifier</targetAttribute>
  51.                                         <sourceExpression>
  52.                                                 <OCQL>strConCat('http://lab.scinfo.org.nz/soil-data-ie/id/isric/soil/so_soil/',profile_id)</OCQL>
  53.                                         </sourceExpression>
  54.                                         <ClientProperty>
  55.                                                 <name>codeSpace</name>
  56.                                                 <value>'http://www.landcareresearch.co.nz'</value>
  57.                                         </ClientProperty>
  58.                                 </AttributeMapping>
  59.  
  60.                                <AttributeMapping>
  61.                                         <targetAttribute>gml:description</targetAttribute>
  62.                                         <sourceExpression>
  63.                                                 <OCQL>strConCat('WOSIS profile code ',profile_code)</OCQL>
  64.                                         </sourceExpression>
  65.                                 </AttributeMapping>
  66.  
  67.                                  <AttributeMapping>
  68.                                         <encodeIfEmpty>true</encodeIfEmpty>
  69.                                         <targetAttribute>soil:soRelatedSamplingFeature</targetAttribute>
  70.                                                                          
  71.                                 </AttributeMapping>
  72.                                 <AttributeMapping>
  73.                                     <encodeIfEmpty>true</encodeIfEmpty>
  74.                                     <targetAttribute>soil:soClassifier</targetAttribute>
  75.  
  76.                                 </AttributeMapping>
  77.  
  78.                                 <AttributeMapping>
  79.                                     <encodeIfEmpty>true</encodeIfEmpty>
  80.                                     <targetAttribute>soil:soAvailableWaterCapacity</targetAttribute>
  81.                                 </AttributeMapping>
  82.  
  83.                                 <AttributeMapping>
  84.                                     <encodeIfEmpty>true</encodeIfEmpty>
  85.                                     <targetAttribute>soil:soDrainage</targetAttribute>
  86.                                 </AttributeMapping>
  87.  
  88.                                 <AttributeMapping>
  89.                                     <encodeIfEmpty>true</encodeIfEmpty>
  90.                                     <targetAttribute>soil:soDepthToRock</targetAttribute>
  91.                                 </AttributeMapping>
  92.                                 <AttributeMapping>
  93.                                 <targetAttribute>soil:soHorizon</targetAttribute>
  94.                                 <encodeIfEmpty>true</encodeIfEmpty>
  95.                                 <sourceExpression>
  96.                                         <OCQL>profile_id</OCQL>
  97.                                         <linkElement>_sohorizon</linkElement>
  98.                                         <linkField>FEATURE_LINK</linkField>
  99.                                   </sourceExpression>
  100.                                    <isMultiple>true</isMultiple>
  101.  
  102.                                    <ClientProperty>
  103.                                        <name>xlink:href</name>
  104.                                         <value>profile_id_fk</value>
  105.                                      </ClientProperty>
  106.  
  107.                                </AttributeMapping>
  108.  
  109.                         </attributeMappings>
  110.                 </FeatureTypeMapping>
  111.                 <FeatureTypeMapping>
  112.                        <mappingName>_sohorizon</mappingName>
  113.                         <sourceDataStore>datastore</sourceDataStore>
  114.                         <sourceType>profile_layer</sourceType>
  115.                         <targetElement>soil:SO_Soil</targetElement>
  116.  
  117.                         <attributeMappings>
  118.                                 <encodeIfEmpty>true</encodeIfEmpty>
  119.  
  120.                                 <AttributeMapping>
  121.                                         <targetAttribute>FEATURE_LINK</targetAttribute>
  122.                                         <sourceExpression><OCQL>profile_id_fk</OCQL></sourceExpression>
  123.                                 </AttributeMapping>
  124.  
  125.                                 <AttributeMapping>
  126.                                         <targetAttribute>soil:soHorizon</targetAttribute>
  127.                                 </AttributeMapping>
  128.  
  129.                         </attributeMappings>
  130.                 </FeatureTypeMapping>
  131.  
  132.         </typeMappings>
  133. </as:AppSchemaDataAccess>
Advertisement
Add Comment
Please, Sign In to add comment