The package contains classes representing Splicer specific functionality for resolving splicing and desplicing directives within each parsed rule context. The Objects sub-package contains implementation of splicing and desplicing directives and regions.
TM1DirectiveContainer (class in TM1DirectiveContainer.py)
This class stores all directives 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.
The class defines following attributes:
Attribute | Type | Usage |
---|---|---|
|
| Link to an instance of TM1SpliceExecutor. |
|
| Global position of the |
|
| Dictionary of directives that apply to all elements of a dimension/hierarchy. |
The class exposes following methods:
Method | Usage |
---|---|
| Adds a directive to list of directives. |
| Returns a list of all dimensions extracted from all directives. |
| Returns a list of directives related to a specified dimension. |
| Returns a list of directives related to a specified dimension or empty list if dimension is not within scope of any directive. |
| Returns flag indicating the specified directive targets entire dimension regardless regular expression filter. |
| Returns a list of elements spliced by all directives that apply either by regular expression or to entire dimension. |
TM1DirectiveResolver (class in TM1DirectiveResolver.py)
The class is implementing mechanism to select a list of directives applying to certain TM1 rule command or a feeder command out of all available directives in the TM1 rule file. The mechanism is using region membership (scope) of each rule or feeder to select proper list of directives. The directives are selected according to priority given by distance of the rule or feeder command from each region start.
The class defines following attributes:
Attribute | Type | Usage |
---|---|---|
|
| Link to an instance of TM1SpliceExecutor. |
|
| Dictionary of directives applying to region, indexed by region name. |
The class exposes following methods:
Method | Usage |
---|---|
| Adds a directive to dictionary of directives |
| Called by parser whenever a directive is found during parsing of the TM1 rule file. Creates a new directive and appends it to the internal dictionary. |
| Returns a new instance of |
| Resolves and applies directives to an area statement of a TM1 rule or feeder command. |
| Functionality was removed, originally served to store last splicing results in a file to be able to rollback to previous rule state. |