Advertisement
JorgeDeJesus

Untitled

Oct 28th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.83 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.                        <!--removed -->
  19.                         <Parameter><name>Expose primary keys</name><value>true</value></Parameter>
  20.                         </parameters>
  21.                 </DataStore>
  22.         </sourceDataStores>
  23.         <targetTypes>
  24.                 <FeatureType>
  25.                   <schemaUri>http://schemas.opengis.net/samplingSpatial/2.0/spatialSamplingFeature.xsd</schemaUri>
  26.                   <schemaUri>http://schemas.opengis.net/om/2.0/observation.xsd</schemaUri>
  27.                   <schemaUri>http://schemas.opengis.net/sampling/2.0/samplingFeature.xsd</schemaUri>
  28.                   <schemaUri>http://lab.scinfo.org.nz/static/schema/soil-data-ie/0.1/soil-data-ie.xsd</schemaUri>
  29.                   <schemaUri>http://schemas.opengis.net/gml/3.2.1/gml.xsd</schemaUri>
  30.                 </FeatureType>
  31.         </targetTypes>
  32.         <typeMappings>
  33.                 <FeatureTypeMapping>
  34.                         <sourceDataStore>datastore</sourceDataStore>
  35.                         <sourceType>soil5</sourceType>
  36.                         <targetElement>soil:SO_Soil</targetElement>
  37.                         <isDenormalised>true</isDenormalised>
  38.                         <attributeMappings>
  39.  
  40.                                 <AttributeMapping>
  41.                                         <targetAttribute>soil:SO_Soil</targetAttribute>
  42.                                         <idExpression>
  43.                                            <!--this works-->
  44.                                            <!--<OCQL>strConCat('so_' , profile_code)</OCQL>-->
  45.                                         <OCQL>strConCat('soil.so_soil.' , profile_id)</OCQL>
  46.                                         </idExpression>
  47.                                 </AttributeMapping>
  48.                                 <AttributeMapping>
  49.                                         <targetAttribute>gml:identifier</targetAttribute>
  50.                                         <sourceExpression>
  51.                                                 <OCQL>strConCat('http://lab.scinfo.org.nz/soil-data-ie/id/isric/soil/so_soil/',profile_id)</OCQL>
  52.                                         </sourceExpression>
  53.                                         <ClientProperty>
  54.                                                 <name>codeSpace</name>
  55.                                                 <value>'http://www.landcareresearch.co.nz'</value>
  56.                                         </ClientProperty>
  57.                                 </AttributeMapping>
  58.                 <AttributeMapping>
  59.                                         <targetAttribute>gml:description</targetAttribute>
  60.                                         <sourceExpression>
  61.                                                 <OCQL>strConCat('WOSIS profile code ',profile_code)</OCQL>
  62.                                         </sourceExpression>
  63.                                 </AttributeMapping>
  64.                <AttributeMapping>
  65.                                     <encodeIfEmpty>true</encodeIfEmpty>
  66.                                     <targetAttribute>soil:soAvailableWaterCapacity</targetAttribute>
  67.                                 </AttributeMapping>
  68.  
  69.                                 <AttributeMapping>
  70.                                     <encodeIfEmpty>true</encodeIfEmpty>
  71.                                     <targetAttribute>soil:soDrainage</targetAttribute>
  72.                                 </AttributeMapping>
  73.  
  74.                                 <AttributeMapping>
  75.                                     <encodeIfEmpty>true</encodeIfEmpty>
  76.                                     <targetAttribute>soil:soDepthToRock</targetAttribute>
  77.                                 </AttributeMapping>
  78.  
  79.                                 <AttributeMapping>
  80.                                          <isDenormalised>true</isDenormalised>
  81.                                         <encodeIfEmpty>true</encodeIfEmpty>
  82.                                         <isMultiple>true</isMultiple>
  83.  
  84.                                     <targetAttribute>soil:soHorizon</targetAttribute>
  85.                                     <ClientProperty>
  86.                                                 <name>xlink:ref</name>
  87.                                                 <value>profile_layer_id</value>
  88.                                         </ClientProperty>
  89.  
  90.                                 </AttributeMapping>
  91.  
  92.                         </attributeMappings>
  93.                 </FeatureTypeMapping>
  94.  
  95.                 <!-- ======================================== -->
  96.                 <!-- link to gml_name datastore for multiple gml:name -->
  97.  
  98.         </typeMappings>
  99. </as:AppSchemaDataAccess>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement