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


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

        

Reply via email to