Path Types
Self Calculated Number of Node Repetitions
The number of times a node appears in the destination tree can be calculated/specified in the mapping. To do so, attribute Path does not contain the name of a source structure node, but instead a variable of type Integer. The value of the variable, e.g. @var__COUNTER@, will then determine the number of repetitions of the node.
The value of the variable is read when the mapper processes the node in the destination structure for the first time. Later changes to the variable have no effect on the number of repetitions. Anywhere else, however, the current value of the variable is used.
Often, a node should be executed as many times as a Named List object has values, or a Named Map object has keys. Lobster_data, therefore, understands the following path definitions.
@List:list_name@ |
Number of values in list list_name. |
@Map:map_name@ |
Number of values in map map_name. |
Note: The spelling of the prefixes List: and Map: is case-sensitive. You can also insert a string variable for this type of specifying paths. To do so, the variable has to contain a value List:list_name or Map:map_name (without the surrounding @ characters).
Note: It is also possible to specify only the list name or map name with a string variable. So if the variable var__NAME contains the name of the list or map object, the syntax is
@List:@var__NAME@@ or @Map:@var__NAME@@ |