# Tagged Value Transformer

(since v2.4.0)

## 1. Introduction

This transformation provides specific rules to process tagged values.

Note | Common transformer functionality supports setting of tagged values. See Setting Tagged Values for further details.

## 2. Configuration

The following sections specifiy the configuration options for this transformation.

### 2.1. Class

The class for this transformer implementation is de.interactive_instruments.ShapeChange.Transformation.TaggedValues.TaggedValueTransformer

### 2.2. Rules

#### 2.2.1. rule-trf-taggedValue-inheritance

Copies the tagged values specified via configuration parameter taggedValueInheritanceGeneralList from supertypes of the whole model down to their subtypes, starting at the top of inheritance trees. If the tagged value already exists in the subtype, then by default it is retained. However, the value can also be overwritten and the two values can be merged - for further details, see configuration parameters taggedValueInheritanceOverwriteList and taggedValueInheritanceAppendList.

Note | Care should be taken in case that the model contains classes with multiple supertypes.

Note | The implementation currently does not support tagged values with multiple values.

### 2.3. Parameters

#### 2.3.1. taggedValueInheritanceAppendList

Alias: none

Required / Optional: optional

Type: String (comma-separated list)

Default Value: none

Explanation: Comma-separated list of names of tagged values. If a subtype already has a tagged value that would be copied from a supertype under rule-trf-taggedValue-inheritance, and that tagged value is contained in the list, then the value from the tagged value of the supertype shall be appended to the value of the tagged value from the subtype, using the separator defined by configuration parameter taggedValueInheritanceAppendSeparator.

Note | Appending a tagged value has lower priority than overwriting (see taggedValueInheritanceOverwriteList). If a tagged value is listed for both parameters taggedValueInheritanceOverwriteList and taggedValueInheritanceAppendList then it will be ignored in the latter.

Applies to Rule(s): rule-trf-taggedValue-inheritance

#### 2.3.2. taggedValueInheritanceAppendSeparator

Alias: none

Required / Optional: optional

Type: String

Default Value: ", "

Explanation: Define the separator to use when a tagged value inherited from a supertype under rule-trf-taggedValue-inheritance shall be appended to the tagged value of the subtype.

Applies to Rule(s): rule-trf-taggedValue-inheritance

#### 2.3.3. taggedValueInheritanceGeneralList

Alias: none

Required / Optional: Required

Type: String (comma-separated list)

Default Value: none

Explanation: Comma-separated list of names of tagged values for which rule-trf-taggedValue-inheritance shall be applied.

Applies to Rule(s): rule-trf-taggedValue-inheritance

#### 2.3.4. taggedValueInheritanceOverwriteList

Alias: none

Required / Optional: Required

Type: String (comma-separated list)

Default Value: none

Explanation: Comma-separated list of names of tagged values. If a subtype already has a tagged value that would be copied from a supertype under rule-trf-taggedValue-inheritance, and that tagged value is contained in the list, then the tagged value shall be overwritten in the subtype, rather than being retained.

Note | Overwriting a tagged value has higher priority than appending (see taggedValueInheritanceAppendList). If a tagged value is listed for both parameters taggedValueInheritanceOverwriteList and taggedValueInheritanceAppendList then it will be ignored in the latter.

Applies to Rule(s): rule-trf-taggedValue-inheritance

### 2.4. Map Entries

None at present

### 2.5. Advanced Process Configuration

None at present

## 3. Sample Configuration

      1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18

      <Transformer
      class="de.interactive_instruments.ShapeChange.Transformation.TaggedValues.TaggedValueTransformer"
      input="INPUT" id="taggedValueInheritance" mode="enabled">
      <parameters>
       <ProcessParameter name="taggedValueInheritanceGeneralList"
        value="tv1,tv2,tv3,tvIgnoredInAppendList,other1,other3"/>
       <ProcessParameter name="taggedValueInheritanceOverwriteList"
        value="tv2,tvIgnoredInAppendList,other1,other1,other1,other2"/>
       <ProcessParameter name="taggedValueInheritanceAppendList"
        value="tv3,tvIgnoredInAppendList,other3,other3,other3,other4"/>
       <ProcessParameter name="taggedValueInheritanceAppendSeparator" value="|"/>
      </parameters>
      <rules>
       <ProcessRuleSet name="taggedValueInheritance">
        <rule name="rule-trf-taggedValue-inheritance"/>
       </ProcessRuleSet>
      </rules>
     </Transformer>