Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 4 Current »

TM1Directive (class in TM1Directive.py)

This class represents single splicing directive from parsed TM1 rule file.

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.

TM1ReverseDirective (class in TM1ReverseDirective.py, extends TM1Directive)

The class represents a directive for reverse splicing. The reverse directive is derived from directive by using the same logic to match elements for splicing as the original directive, but uses element list obtained from QueryRollback for splicing.

The class defines following attributes:

Attribute

Type

Usage

original_directives

Dict[str, str]

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

The class exposes following methods:

Method

Usage

get_original_directives

Returns original_directives.

get_dimensions

get_regexp

get_elements

get_original_directives_for_dimension

get_mdx_applies

applies

  • No labels