Versions Compared

Key

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

...

The class defines following attributes:

Attribute

Type

Usage

scope

str

Name of region in which the directive applies.

directives

Dict[str, str]

Dictionary of associated regular expressions that define splicing set of the splicing directive indexed by dimension.

catalog_key

str

An ID to lookup a Query, QueryRollback and On_Empty_Set nodes from fpm.json config file through TM1ConfigContainer methods get_mdx_query, get_rollback_mdx_query and get_on_empty_set.

The class exposes following methods:

Method

Usage

get_scope

Returns scope.

get_dimensions

Returns a list of dimensions that the directive applies to.

get_hierarchies

Returns a list of hierarchies of specified dimension that the directive applies to.

get_elements

Returns a list of elements (regular expression) associated with specified dimension of the directive.

get_mdx_applies

Returns a flag if all of elements related to specified dimension should be spliced. This applies when a special tag @mdx was supplied instead of element regular expression.

get_mdx_key

Returns catalog_key.

applies

Returns a flag if the directive applies to supplied dimension and element list.

get_matching_elements

Returns a list of all elements for supplied dimension a and list of elements, for which the directive is matching with the regular expression, if the directive was specified with @mdx tag, it will return all elements.

TM1Region (class in TM1Region.py, extends TM1RuleToken)

The class represents a single region instance in the TM1 rule file. The region is considered as contents of the rule file between #Region and #EndRegion marks associated with the region.

The class defines following attributes:

Attribute

Type

Usage

region_name

str

Name of region.

The class exposes following methods:

Method

Usage

get_region_name

Returns region_name.

update_region_start

Updates start index of the region, counted as zero based number of characters from the start of the rule file.

update_region_end

Updates end index of the region, counted as zero based number of characters from the start of the rule file.

get_region_start

Returns start index of the region.

get_region_end

Returns end index of the region.

region_applies

Returns a flag indicating the region overlaps completely a string space inside supplied boundaries.

TM1RegionStart (class in TM1Region.py, extends TM1RuleToken)

This class represents a keyword #Region parsed from the TM1 rule file.

The class defines following attributes:

Attribute

Type

Usage

region_obj

TM1Region

Link to a TM1Region instance that was defined by the keyword.

The class exposes following methods:

Method

Usage

get_region_name

Returns region_name of the region_obj.

TM1RegionEnd (class in TM1Region.py, extends TM1RuleToken)

This class represents a keyword #Region parsed from the TM1 rule file.

The class defines following attributes:

Attribute

Type

Usage

region_obj

TM1Region

Link to a TM1Region instance that was defined by the keyword.

The class exposes following methods:

Method

Usage

get_region_name

Returns region_name of the region_obj.