Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Method

Usage

convert

Method returns concatenated string composed from result of convert method of associated area_statement and statement.

TM1RuleAreaStatement (class in TM1RuleAreaStatement.py, derived from TM1RuleToken)

The class represents area statement of TM1 calculation rule or a feeder command. The area statement is decomposed to dimensions and hierarchy:element pairs belonging to each of the dimensions. This implies that the rule has to contain full specification of each element in the area statement. Not following this pattern in TM1 development will result in an error during splicing of the rule.

The convert method implements splicing of dimensional elements based on directives that apply to the associated TM1CalcRule. Once the directives are applied, the convert method will return modified area statement based on apply method output.

The class defines following attributes:

Attribute

Type

Usage

pre_format

TM1RuleAreaStatement

Link to associated area statement of the TM1 rule or the feeder statement.

post_format

directives_resolver

TM1DirectiveResolver

Link to directive resolver to identify all splicing directives that apply to the area statement of the TM1 rule.

orig_dim_elem_dict

converted_dim_elem_dict

applied_directives

calc_rule

The class exposes following methods:

Method

Usage

set_calc_rule

Method returns concatenated string composed from result of convert method of associated area_statement and statement.

get_dimensions

get_elements

add_converted_dimension

apply_directives

convert