You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Luca Cinquini (Closed) (JIRA)" <ji...@apache.org> on 2012/03/23 11:37:29 UTC

[jira] [Closed] (OODT-405) Expanded syntax for environment variable replacement

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

Luca Cinquini closed OODT-405.
------------------------------

       Resolution: Fixed
    Fix Version/s: 0.4

Functionality implemented as described. For example, a metadata rule that can be included in the opendapps configuration file and will be parsed according to the new syntax is:

<const type="resAttr" 
name="resLocation" 
value="http://cmds-gis.jpl.nasa.gov/Export/NetViewer.asp?Height=1024&amp;Width=1280&amp;BrowseImage=DODS_[OpendapUrl]?[@Variables]|application/gis|Plot [@Variables]"/>

(note the double [@Variables] which causes the env substitution to loop over all available variables).


                
> Expanded syntax for environment variable replacement
> ----------------------------------------------------
>
>                 Key: OODT-405
>                 URL: https://issues.apache.org/jira/browse/OODT-405
>             Project: OODT
>          Issue Type: Improvement
>          Components: opendapps
>            Reporter: Luca Cinquini
>             Fix For: 0.4
>
>
> Currently, the CAS metadata PathUtils class contains functionality to replace a pattern of the form '[key]' with a comma-separated list of values for the environment variable named 'key'.
> For example, a metadata value of the form 'http://somedomain/show=[variable]/' would be replaced with 'http://somdomain/show=lat,lon,temp,prcp/' if 'variable' has multiple values 'lat','lon','temp' and'prcp'.
> Most of the times, this is the expected behavior of the application. Sometimes though the desired behavior is to loop over all the possible values, and generated one new value for each replacement. For example, the CMDS application needs to generate a new URL per variable replacement, resulting in the following multiple values:
> 'http://somdomain/show=lat/'
> 'http://somdomain/show=lon/'
> 'http://somdomain/show=temp/'
> 'http://somdomain/show=prcp/'
> It is proposed to introduce a new env variable syntax to support this behavior: '[@variable]'. If the '@' character is found, the application will loop over all the available env values, and generate a new metadata field for each. These values would then be further analyzed for the standard env replacement processing.
> For now, it is proposed that support for the new syntax be only implemented within the opendap-ps module, and possibly later made available as a general CAS utility.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira