Tagged Value Transformer
(since v2.4.0)
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.
Configuration
The following sections specifiy the configuration options for this transformation.
Class
The class for this transformer implementation is de.interactive_instruments.ShapeChange.Transformation.TaggedValues.TaggedValueTransformer
Rules
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.
Parameters
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
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
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
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
Map Entries
None at present
Advanced Process Configuration
None at present
Sample Configuration
<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>