You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Model Documentation

The AnalysisProgrammingCodeTemplate class is used in the codeTemplate attribute of an analysis method to define any template programming code that may be used to generate results for all analyses that use the method. Template programming code is usually parameterized to allow analysis-specific information to be passed through to the code. However, if the same code is always executed for all analyses that use the method, or if the method is only used in a single analysis, then parameterization would not be necessary. In general, template programming code may be used in 3 ways:

  1. The template code may be copied to the analysis and represented as analysis-specific code in the programmingCode attribute of the analyses. The copy process may or may not involve updating the code:
    1. If the template code is already executable, it may be copied, unmodified, into the analyses that use the method. In this situation, if any parameters are associated with the template code, any of these that require analysis-specific values would also need be copied to the analysis and updated to show the analysis-specific value used for execution of the code for the analysis. The analysis-specific value associated with each of these "runtime parameters" would be applied during execution of the code for the analysis.
    2. If the template code contains "replacement parameters" (i.e., the code contains identifiable placeholder strings that are expected to be replaced with analysis-specific parameter values in order to produce executable, analysis-specific, non-parameterized code), the placeholders in the code for each parameter would be replaced with the analysis-specific values during the copying process. In this situation, sponsors may choose to record the analysis-specific values applied during the copying process as parameter values associated with the resultant analysis-specific programming code. Alternatively, only the template code parameters (which include a specification for the expected analysis-specific value) could be retained.
  2. Instead of copying template programming code into every analysis that uses the analysis method, sponsors may choose to implement template programming code by implied reference only. In this situation, the template programming code is not copied into each analysis; it is remains defined only in the analysis method, being retrieved for each analysis (via the method identifier) only at the time of of execution. If the template programming code is parameterized (with either replacement parameters or with runtime parameters), analysis-specific parameter values would need to be applied to the template code as part of the execution.
    1. If any parameter contains a specification indicating how to obtain the analysis-specific parameter value programmatically (e.g., it contains either a single, prespecified, "default" value or a reference to a metadata attribute of the analysis), it does not need to be represented within the analysis definition (though sponsor may choose to copy the parameter to the analysis to have a record of the parameter value being applied during execution).
    2. However, if a parameter does not contain a specification indicating how to obtain the analysis-specific parameter value programmatically (e.g., it does not have either a single, prespecified, "default" or a reference to a metadata attribute of the analysis), the parameter must be copied to the analysis and updated manually to indicate the analysis-specific value applied during execution.

ER Diagram: AnalysisProgrammingCodeTemplate

When specified, the template programming code for each analysis method is represented as an instance of AnalysisProgrammingCodeTemplate class and, in each instance:


  • No labels