-
Notifications
You must be signed in to change notification settings - Fork 1
Text File Handler
The Text File handler is able to produce almost any kind of text files from the content of columns where each record can be represented with one line in the output text file.
Each of the [record types](Record Types) has an editable associated pattern. When the output is written, then these patterns are written line by line, but to make the result dynamic you can embed different markers into the patterns. For example we can associate the ${key} is famous about ${value}
pattern to the property record type. Considering only the following two property records...
Key | Given column |
---|---|
Hungary | pálinka |
Japan | sake |
... the handler will generate the following two lines.
Hungary is famous about pálinka.
Japan is famous about sake.
You can specify the following patterns.
- header - written in the beginning of the output file
- footer - written in the end of the output file
- property - written in the output file when the next record is a [property record](Record Types)
- comment - written in the output file when the next record is a [comment record](Record Types)
- empty - written in the output file when the next record is a [empty record](Record Types)
See below an example screenshot about the pattern configuration.
You can use the following markers:
-
${name}
- [Name of the MultiProperties](Basic Features) -
${description}
- [Description of the MultiProperties](Basic Features) -
${columnName}
- [Name of the given column](Basic Features) -
${columnDescription}
- [Description of the given column](Basic Features) -
${key}
- Key of the [property record](Record Types). Resolved only in property pattern. -
${value}
- The column associated value in case of [property record](Record Types), or the value of the comment in case of [comment record](Record Types).
The Text File handler currently does not support importing features.
The multiproperties
file format provides only a string value for the handler configuration. In some cases, like command line usage, you need to know how this value is encoded. In Text File handler case it is the following.
The target text file together with the above detailed patterns are appended together with /#/
separator character sequence. The stored values in order are:
- File name of the output text file (can be fully qualified path).
- The encoding to be used, like
UTF-8
,ISO-8859-1
,Cp1250
, etc. When empty, the Eclipse workspace default encoding (or JVM default encoding in case command line usage) is used. - The header pattern containing the possible markers.
- The footer pattern containing the possible markers.
- The property pattern containing the possible markers.
- The comment pattern containing the possible markers.
- The empty pattern containing the possible markers.
Example:
c:\output.txt/#/UTF-8/#/${description}\n/#/${key} - ${value}\n/#/${value}\n/#/\n/#//#/ETX
The handler cannot handle properly such [descriptions](Basic Features) and [column descriptions](Basic Features) which consists of multiple lines. Please consider this limitation when using the ${description}
or ${columnDescription}
markers.