App-schema: client properties not encoded correctly with polymorphism
---------------------------------------------------------------------
Key: GEOT-3304
URL: http://jira.codehaus.org/browse/GEOT-3304
Project: GeoTools
Issue Type: Bug
Components: data app-schema
Affects Versions: 2.6.4
Reporter: Rini Angreani
Assignee: Rini Angreani
Fix For: 2.6.6, 2.7-M4
{code}
Expected Result (correct result):
=================
<om:parameter>
<swe:Quantity definition="Borehole Diameter">
<swe:uom code="[in_i]" />
<swe:value>12.25</swe:value>
</swe:Quantity>
</om:parameter>
=======================================
With the use of polymorphism as below mapping:
=======================================
<AttributeMapping>
<targetAttribute>sa:relatedObservation/om:Observation/om:parameter[1]</targetAttribute>
<sourceExpression>
<linkElement>if_then_else(isNull(BOREHOLE_DIAMETER), Expression.NIL,
'swe:Quantity')</linkElement>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
<FeatureTypeMapping>
<sourceDataStore>datastore</sourceDataStore>
<sourceType>OBSRV_TEMPERATURE</sourceType>
<targetElement>swe:Quantity</targetElement>
<groupBy/>
<attributeMappings>
<AttributeMapping>
<targetAttribute>swe:Quantity</targetAttribute>
<ClientProperty>
<name>definition</name>
<value>'Borehole Diameter'</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>FEATURE_LINK</targetAttribute>
<sourceExpression>
<OCQL>GML_ID</OCQL>
</sourceExpression>
<isMultiple>true</isMultiple>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>swe:uom</targetAttribute>
<ClientProperty>
<name>code</name>
<value>'[in_i]'</value>
</ClientProperty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>swe:value</targetAttribute>
<sourceExpression>
<OCQL>BOREHOLE_DIAMETER</OCQL>
</sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
Result :
=======
1st Problem - client property "definition" missing :
<om:parameter>
<swe:Quantity>
<swe:uom code="[in_i]" />
<swe:value>12.25</swe:value>
</swe:Quantity>
</om:parameter>
2nd Problem - with the 1st parameter[1] value as null, no encoding happen for
parameter[1], the 2nd parameter[2] which uses direct mapping result is split
into two as shown below :
<om:parameter>
<swe:Time definition="Shut in Time" />
</om:parameter>
<om:parameter>
<swe:Time>
<swe:uom code="min" />
<swe:value>unknown</swe:value>
</swe:Time>
{/code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel