Hiya,
I've encountered a strangeness in my GeoServer App Schema Config - it's
refusing to included nested FeatureTypes although I'm sure this used to
work.
Specific example pertains to INSPIRE EnvironmentalMonitoringFacilities,
issue pertains to both the ef:operationalActivityPeriod and
ef:observingCapability. I've tried various alternatives, with and
without mapping name, but the result is always just an xlink to the ID
(interesting is that under the OGC API - Features extension, these bits
are properly nested!). DataTypes such as the base2:RelatedParty come
through without a hitch.
Am I doing something wrong in the mapping? (entire file attached,
relevant bits inline below) Is there another file (one of the wfs.xml)
that needs some tender loving care?
:?
Kathi
Current output
<ef:operationalActivityPeriod xlink:href="#A021005050"/>
Attribute Mapping for ef:operationalActivityPeriod from main FT
ef:EnvironmentalMonitoringFacility
<AttributeMapping>
<targetAttribute>ef:operationalActivityPeriod</targetAttribute>
<sourceExpression>
<OCQL>id</OCQL>
<linkElement>_opact</linkElement>
<linkField>FEATURE_LINK</linkField>
</sourceExpression>
</AttributeMapping>
Header of the chained bit for
<FeatureTypeMapping>
<sourceDataStore>idDataStoreInsp</sourceDataStore>
<sourceType>ef_opact_v</sourceType>
<targetElement>ef:OperationalActivityPeriod</targetElement>
<mappingName>_opact</mappingName>
<attributeMappings>
<AttributeMapping>
<targetAttribute>FEATURE_LINK</targetAttribute>
<sourceExpression>
<OCQL>efid</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:OperationalActivityPeriod</targetAttribute>
<idExpression>
<OCQL>gmlid</OCQL>
</idExpression>
</AttributeMapping>
--
_________________________________________________________________________
Katharina Schleidt
Tel: +43 (1) 89 234 26
Mobile: +43 (650) 89 234 26
Skype: Kathi Schleidt
[email protected]
www.schleidt.org/kathi
In the twenty-first century censorship works by flooding people with irrelevant
information.
-- Homo Deus, Yuval Noah Harari
The people can always be brought to the bidding of the leaders.
That is easy. All you have to do is tell them they are being attacked
and denounce the pacifists for lack of patriotism and exposing the country to
danger.
It works the same way in any country.
--Hermann Göring, Nazi military leader (12 Jan 1893-1946)
<?xml version="1.0" encoding="UTF-8"?>
<!--
GeoServer configuration brought to you courtesy of DataCove.EU
www.datacove.eu
-->
<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>sf-w</prefix>
<uri>http://schema.datacove.eu/WaterSample</uri>
</Namespace>
<Namespace>
<prefix>ef</prefix>
<uri>http://inspire.ec.europa.eu/schemas/ef/4.0</uri>
</Namespace>
<Namespace>
<prefix>au</prefix>
<uri>http://inspire.ec.europa.eu/schemas/au/4.0</uri>
</Namespace>
<Namespace>
<prefix>gn</prefix>
<uri>http://inspire.ec.europa.eu/schemas/gn/4.0</uri>
</Namespace>
<Namespace>
<prefix>ad</prefix>
<uri>http://inspire.ec.europa.eu/schemas/ad/4.0</uri>
</Namespace>
<Namespace>
<prefix>gco</prefix>
<uri>http://www.isotc211.org/2005/gco</uri>
</Namespace>
<Namespace>
<prefix>ugs</prefix>
<uri>http://inspire.ec.europa.eu/schemas/us-govserv/4.0</uri>
</Namespace>
<Namespace>
<prefix>xlink</prefix>
<uri>http://www.w3.org/1999/xlink</uri>
</Namespace>
<Namespace>
<prefix>base</prefix>
<uri>http://inspire.ec.europa.eu/schemas/base/3.3</uri>
</Namespace>
<Namespace>
<prefix>base2</prefix>
<uri>http://inspire.ec.europa.eu/schemas/base2/2.0</uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd</uri>
</Namespace>
<Namespace>
<prefix>xsi</prefix>
<uri>http://www.w3.org/2001/XMLSchema-instance</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
</namespaces>
<includedTypes>
<!-- <Include>../../au/AU/MappingAU.xml</Include>
-->
</includedTypes>
<sourceDataStores>
<DataStore>
<id>idDataStoreInsp</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>jndiReferenceName</name>
<value>jdbc/tnw</value>
</Parameter>
<Parameter>
<name>Expose primary keys</name>
<value>true</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<!-- <catalog>...</catalog>-->
<targetTypes>
<FeatureType>
<schemaUri>https://schema.datacove.eu/EnvironmentalMonitoringFacilitiesFXX.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<mappingName>_obs_caps</mappingName>
<sourceDataStore>idDataStoreInsp</sourceDataStore>
<sourceType>ef_obscaps_v</sourceType>
<targetElement>ef:ObservingCapability</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>FEATURE_LINK</targetAttribute>
<sourceExpression>
<OCQL>efid</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:ObservingCapability</targetAttribute>
<idExpression>
<OCQL>gmlid</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:observingTime/gml:TimePeriod</targetAttribute>
<ClientProperty>
<name>gml:id</name>
<value>tpid</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:observingTime/gml:TimePeriod/gml:beginPosition</targetAttribute>
<sourceExpression>
<OCQL>begintime</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:observingTime/gml:TimePeriod/gml:endPosition</targetAttribute>
<sourceExpression>
<OCQL>endtime</OCQL>
</sourceExpression>
<encodeIfEmpty>true</encodeIfEmpty>
<ClientProperty>
<name>indeterminatePosition</name>
<value>endtime_status</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:processType</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>processtype</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:resultNature</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>resultnature</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:procedure</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>procedure</value>
</ClientProperty>
<ClientProperty>
<name>xlink:title</name>
<value>procedurelabel</value>
</ClientProperty>
</AttributeMapping>
<!--
<AttributeMapping>
<targetAttribute>ef:featureOfInterest</targetAttribute>
<sourceExpression>
<OCQL>id</OCQL>
<linkElement>sf-w:WaterSample</linkElement>
<linkField>FEATURE_LINK</linkField>
</sourceExpression>
</AttributeMapping>
-->
<AttributeMapping>
<targetAttribute>ef:featureOfInterest</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>foi</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:ultimateFeatureOfInterest</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>ufoi</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:observedProperty</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>observedproperty</value>
</ClientProperty>
<ClientProperty>
<name>xlink:title</name>
<value>observedpropertylabel</value>
</ClientProperty>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
<FeatureTypeMapping>
<!-- <mappingName>opact</mappingName>
<mappingName>_opact</mappingName> -->
<sourceDataStore>idDataStoreInsp</sourceDataStore>
<sourceType>ef_opact_v</sourceType>
<targetElement>ef:OperationalActivityPeriod</targetElement>
<mappingName>_opact</mappingName>
<attributeMappings>
<AttributeMapping>
<targetAttribute>FEATURE_LINK</targetAttribute>
<sourceExpression>
<OCQL>efid</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:OperationalActivityPeriod</targetAttribute>
<idExpression>
<OCQL>gmlid</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:activityTime/gml:TimePeriod</targetAttribute>
<ClientProperty>
<name>gml:id</name>
<value>tpid</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:activityTime/gml:TimePeriod/gml:beginPosition</targetAttribute>
<sourceExpression>
<OCQL>begintime</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:activityTime/gml:TimePeriod/gml:endPosition</targetAttribute>
<sourceExpression>
<OCQL>endtime</OCQL>
</sourceExpression>
<encodeIfEmpty>true</encodeIfEmpty>
<ClientProperty>
<name>indeterminatePosition</name>
<value>endtime_status</value>
</ClientProperty>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
<FeatureTypeMapping>
<sourceDataStore>idDataStoreInsp</sourceDataStore>
<sourceType>ef_emf_v</sourceType>
<targetElement>ef:EnvironmentalMonitoringFacility</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>ef:EnvironmentalMonitoringFacility</targetAttribute>
<idExpression>
<OCQL>localid</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:inspireId/base:Identifier/base:localId</targetAttribute>
<sourceExpression>
<OCQL>localid</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:inspireId/base:Identifier/base:namespace</targetAttribute>
<sourceExpression>
<OCQL>namespace</OCQL>
</sourceExpression>
</AttributeMapping>
<!-- <AttributeMapping>
<targetAttribute>ef:inspireId/base:Identifier/base:versionId</targetAttribute>
<sourceExpression>
<OCQL>'Version'</OCQL>
</sourceExpression>
</AttributeMapping>
-->
<AttributeMapping>
<targetAttribute>ef:name</targetAttribute>
<sourceExpression>
<OCQL>name</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:mediaMonitored</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>mediamonitored</value>
</ClientProperty>
</AttributeMapping>
<!-- -->
<AttributeMapping>
<targetAttribute>ef:responsibleParty</targetAttribute>
<sourceExpression>
<OCQL>id</OCQL>
<linkElement>base2:RelatedParty</linkElement>
<linkField>FEATURE_LINK</linkField>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:geometry</targetAttribute>
<idExpression>
<OCQL>geometryid</OCQL>
</idExpression>
<sourceExpression>
<OCQL>geometry</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:observingCapability</targetAttribute>
<sourceExpression>
<OCQL>id</OCQL>
<linkElement>_obs_caps</linkElement>
<linkField>FEATURE_LINK</linkField>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:broader</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>broader</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:involvedIn</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>involvedin</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:measurementRegime</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>measurementregime</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:mobile</targetAttribute>
<sourceExpression>
<OCQL>mobile</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:operationalActivityPeriod</targetAttribute>
<sourceExpression>
<OCQL>id</OCQL>
<linkElement>_opact</linkElement>
<linkField>FEATURE_LINK</linkField>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:belongsTo</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>belongsto</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:sameAs</targetAttribute>
<ClientProperty>
<name>xlink:href</name>
<value>sameas</value>
</ClientProperty>
</AttributeMapping>
<!-- <AttributeMapping>
<targetAttribute>ef:relatedFeature</targetAttribute>
<sourceExpression>
<OCQL>id</OCQL>
<linkElement>_rel_feature</linkElement>
<linkField>FEATURE_LINK</linkField>
</sourceExpression>
</AttributeMapping>
-->
<AttributeMapping>
<targetAttribute>ef:relatedFeature</targetAttribute>
<encodeIfEmpty>true</encodeIfEmpty>
<sourceExpression>
<!--PK in main table-->
<OCQL>id</OCQL>
<linkElement>_rel_feature</linkElement>
<linkField>FEATURE_LINK</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
<ClientProperty>
<name>xlink:href</name>
<!-- PK in linked table-->
<value>related</value>
</ClientProperty>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
<FeatureTypeMapping>
<mappingName>_rel_feature</mappingName>
<sourceDataStore>idDataStoreInsp</sourceDataStore>
<sourceType>ef_related_v</sourceType>
<targetElement>ef:DummyMonitoringObject</targetElement>
<attributeMappings>
<encodeIfEmpty>true</encodeIfEmpty>
<AttributeMapping>
<targetAttribute>FEATURE_LINK</targetAttribute>
<!-- --><!-- FK in linked table --> <!---->
<sourceExpression>
<OCQL>id</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>ef:relatedFeature</targetAttribute>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
_______________________________________________
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
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users