Hi JcA,
now I see the issue: theAirspaceVolume is a single-value property, you
should do the feature chaining on the geometryComponent property, which is
multi-valued.
Try this mapping:
<FeatureTypeMapping>
<sourceDataStore>dataStore</sourceDataStore>
<sourceType>airspace</sourceType>
<targetElement>aixm:Airspace</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:geometryComponent</targetAttribute>
<sourceExpression>
<OCQL>key_aip</OCQL>
<linkElement>aixm:AirspaceGeometryComponent</linkElement>
<linkField>FEATURE_LINK[1]</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
...
</attributeMappings>
</FeatureTypeMapping>
<FeatureTypeMapping>
<sourceDataStore>dataStore</sourceDataStore>
<sourceType>airspace_volume</sourceType>
<targetElement>aixm:AirspaceGeometryComponent</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>FEATURE_LINK[1]</targetAttribute>
<sourceExpression>
<OCQL>key_aip_parent</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aixm:theAirspaceVolume/aixm:AirspaceVolume</targetAttribute>
<ClientProperty>
<name>gml:id</name>
<value>strConcat('AV.', id)</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aixm:theAirspaceVolume/aixm:AirspaceVolume/aixm:upperLimit
</targetAttribute>
<sourceExpression>
<OCQL>upper_value</OCQL>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
...
</attributeMappings>
</FeatureTypeMapping>
App-schema should correctly encode multiple aixm:geometryComponent
elements, each with a nested aixm:AirspaceVolume element.
Please, let us know how it goes.
On Thu, Oct 22, 2015 at 2:05 PM, <[email protected]> wrote:
> Thanks,
>
> When I sended the example, I simplified this.
> The target attribute was :
>
> <targetAttribute>timeSlice/AirspaceTimeSlice/geometryComponent/AirspaceGeometryComponent/theAirspaceVolume</targetAttribute>
> I updated the local XSD to set theAirspaceVolume at the top of the
> Airspace, to see if there where the same problem. And there is the same
> problem.
>
> If I set targetAttribute like this :
>
> <targetAttribute>timeSlice/AirspaceTimeSlice/geometryComponent/AirspaceGeometryComponent/theAirspaceVolume/AirspaceVolume</targetAttribute>
> I get empty AirspaceVolume tags when I have single volume,and when there
> is multiple volumes, I get my strange string inside the volume tag.
>
>
> So that mean that the encoder doens't understand how to decode multiple
> AirspaceVolume inside theAirspaceVolume tag ?
>
> How can I help the encoder to understand this ?
> - Editing XSD?
> - Create another intermediate Complex type (to describe
> theAirspaceVolume) ?
>
> JcA
>
>
>
>
> On 22/10/15 01:49, Stefano Costa wrote:
>>
>>> I had a quick look at AIXM 5.1 (
>>> http://www.aixm.aero/gallery/content/public/schema/5.1/AIXM_Features.xsd
>>> ),
>>> but the Airspace type defined there doesn't have any theAirspaceVolume
>>> property.
>>>
>>
>> Yes, in this schema, theAirspaceVolume is a property only of
>> AirspaceGeometryComponentType.
>>
>> JcA, you use
>> <targetElement>aixm:Airspace</targetElement>
>> [...]
>> <targetAttribute>aixm:theAirspaceVolume</targetAttribute>
>> [...]
>> <targetAttributeNode>aixm:AirspaceVolumePropertyType</targetAttributeNode>
>> to override the type information in the schema. If your mappings
>> conform the the AIXM schema, targetAttributeNode should not be
>> required. Your override does not work for multiple values so the
>> Encoder falls back to using a string representation of the internal
>> Java objects. This is not what you want. For a single AirspaceVolume,
>> the mapping appears to work, but the WFS response does not conform to
>> the AIXM 5.1 schema and is schema-invalid. Even if what you are trying
>> to do worked for multiple values, it would be schema-invalid.
>>
>> In the AIXM 5.1 schema, you can map AirspaceVolume nested inside
>> AirSpace/timeSlice like this XPath:
>>
>>
>> AirSpace/timeSlice/AirspaceTimeSlice/geometryComponent/AirspaceGeometryComponent/theAirspaceVolume/AirspaceVolume
>>
>> I think you are missing several levels of nesting.
>>
>> Kind regards,
>>
>
--
Best regards,
Stefano Costa
==
GeoServer Professional Services from the experts!
Visithttp://goo.gl/it488V for more information.
==
Dott. Stefano Costa
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.ithttp://twitter.com/geosolutions_it
-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users