Hi,
I'm a new user of Geoserver 2.8, and I'm working on configuring two
complex types : 'Airspace' and 'AirspaceVolume'.
An Airspace is composed from 1 to n volumes.
I configured the mapping file to get these two complex types.
<AirspaceVolume>
<itemsA/>
<itemsB/>
<itemsC/>
</AirspaceVolume>
<Airspace>
<items/>
<items/>
<theAirspaceVolume>
<AirspaceVolume>....</AirspaceVolume>
<AirspaceVolume>....</AirspaceVolume>
</theAirspaceVolume>
</Airspace>
Everything works fine when there is only one AirspaceVolume in the
Airspace but when there is two or more, I don't have no more XML in
<theAirspaceVolume> tag, it's a kind of text like WKT.
Here is an example of the out for a single Volume :
<wfs:member>
<aixm:Airspace id="ASPC.UTA4343/UTA">
<aixm:timeSlice>
<aixm:AirspaceTimeSlice>
<aixm:type>UTA</aixm:type>
<aixm:designator>UT UTA A4343</aixm:designator>
<aixm:localType>UTA</aixm:localType>
<aixm:name>CAYENNE</aixm:name>
</aixm:AirspaceTimeSlice>
</aixm:timeSlice>
<aixm:theAirspaceVolume>
<aixm:AirspaceVolume id="AV.1580">
<aixm:upperLimit uom="FL">660</aixm:upperLimit>
</aixm:AirspaceVolume>
</aixm:theAirspaceVolume>
</aixm:Airspace>
</wfs:member>
Here is the output when there is multiple Volumes :
<wfs:member>
<aixm:Airspace id="ASPC.UTA4348/UTA">
<aixm:timeSlice>
<aixm:AirspaceTimeSlice>
<aixm:type>UTA</aixm:type>
<aixm:designator>UT UTA A4348</aixm:designator>
<aixm:localType>UTA</aixm:localType>
<aixm:name>PIARCO</aixm:name>
</aixm:AirspaceTimeSlice>
</aixm:timeSlice>
<aixm:theAirspaceVolume>
[ComplexAttributeImpl:theAirspaceVolume<AirspaceVolumePropertyType>=
[FeatureImpl:AirspaceVolume<AirspaceVolumeType id=AV.1581>=
[ComplexAttributeImpl:upperLimit<ValDistanceVerticalType>=
[AttributeImpl:simpleContent<ValDistanceVerticalBaseType>=9999]]],
ComplexAttributeImpl:theAirspaceVolume<AirspaceVolumePropertyType>=
[FeatureImpl:AirspaceVolume<AirspaceVolumeType
id=AV.1582>=[ComplexAttributeImpl:upperLimit<ValDistanceVerticalType>=[AttributeImpl:simpleContent<ValDistanceVerticalBaseType>=9999]]]]
</aixm:theAirspaceVolume>
</aixm:Airspace>
</wfs:member>
Did it happened to anyone ?
Is there a way to force the output to XML ?
Here is the type mapping :
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>dataStore</sourceDataStore>
<sourceType>xxxxxx_AirspaceVolume</sourceType>
<targetElement>aixm:AirspaceVolume</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>aixm:AirspaceVolume</targetAttribute>
<idExpression>
<OCQL>strConcat('AV.', id)</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>FEATURE_LINK[1]</targetAttribute>
<sourceExpression>
<OCQL>key_aip_parent</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aixm:upperLimit</targetAttribute>
<sourceExpression>
<OCQL>upper_value</OCQL>
</sourceExpression>
<ClientProperty>
<name>uom</name>
<value>upper_unit</value>
</ClientProperty>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
<FeatureTypeMapping>
<sourceDataStore>dataStore</sourceDataStore>
<sourceType>xxx_aispaces</sourceType>
<targetElement>aixm:Airspace</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>aixm:Airspace</targetAttribute>
<idExpression>
<OCQL>strConcat('ASPC.', key_aip)</OCQL>
</idExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:type</targetAttribute>
<sourceExpression>
<OCQL>type</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:designator</targetAttribute>
<sourceExpression>
<OCQL>designator</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:localType</targetAttribute>
<sourceExpression>
<OCQL>localtype</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:name</targetAttribute>
<sourceExpression>
<OCQL>name</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>aixm:theAirspaceVolume</targetAttribute>
<sourceExpression>
<OCQL>key_aip</OCQL>
<linkElement>aixm:AirspaceVolume</linkElement>
<linkField>FEATURE_LINK[1]</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
<targetAttributeNode>aixm:AirspaceVolumePropertyType</targetAttributeNode>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
Best regards.
JcA
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users