Versions Compared

Key

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

...

This class stores all directives defined in the that apply to a single TM1 rule or a feeder command. It also contains convert helper method to provide support when splicing dimensional elements of the TM1 rule.

...

Attribute

Type

Usage

splice_executor

TM1SpliceExecutor

Link to an instance of TM1SpliceExecutor.

directives

List[TM1Directive]

Global position of the text start (inclusive) within the TM1 rule, calculated as zero based number of characters from start of the rule.

priority_directives

Dict[(str, str), TM1Directive]

Dictionary of directives that apply to all elements of a dimension/hierarchy.

The class defines following methods:exposes following methods:

Method

Usage

append_directive

Adds a directive to list of directives.

get_dimensions

Returns a list of all dimensions extracted from all directives.

get_directives_by_dimension

Returns a list of directives related to a specified dimension.

get_elements

Returns a list of directives related to a specified dimension or empty list if dimension is not within scope of any directive.

get_mdx_splicing_rule_applies

Returns flag indicating the specified directive targets entire dimension regardless regular expression filter.

convert

Returns a list of elements spliced by all directives that apply either by regular expression or to entire dimension.

TM1DirectiveResolver (class in TM1DirectiveResolver.py)