[ 
https://issues.apache.org/jira/browse/OODT-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris A. Mattmann resolved OODT-627.
------------------------------------
    Resolution: Fixed

this is fixed.

> 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.11
>
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to