Hi again,

I've been trying to nail down exactly when the "Duplicate mappingName or
targetElement..." error occurs. I have two very specific cases, neither of
which make sense to me (I don't see any reason to think that they should be
invalid). I have attached three files here that I will reference; they are
part of a larger app schema mapping structure. SLMSiteLog_Mapping.xml is
the primary mapping file and includes many others under the <includedTypes>
block including SLMSurveyedLocalTies_Mapping.xml and
SLMRadioInterferences_Mapping.xml. The attached versions of these files are
functional and don't raise errors but the following modifications both
cause the above error. Case 1 and Case 2 occur independently.

*Case 1:*
Uncomment the following block in SLMSurveyedLocalTies_Mapping.xml. These
AttributeMappings are all valid XPaths in the GeodesyML schema according to
their documentation here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> and
regardless, the error doesn't indicated any problem with the XPaths being
valid. Moreover this block does not even contain a targetElement tag nor a
mappingName tag at all. Any one of these three AttributeMapping blocks will
independently cause the error if they are not commented out.

<AttributeMapping>
<targetElement>geo:localSiteTiesAccuracy</targetElement>
<sourceExpression>
<OCQL>accuracym</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetElement>geo:surveyMethod</targetElement>
<sourceExpression>
<OCQL>surveymethod</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetElement>geo:dateMeasured/gml:timePosition</targetElement>
<sourceExpression>
<OCQL>datemeasured</OCQL>
</sourceExpression>
</AttributeMapping>

*Case 2:*
Include the SLMRadioInterferences_Mapping.xml file in the feature chain.
Doing this also produces the error, regardless of which AttributeMapping
elements are used in the SLMRadioInterferences_Mapping.xml. This means
uncommenting the following two pieces in SLMSiteLog_Mapping.xml:

<Include>SLMRadioInterferences_Mapping.xml</Include>

AND

<AttributeMapping>
<targetAttribute>geo:radioInterference</targetAttribute>
<sourceExpression>
<OCQL>fourid</OCQL>
<linkElement>geo:RadioInterference</linkElement>
<linkField>FEATURE_LINK[10]</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>


Can you explain this behavior?


On Mon, Aug 14, 2017 at 4:37 PM, Gavin Medley <med...@unavco.org> wrote:

> Hi Ben,
>
> Thanks! Geoserver starts without a hitch now. Unfortunately it seems this
> was not the root cause of my problem. I am getting two errors, seemingly
> without cause:
>
> Error creating app-schema data store for 'geo:RadioInterference', caused
> by: No top level element found in schemas: {urn:xml-gov-au:icsm:egeodesy:
> 0.4}RadioInterference
>
> Duplicate mappingName or targetElement across FeatureTypeMapping instances
> detected.
> I have been getting these errors since I first starting working with App
> Schema and early on I presumed I had an error that I didn't understand and
> fixed upon rewriting my mapping files. Now I'm not as sure. I say that they
> happen "without cause" because without changing my mapping files in any
> way, these errors usually go away after some combination of reloading the
> feature types, restarting Geoserver, and recreating the app schema data
> store (I emphasize that I recreate the data store with the *same* mapping
> files!). I believe that if the error were simply suppressed, everything
> would work because I know my mapping files are fine. They have worked
> before!
>
> I found a possibly relevant bug here:
> https://osgeo-org.atlassian.net/browse/GEOT-4196
>
> I'm happy to provide my mapping files but they are quite complex and
> require the ability to connect to my local development database.
>
> Let me know what you think.
>
> On Mon, Aug 14, 2017 at 3:10 PM, Ben Caradoc-Davies <b...@transient.nz>
> wrote:
>
>> Gavin,
>>
>> you should not have to download anything, just move the postgresql jar
>> included with GeoServer (in your case for 2.11.2 it is
>> WEB-INF/lib/postgresql-9.4.1211.jar) to your Tomcat lib directory.
>> GeoServer does not use the postgis jar from postgis.org. Leave
>> everything else. The goal is to ensure that there is only one postgresql
>> jar on your classpath. Tomcat does not need anything else because it only
>> manages the connection and does not need to understand the content.
>> Everything else stays in the GeoServer WEB-INF/lib.
>> http://docs.geoserver.org/stable/en/user/tutorials/tomcat-jn
>> di/tomcat-jndi.html#configuring-a-postgresql-connection-pool
>>
>> The latest version of the postgresql driver should also work; if you want
>> to use it in your Tomcat lib, just remove WEB-INF/lib/postgresql-9.4.121
>> 1.jar.
>>
>> Kind regards,
>> Ben.
>>
>>
>>
>> On 15/08/17 04:45, Gavin Medley wrote:
>>
>>> Hi Ben,
>>>
>>> I'm finally getting to this but I think there must be missing information
>>> in the Geoserver documentation on this topic, especially in the context
>>> of
>>> App Schemas. I'm following the Postgres example here:
>>> http://docs.geoserver.org/stable/en/user/tutorials/tomcat-jn
>>> di/tomcat-jndi.html
>>> but
>>> have no luck. Geoserver won't start afterwards. I can revert to my
>>> previous
>>> configuration and everything is fine.
>>>
>>> Specifically, I'm not sure which .jar files to move to where. I am using
>>> a
>>> PostGIS backend so I downloaded both the postgres and the postgis JDBC
>>> drivers:
>>>
>>> postgis-jdbc-2.1.7.2.jar
>>> postgresql-42.1.4.jar
>>>
>>> I understand that these (or possibly just one?) should go into
>>> /Library/Tomcat/lib and that I should remove the duplicates (?) from
>>> /Library/Tomcat/webapps/geoserver/WEB-INF/lib but I don't see any
>>> duplicates in that directory. I have the following from ls *jdbc* :
>>>
>>> gs-sec-jdbc-2.11.2.jar
>>> gt-jdbc-mysql-17.2.jar
>>> spring-jdbc-4.2.5.RELEASE.jar
>>> gs-web-sec-jdbc-2.11.2.jar
>>> gt-jdbc-postgis-17.2.jar
>>> gt-jdbc-17.2.jar
>>> gwc-diskquota-jdbc-1.11.1.jar
>>>
>>> After these are in the right place with the correct duplicates are
>>> removed,
>>> I think my context.xml file should look like the following. Have I missed
>>> replacing any placeholder values in any of these fields?
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <Context>
>>>      <Resource name="jdbc/postgres"
>>>        auth="Container"
>>>        type="javax.sql.DataSource"
>>>        driverClassName="org.postgresql.Driver"
>>>        url="jdbc:postgresql://localhost:5432/slm"
>>>        username="ecelt-07" password=""
>>>        maxActive="100"
>>>        initialSize="0"
>>>        minIdle="0"
>>>        maxIdle="8"
>>>        maxWait="10000"
>>>        timeBetweenEvictionRunsMillis="30000"
>>>        minEvictableIdleTimeMillis="60000"
>>>        testWhileIdle="true"
>>>        validationQuery="SELECT 1"
>>>        maxAge="600000"
>>>        rollbackOnReturn="true"
>>>      />
>>>      <!-- Default set of monitored resources. If one of these changes,
>>> the
>>>   -->
>>>      <!-- web application will be reloaded.
>>>    -->
>>>      <WatchedResource>WEB-INF/web.xml</WatchedResource>
>>>      <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
>>> </Context>
>>>
>>>
>>>
>>> Thanks for all your help!
>>>
>>>
>>> On Fri, Aug 11, 2017 at 3:40 PM, Ben Caradoc-Davies <b...@transient.nz>
>>> wrote:
>>>
>>> Gavin,
>>>>
>>>> every source feature has its own connection pool. Use the same JNDI
>>>> source
>>>> for all source features to have them use a single pool that you can
>>>> make as
>>>> large as you like.
>>>>
>>>> The new functionality is in 2.11.2 and master so you should have it.
>>>>
>>>> Kind regards,
>>>> Ben.
>>>>
>>>>
>>>> On 12/08/17 06:37, Gavin Medley wrote:
>>>>
>>>> Hi Ben,
>>>>>
>>>>> How does App Schema use the connections pool? Does it create a new
>>>>> connection for each mapping file?
>>>>>
>>>>> I am running 2.11.2. Is the new development in the nightly build?
>>>>>
>>>>> On Thu, Aug 10, 2017 at 5:29 PM, Ben Caradoc-Davies <b...@transient.nz>
>>>>> wrote:
>>>>>
>>>>> Gavin,
>>>>>
>>>>>>
>>>>>> there is no limit in app-schema, but you might be hitting a limit in
>>>>>> the
>>>>>> size of the JDBC connection pool. You can increase this by using JNDI
>>>>>> and
>>>>>> configuring a larger number of connections.
>>>>>>
>>>>>> Very recent changes should improve app-schema connection usage:
>>>>>>
>>>>>> [GEOT-5748] Improve App-Schema connection usage
>>>>>> https://osgeo-org.atlassian.net/browse/GEOT-5748
>>>>>>
>>>>>> What GeoServer version are you using?
>>>>>>
>>>>>> Kind regards,
>>>>>> Ben.
>>>>>>
>>>>>> On 11/08/17 10:58, Gavin Medley wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>>
>>>>>>> Is there a limit to the number of feature chained elements possible
>>>>>>> in a
>>>>>>> single feature? I have 10 mapping files, performing feature chaining
>>>>>>> and
>>>>>>> each file maps between 4 and 10 elements. I've noticed that I don't
>>>>>>> seem
>>>>>>> to
>>>>>>> be able to go further. If I comment out a single <AttributeMapping>
>>>>>>> it
>>>>>>> works but if I add one I get
>>>>>>>
>>>>>>> Duplicate mappingName or targetElement across FeatureTypeMapping
>>>>>>> instances
>>>>>>> detected.
>>>>>>>
>>>>>>> It doesn't seem to matter which <AttributeMappings> I change. It only
>>>>>>> seems
>>>>>>> to matter that there are too many. Is this possible?
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------
>>>>>>> ------------------
>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Geoserver-users mailing list
>>>>>>>
>>>>>>> Please make sure you read the following two resources before posting
>>>>>>> to
>>>>>>> this list:
>>>>>>> - Earning your support instead of buying it, but Ian Turton:
>>>>>>> http://www.ianturton.com/talks/foss4g.html#/
>>>>>>> - The GeoServer user list posting guidelines:
>>>>>>> http://geoserver.org/comm/userlist-guidelines.html
>>>>>>>
>>>>>>> Geoserver-users@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>> Ben Caradoc-Davies <b...@transient.nz>
>>>>>> Director
>>>>>> Transient Software Limited <http://transient.nz/>
>>>>>> New Zealand
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>> Ben Caradoc-Davies <b...@transient.nz>
>>>> Director
>>>> Transient Software Limited <http://transient.nz/>
>>>> New Zealand
>>>>
>>>>
>>>
>>>
>>>
>> --
>> Ben Caradoc-Davies <b...@transient.nz>
>> Director
>> Transient Software Limited <http://transient.nz/>
>> New Zealand
>>
>
>
>
> --
> Gavin Medley
> Software Engineer I
> *UNAVCO*
> 6350 Nautilus Drive
> Boulder, CO 80301-5394
> med...@unavco.org
>
>


-- 
Gavin Medley
Software Engineer I
*UNAVCO*
6350 Nautilus Drive
Boulder, CO 80301-5394
med...@unavco.org
<?xml version="1.0" encoding="UTF-8"?>
<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">
	<namespaces>
		<Namespace>
			<prefix>geo</prefix>
			<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
		</Namespace>
		<Namespace>
			<prefix>gml</prefix>
			<uri>http://www.opengis.net/gml/3.2</uri>
		</Namespace>
		<Namespace>
			<prefix>gmd</prefix>
			<uri>http://www.isotc211.org/2005/gmd</uri>
		</Namespace>
	</namespaces>
	<includedTypes></includedTypes>
	<sourceDataStores>
		<DataStore>
			<id>slmdb</id>
			<parameters>
				<Parameter>
		            <name>dbtype</name>
		            <value>postgisng</value>
		        </Parameter>
		        <Parameter>
		            <name>host</name>
		            <value>localhost</value>
		        </Parameter>
		        <Parameter>
		            <name>port</name>
		            <value>5432</value>
		        </Parameter>
		        <Parameter>
		            <name>database</name>
		            <value>slm</value>
		        </Parameter>
		        <Parameter>
		            <name>user</name>
		            <value>ecelt-07</value>
		        </Parameter>
		        <Parameter>
		            <name>passwd</name>
		            <value></value>
		        </Parameter>
		        <Parameter>
		        	<name>Expose primary keys</name>
		        	<value>true</value>
		        </Parameter>
		    </parameters>
		</DataStore>
	</sourceDataStores>
	<catalog></catalog>
	<targetTypes>
		<FeatureType>
			<schemaUri>https://raw.githubusercontent.com/GeoscienceAustralia/GeodesyML/master/schemas/equipment.xsd</schemaUri>
		</FeatureType>
	</targetTypes>
	<typeMappings>
		<FeatureTypeMapping>
			<!--<mappingName>gnssreceivermapping</mappingName>-->
			<sourceDataStore>slmdb</sourceDataStore>
			<sourceType>sitelog_radiointerferences</sourceType>
			<!-- geoml_monuments is a materialized view in the postGIS database and it is used as the source schema, or the schema we are mapping FROM -->
			<targetElement>geo:RadioInterference</targetElement>
			<!-- is the root element of the target schema, GeodesyML -->
			<attributeMappings>
				<AttributeMapping>
					<targetAttribute>geo:RadioInterference</targetAttribute>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:possibleProblemSource</targetAttribute>
					<sourceExpression>
						<OCQL>interferences</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<!-- <AttributeMapping>
					<targetAttribute>gml:validTime/gml:TimePeriod/gml:beginPosition</targetAttribute>
					<sourceExpression>
						<OCQL>effstartdateradio</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>gml:validTime/gml:TimePeriod/gml:endPosition</targetAttribute>
					<sourceExpression>
						<OCQL>effenddateradio</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping> -->
				<!-- <AttributeMapping>
					<targetAttribute>geo:notes</targetAttribute>
					<sourceExpression>
						<OCQL>addinforadio</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping> -->

				<!-- FEATURE_LINK back to id in the SiteLogwGNSS_Mapping.xml file -->
				<AttributeMapping>
					<targetAttribute>FEATURE_LINK[10]</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
					</sourceExpression>
				</AttributeMapping>
				
			</attributeMappings>
		</FeatureTypeMapping>
	</typeMappings>
</as:AppSchemaDataAccess>
<?xml version="1.0" encoding="UTF-8"?>
<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">
	<namespaces>
		<Namespace>
			<prefix>geo</prefix>
			<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
		</Namespace>
		<Namespace>
			<prefix>gml</prefix>
			<uri>http://www.opengis.net/gml/3.2</uri>
		</Namespace>
		<Namespace>
			<prefix>gmd</prefix>
			<uri>http://www.isotc211.org/2005/gmd</uri>
		</Namespace>
	</namespaces>
	<includedTypes>
		<Include>SLMgnssReceiver_Mapping.xml</Include>
		<Include>SLMgnssAntenna_Mapping.xml</Include>
		<Include>SLMHumiditySensor_Mapping.xml</Include>
		<Include>SLMPressureSensor_Mapping.xml</Include>
		<Include>SLMTemperatureSensor_Mapping.xml</Include>
		<Include>SLMWaterVaporSensor_Mapping.xml</Include>
		<Include>SLMFrequencyStandard_Mapping.xml</Include>
		<Include>SLMSurveyedLocalTies_Mapping.xml</Include>
		<Include>SLMCollocation_Mapping.xml</Include>
		<!-- <Include>SLMRadioInterferences_Mapping.xml</Include> -->
	</includedTypes>
	<sourceDataStores>
		<DataStore>
			<id>slmdb</id>
			<parameters>
				<Parameter>
		            <name>dbtype</name>
		            <value>postgisng</value>
		        </Parameter>
		        <Parameter>
		            <name>host</name>
		            <value>localhost</value>
		        </Parameter>
		        <Parameter>
		            <name>port</name>
		            <value>5432</value>
		        </Parameter>
		        <Parameter>
		            <name>database</name>
		            <value>slm</value>
		        </Parameter>
		        <Parameter>
		            <name>user</name>
		            <value>ecelt-07</value>
		        </Parameter>
		        <Parameter>
		            <name>passwd</name>
		            <value></value>
		        </Parameter>
		        <Parameter>
		        	<name>Expose primary keys</name>
		        	<value>true</value>
		        </Parameter>
		    </parameters>
		</DataStore>
	</sourceDataStores>
	<catalog></catalog>
	<targetTypes>
		<FeatureType>
			<schemaUri>https://raw.githubusercontent.com/GeoscienceAustralia/GeodesyML/master/schemas/geodesyML.xsd</schemaUri>
		</FeatureType>
	</targetTypes>
	<typeMappings>
		<FeatureTypeMapping>
			<sourceDataStore>slmdb</sourceDataStore>
			<sourceType>sitelog_information</sourceType>
			<!-- geoml_monuments is a materialized view in the postGIS database and it is used as the source schema, or the schema we are mapping FROM -->
			<targetElement>geo:siteLog</targetElement>
			<!-- is the root element of the target schema, GeodesyML -->
			<attributeMappings>
				<AttributeMapping>
					<targetAttribute>geo:siteLog</targetAttribute>
					<idExpression>
						<OCQL>strConCat('fourCharacterID.', fourid)</OCQL>
					</idExpression>
				</AttributeMapping>
				<!-- geo:siteIdentification -->
				<AttributeMapping>
					<targetAttribute>geo:siteIdentification/geo:siteName</targetAttribute>
					<sourceExpression><OCQL>sitename</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteIdentification/geo:fourCharacterID</targetAttribute>
					<sourceExpression><OCQL>fourid</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteIdentification/geo:iersDOMESNumber</targetAttribute>
					<sourceExpression><OCQL>ierdomes</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteIdentification/geo:cdpNumber</targetAttribute>
					<sourceExpression><OCQL>cdpnum</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteIdentification/geo:monumentInscription</targetAttribute>
					<sourceExpression><OCQL>monumentinscri</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteIdentification/geo:dateInstalled</targetAttribute>
					<sourceExpression><OCQL>dateinstalled</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>		

				<!-- geo:siteLocation -->
				<AttributeMapping>
					<targetAttribute>geo:siteLocation/geo:city</targetAttribute>
					<sourceExpression><OCQL>city</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteLocation/geo:state</targetAttribute>
					<sourceExpression><OCQL>state</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteLocation/geo:countryCodeISO</targetAttribute>
					<sourceExpression><OCQL>country</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteLocation/geo:tectonicPlate</targetAttribute>
					<sourceExpression><OCQL>tectonic</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteLocation/geo:approximatePositionITRF/geo:geodeticPosition/gml:Point</targetAttribute>
					<idExpression>
        				<OCQL>strConcat('lonlat.', getId())</OCQL>
    				</idExpression>
					<sourceExpression>
						<OCQL>lonlat_geom</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteLocation/geo:approximatePositionITRF/geo:cartesianPosition/gml:Point</targetAttribute>
					<idExpression>
        				<OCQL>strConcat('ecef.', getId())</OCQL>
    				</idExpression>
					<sourceExpression>
						<OCQL>ecef_geom</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:siteLocation/geo:notes</targetAttribute>
					<sourceExpression><OCQL>addinfo2</OCQL></sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				

				<!-- FEATURE CHAINING -->
				<AttributeMapping>
					<targetAttribute>geo:gnssReceiver</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:GnssReceiver</linkElement>
						<linkField>FEATURE_LINK[1]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<AttributeMapping>
					<targetAttribute>geo:gnssAntenna</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:GnssAntenna</linkElement>
						<linkField>FEATURE_LINK[2]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<AttributeMapping>
					<targetAttribute>geo:humiditySensor</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:HumiditySensor</linkElement>
						<linkField>FEATURE_LINK[3]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<AttributeMapping>
					<targetAttribute>geo:pressureSensor</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:PressureSensor</linkElement>
						<linkField>FEATURE_LINK[4]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<AttributeMapping>
					<targetAttribute>geo:temperatureSensor</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:TemperatureSensor</linkElement>
						<linkField>FEATURE_LINK[5]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<AttributeMapping>
					<targetAttribute>geo:waterVaporSensor</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:WaterVaporSensor</linkElement>
						<linkField>FEATURE_LINK[6]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<AttributeMapping>
					<targetAttribute>geo:frequencyStandard</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:FrequencyStandard</linkElement>
						<linkField>FEATURE_LINK[7]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<AttributeMapping>
					<targetAttribute>geo:surveyedLocalTie</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:SurveyedLocalTie</linkElement>
						<linkField>FEATURE_LINK[8]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<AttributeMapping>
					<targetAttribute>geo:collocationInformation</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:CollocationInformation</linkElement>
						<linkField>FEATURE_LINK[9]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping>

				<!-- <AttributeMapping>
					<targetAttribute>geo:radioInterference</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
						<linkElement>geo:RadioInterference</linkElement>
						<linkField>FEATURE_LINK[10]</linkField>
					</sourceExpression>
					<isMultiple>true</isMultiple>
				</AttributeMapping> -->

			</attributeMappings>
		</FeatureTypeMapping>		
	</typeMappings>
</as:AppSchemaDataAccess>
<?xml version="1.0" encoding="UTF-8"?>
<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">
	<namespaces>
		<Namespace>
			<prefix>geo</prefix>
			<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
		</Namespace>
		<Namespace>
			<prefix>gml</prefix>
			<uri>http://www.opengis.net/gml/3.2</uri>
		</Namespace>
		<Namespace>
			<prefix>gmd</prefix>
			<uri>http://www.isotc211.org/2005/gmd</uri>
		</Namespace>
	</namespaces>
	<includedTypes></includedTypes>
	<sourceDataStores>
		<DataStore>
			<id>slmdb</id>
			<parameters>
				<Parameter>
		            <name>dbtype</name>
		            <value>postgisng</value>
		        </Parameter>
		        <Parameter>
		            <name>host</name>
		            <value>localhost</value>
		        </Parameter>
		        <Parameter>
		            <name>port</name>
		            <value>5432</value>
		        </Parameter>
		        <Parameter>
		            <name>database</name>
		            <value>slm</value>
		        </Parameter>
		        <Parameter>
		            <name>user</name>
		            <value>ecelt-07</value>
		        </Parameter>
		        <Parameter>
		            <name>passwd</name>
		            <value></value>
		        </Parameter>
		        <Parameter>
		        	<name>Expose primary keys</name>
		        	<value>true</value>
		        </Parameter>
		    </parameters>
		</DataStore>
	</sourceDataStores>
	<catalog></catalog>
	<targetTypes>
		<FeatureType>
			<schemaUri>https://raw.githubusercontent.com/GeoscienceAustralia/GeodesyML/master/schemas/equipment.xsd</schemaUri>
		</FeatureType>
	</targetTypes>
	<typeMappings>
		<FeatureTypeMapping>
			<!--<mappingName>gnssreceivermapping</mappingName>-->
			<sourceDataStore>slmdb</sourceDataStore>
			<sourceType>sitelog_surveyedlocalties</sourceType>
			<!-- geoml_monuments is a materialized view in the postGIS database and it is used as the source schema, or the schema we are mapping FROM -->
			<targetElement>geo:SurveyedLocalTie</targetElement>
			<!-- is the root element of the target schema, GeodesyML -->
			<attributeMappings>
				<AttributeMapping>
					<targetAttribute>geo:SurveyedLocalTie</targetAttribute>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:tiedMarkerName</targetAttribute>
					<sourceExpression>
						<OCQL>tiedname</OCQL>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:tiedMarkerUsage</targetAttribute>
					<sourceExpression>
						<OCQL>tiedusage</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:tiedMarkerCDPNumber</targetAttribute>
					<sourceExpression>
						<OCQL>tiedcdp</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:tiedMarkerDOMESNumber</targetAttribute>
					<sourceExpression>
						<OCQL>tieddomes</OCQL>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:differentialComponentsGNSSMarkerToTiedMonumentITRS/geo:dx</targetAttribute>
					<sourceExpression>
						<OCQL>dx</OCQL>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:differentialComponentsGNSSMarkerToTiedMonumentITRS/geo:dy</targetAttribute>
					<sourceExpression>
						<OCQL>dy</OCQL>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:differentialComponentsGNSSMarkerToTiedMonumentITRS/geo:dz</targetAttribute>
					<sourceExpression>
						<OCQL>dz</OCQL>
					</sourceExpression>
				</AttributeMapping>
				<AttributeMapping>
					<targetAttribute>geo:notes</targetAttribute>
					<sourceExpression>
						<OCQL>addinfosurveyed</OCQL>
					</sourceExpression>
					<encodeIfEmpty>false</encodeIfEmpty>
				</AttributeMapping>

				<!-- <AttributeMapping>
					<targetElement>geo:localSiteTiesAccuracy</targetElement>
					<sourceExpression>
						<OCQL>accuracym</OCQL>
					</sourceExpression>
				</AttributeMapping> -->
				<!-- <AttributeMapping>
					<targetElement>geo:surveyMethod</targetElement>
					<sourceExpression>
						<OCQL>surveymethod</OCQL>
					</sourceExpression>
				</AttributeMapping> -->
				<!-- <AttributeMapping>
					<targetElement>geo:dateMeasured/gml:timePosition</targetElement>
					<sourceExpression>
						<OCQL>datemeasured</OCQL>
					</sourceExpression>
				</AttributeMapping> -->
							
				
				<!-- FEATURE_LINK back to id in the SiteLogwGNSS_Mapping.xml file -->
				<AttributeMapping>
					<targetAttribute>FEATURE_LINK[8]</targetAttribute>
					<sourceExpression>
						<OCQL>fourid</OCQL>
					</sourceExpression>
				</AttributeMapping>
				
			</attributeMappings>
		</FeatureTypeMapping>
	</typeMappings>
</as:AppSchemaDataAccess>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to