Uploaded image for project: 'OODT (Retired)'
  1. OODT (Retired)
  2. OODT-405

Expanded syntax for environment variable replacement

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.4
    • opendapps
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cinquini Luca Cinquini
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment