<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.1.0/expr.xsd">

<namespaces>
	<Namespace> <prefix>sidelab</prefix> <uri>http://sidelab</uri> </Namespace>
	<Namespace> <prefix>gml</prefix> <uri>http://www.opengis.net/gml</uri> </Namespace>
</namespaces>
<sourceDataStores>
<DataStore>
    <id>PostGIS</id>
    <parameters>
        <Parameter>
            <name>dbtype</name>
            <value>postgisng</value>
        </Parameter>
        <Parameter>
            <name>host</name>
            <value>10.0.1.5</value>
        </Parameter>
        <Parameter>
            <name>port</name>
            <value>5432</value>
        </Parameter>
        <Parameter>
            <name>database</name>
            <value>sidelab</value>
        </Parameter>
        <Parameter>
            <name>user</name>
            <value>postgres</value>
        </Parameter>
    </parameters>
</DataStore>
</sourceDataStores>
<targetTypes>
    <FeatureType>
        <schemaUri>complex.xsd</schemaUri>
    </FeatureType>
</targetTypes>
<typeMappings>
    <FeatureTypeMapping>
        <sourceDataStore>PostGIS</sourceDataStore>
        <sourceType>locality</sourceType>
	<targetElement>sidelab:Locality</targetElement>
        <groupBy/>
 <attributeMappings>
  <AttributeMapping>
          <targetAttribute>Locality</targetAttribute>
          <idExpression>
            <OCQL>getId()</OCQL>
          </idExpression>
        </AttributeMapping>
  <AttributeMapping>
          <targetAttribute>the_geom</targetAttribute>
          <sourceExpression>
            <OCQL>the_geom</OCQL>
          </sourceExpression>
        </AttributeMapping>
 </attributeMappings>
    </FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
