LinkedDocumentTransformer

Introduction

This transformation transforms linked documents of model elements. A linked document is a .docx file that typically provides an extensive amount of formatted documentation for a model element. Linked documents are loaded using the input parameter loadLinkedDocuments. The creation of a database model is an example of where linked documentation plays a role.

Configuration

The following sections specifiy the configuration options for this transformation.

Class

The class for this transformer implementation is de.interactive_instruments.ShapeChange.Transformation.LinkedDocument.LinkedDocumentTransformer

Parameters

prependHorizontalLine

(since v2.5.0)

Required / Optional: optional

Type: Boolean

Default Value: false

Explanation: If set to true, a horizontal line will be added when prepending text to a linked document.

Applies to Rule(s): rule-trf-all-prependText

prependTextValue

(since v2.5.0)

Required / Optional: optional

Type: String

Default Value: none

Explanation: The value of this parameter will be prepended as plain text to a linked document. Note that ShapeChange will replace any occurrence of $TYPE$ with the name of the type that owns the linked document.

Applies to Rule(s): rule-trf-all-prependText

Rules

rule-trf-all-prependText

(since v2.5.0)

Prepends paragraphs as defined via the parameters prependTextValue and prependHorizontalLine to the linked document of a class that belongs to the schemas selected for processing.

The order of the prepended paragraphs is as follows:

  1. text
  2. horizontal line

NOTE: If the class does not have a linked document, then no linked document will be created for it.

Map Entries

None at present

Advanced Process Configuration

None at present

Sample Configuration

<Transformer
  class="de.interactive_instruments.ShapeChange.Transformation.LinkedDocument.LinkedDocumentTransformer"
  input="INPUT" id="trf_linkedDocs" mode="enabled">
  <parameters>
   <ProcessParameter name="prependTextValue"
    value="Content below from the Logical Model documentation - $TYPE$"/>
   <ProcessParameter name="prependHorizontalLine" value="true"/>
  </parameters>
  <rules>
   <ProcessRuleSet name="transformer">
    <rule name="rule-trf-all-prependText"/>
   </ProcessRuleSet>
  </rules>
 </Transformer>