sure
this is a non-feature element
the attribute is: womlcore:approvedBy/womlcore:Authority/womlcore:authorityId
besides there is another issue in this mapping:
womlcore:approvedFor is multivalued, I use a denormalised source, but the WFS
response show just one element
the same denormalised source works well if I map another multivalued, gml:name
<?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>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
<Namespace>
<prefix>womlcore</prefix>
<uri>http://xml.fmi.fi/namespace/woml/core/2011/11/15</uri>
</Namespace>
</namespaces>
<sourceDataStores>
<DataStore>
<id>datastore</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgis</value>
</Parameter>
<Parameter>
<name>host</name>
<value>localhost</value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>woml</value>
</Parameter>
<Parameter>
<name>user</name>
<value>postgres</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>mypass</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<targetTypes>
<FeatureType>
<schemaUri>http://xml.fmi.fi/schema/woml/core/2011/11/15/woml-core.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>datastore</sourceDataStore>
<sourceType>approval</sourceType>
<targetElement>womlcore:Approval</targetElement>
<!-- <groupBy>
<GroupByAttribute>womlcore:approvedFor</GroupByAttribute>
</groupBy> -->
<attributeMappings>
<AttributeMapping>
<targetAttribute>
womlcore:Approval
</targetAttribute>
<idExpression>
<OCQL>approval_gml_id</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>
FEATURE_LINK[3]
</targetAttribute>
<sourceExpression>
<OCQL>id_object_approved</OCQL>
</sourceExpression>
</AttributeMapping>
<!--
<AttributeMapping>
<targetAttribute>
womlcore:Approval
</targetAttribute>
<ClientProperty>
<name>gml:id</name>
<value>approval_gml_id</value>
</ClientProperty>
</AttributeMapping>
-->
<AttributeMapping>
<targetAttribute>
womlcore:approvedBy
</targetAttribute>
<ClientProperty>
<name>gml:id</name>
<value>authority_gml_id</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>
womlcore:approvedBy/womlcore:Authority/womlcore:authorityId
</targetAttribute>
<sourceExpression>
<OCQL>authority_id</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>
womlcore:approvedBy/womlcore:Authority/womlcore:localizedName
</targetAttribute>
<sourceExpression>
<OCQL>localized_name</OCQL>
</sourceExpression>
<ClientProperty>
<name>xml:lang</name>
<value>'EN-en'</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>
womlcore:approvalTime
</targetAttribute>
<sourceExpression>
<OCQL>approval_time</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>
womlcore:approvedFor
</targetAttribute>
<sourceExpression>
<OCQL>usage_text</OCQL>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
<!--
<AttributeMapping>
<targetAttribute>
gml:name
</targetAttribute>
<sourceExpression>
<OCQL>usage_text</OCQL>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
-->
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
> Date: Wed, 7 Mar 2012 12:27:11 +0800
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: [Geoserver-users] app schema mapping, problem with anyURI element
>
> Can I please see the schema and your mapping file? All the examples I
> could find are with anyURI used as an attribute, not as an element.
>
> Kind regards,
> Ben.
>
> On 06/03/12 22:07, alessandro marrone wrote:
> >
> > Hello I'm trying to map an anyUri element,is it possible?
> > the WFS response does not show the element
> >
>
> --
> Ben Caradoc-Davies <[email protected]>
> Software Engineer
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users