You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Michael Joyce (JIRA)" <ji...@apache.org> on 2013/06/14 06:34:19 UTC

[jira] [Commented] (OODT-627) XMLPS field mapping function attribute names are confusing

    [ https://issues.apache.org/jira/browse/OODT-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13683075#comment-13683075 ] 

Michael Joyce commented on OODT-627:
------------------------------------

Resolved in r1492950
                
> XMLPS field mapping function attribute names are confusing
> ----------------------------------------------------------
>
>                 Key: OODT-627
>                 URL: https://issues.apache.org/jira/browse/OODT-627
>             Project: OODT
>          Issue Type: Improvement
>          Components: xmlps
>    Affects Versions: 0.5
>            Reporter: Michael Joyce
>             Fix For: 0.6
>
>
> In the mapping file we can specify a mapping function to apply to a field. This allows for semi-complex mappings to be handled easily. However, the current calls in XMLPS result in the mappings being applied in reverse order (relative from the "expected" direction).
> Consider the following mapping that modifies the example config mentioned in the XMLPS Quick Start Guide [1]. Instead of returning the id as a number we want it as either the string "first" or "second".
> {code:xml}
> <field type="dynamic" name="id" dbname="product_id">
>   <translate>
>     <func class="org.apache.oodt.xmlps.mapping.funcs.ReplaceFunc" orig="1" with="first" />
>     <func class="org.apache.oodt.xmlps.mapping.funcs.ReplaceFunc" orig="2" with="second" />
>   </translate>
> </field>
> {code}
> My initial impression is that we're mapping the original value (1 or 2) to the new "with" values (first or second). With the current implementation this is not the case. We're actually mapping "first" to 1 and "second" to 2. 
> I propose that we change the implementation so the attributes are easier to understand.
> [1] https://cwiki.apache.org/confluence/display/OODT/XMLPS+Quick+Start+Guide

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira