Hi!

I have a problem with the GeoServer app-schema plugin. The problem 
relates to a multivalued property (alternativeGeographicIdentifiers) 
inside my main feature type (SI_LocationInstance). The values for this 
complex property (a data type) are read from a second database table 
(PostGIS).

I try to produce the output according to the recently published OGC 
Gazetteer schema, included in the WFS Gazetteer Service AP Best Practice:

https://portal.opengeospatial.org/files/?artifact_id=46964

My problem is that when this property has a single value in the database 
(one reference from the second table to the first one), the output is 
correct, but when there are multiple references, the output property 
element (alternativeGeographicIdentifiers) remains empty. As you see in 
the mapping below, I have set the element <isMultiple>true</isMultiple> 
in the containing feature type (SI_LocationInstance).

This is my mapping:

     <typeMappings>
         <FeatureTypeMapping>
             <sourceDataStore>postgisstore</sourceDataStore>
             <sourceType>si_location_instance_mv</sourceType>
             <targetElement>iso19112:SI_LocationInstance</targetElement>
             <attributeMappings>
                 <AttributeMapping>
                     <targetAttribute>
                         iso19112:SI_LocationInstance
                     </targetAttribute>
                     <idExpression>
                         <OCQL>getId()</OCQL>
                     </idExpression>
                 </AttributeMapping>
                 <AttributeMapping>
                     <targetAttribute>
                         iso19112:geographicIdentifier
                     </targetAttribute>
                     <sourceExpression>
                         <OCQL>geographic_identifier</OCQL>
                     </sourceExpression>
                 </AttributeMapping>
                 <AttributeMapping>
                     <targetAttribute>
                         iso19112:alternativeGeographicIdentifiers
                     </targetAttribute>
                     <sourceExpression>
                         <OCQL>location_instance_id</OCQL>
 
<linkElement>iso19112:alternativeGeographicIdentifier</linkElement>
                         <linkField>FEATURE_LINK</linkField>
                         <isMultiple>true</isMultiple>
                     </sourceExpression>
                 </AttributeMapping>

...

         <FeatureTypeMapping>
             <sourceDataStore>postgisstore</sourceDataStore>
             <sourceType>alternative_geographic_identifier_mv</sourceType>
 
<targetElement>iso19112:alternativeGeographicIdentifier</targetElement>
             <attributeMappings>
                 <AttributeMapping>
                     <targetAttribute>FEATURE_LINK</targetAttribute>
                     <sourceExpression>
                         <OCQL>loc_ins_id</OCQL>
                     </sourceExpression>
                 </AttributeMapping>
                 <AttributeMapping>
                     <targetAttribute>
                         iso19112:name
                     </targetAttribute>
                     <sourceExpression>
                         <OCQL>name</OCQL>
                     </sourceExpression>
                     <ClientProperty>
                         <name>xml:lang</name>
                         <value>language</value>
                     </ClientProperty>
                 </AttributeMapping>

...


Both <FeatureTypeMapping> -elements are inside a single mapping file.

In the database the second table 'alternative_geographic_identifier_mv' 
contains the column 'loc_ins_id', which refers to the column 
'location_instance_id' in the first table 'si_location_instance_mv'.

My GeoServer installation is the latest stable.

Thanks a lot for any help!

Lassi

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to