Skip to content

Technical\Update MetaData

Alan C Bonnici edited this page Mar 27, 2022 · 3 revisions

Technical: Update MetaData

Revisions

Date Author Doc Ver Comments Applies to v
2022-03 ACB 1.0 First Draft 0.9x

Quick overview

This module is invoked by all Operations except SK (which does nothing). The invocation takes place before the actual operation is evaluated.

It evaluates the MetaData string, and replaces any reference to a Title within the Template with its data. The RegEx pattern the solution looks for is '<;<(.+)>;>'. There can be multiple Titles.

The module looks up Titles that precede the one being processed. If a Title is not found, the string is treated literally and a warning is written to the log file.

Example

Update MetaData Example

<;<Fare_1912>;> x <;<Inflation>;>

Before Operation CO is evaluated, this module will replace <;<Fare_1912>;> and <;;> with the results obtained in those Titles.

If the result of Title Fare_1912 was 7.63 and the result for Inflation was 29.98, the MetaData string would be updated as shown below before the module related to Operation CO is called.

7.63 x 29.98

Flow Diagram

Image

Solution walk through

  • For each RegEx pattern '<;<(.+)>;>' match
    • Extract the Title from the MetaData pattern
    • Search the Title in the list of previously computed entries
      • If a match is found, substitute that pattern with the value associated with that Title
      • If no match is found, write to the log file that the pattern will be treated literally

Return to the calling module the adjusted MetaData string.