Create new JBoss Tools Documentation Jira issue

This will launch the Jboss Tools Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

Chapter 3. Reference

3.1. Smooks Configuration Editor
3.1.1. Process tab
3.1.2. Options Tab
3.1.3. Source Tab

This chapter includes detailed reference information about Smooks Tools.

This chapter describes the following tabs of the Smooks Configuration Editor:

The Process tab of the Smooks Configuration Editor helps to configure different types of transformations. By default smooks configuration file is opened in this editor.If you have another default settings for editor opening you should left click smooks configuration file and select:Open With->Smooks Configuration Editor.

The Process tab has two sections:

You can see them on the picture below.


The options of this section depends on the selected task in the Processing Task section. Because there are 3 types of tasks there are 3 different sets of its options in the Selected Task Details Section. They will be described one by one.

On the picture below you can find an example of Selected Task Details Section view if XML is selected as input type.


As you can see on the picture above Input Configuration section is empty for XML input file. But this section has special configuration options for CSV,EDI,JSON,Custom input files.

Here are the screens of these configuration options:

All the input task configuration positions can be found in the table below:

Table 3.2. Selected Task Details Section. Options for Input Task.

OptionDescriptionDefault
Input typeSelect your type of input file. If don't find your type in the list,you should use Custom type:
  • No Input

  • XML

  • Java

  • XSD/WSDL

  • CSV

  • EDI

  • JSON

  • Custom

XML
Input configuration
  • No Input -no info required

  • XML -no info required

  • Java -no info required

  • XSD/WSDL -no info required

  • CSV

    • Fields -Comma separated list of CSV record field names

    • Separator Character -Field separator character. Default of ','.

    • Quote Character -Quote character. Default of '"'.

    • Record Name -Name of csv record element.Default:csv-record

    • Root Name -Name of csv root element.Default:csv-set

    • indent -Add indentation character data to the generated event stream. This simply makes the generated event stream easier to read in its serialized form. Useful for testing etc.Default:true

    • Skip Lines -Number of lines to skip before processing starts. Default of 0.

  • EDI

    • Target Profile -Defines the target profile

    • Encoding -The character encoding. Default "UTF-8"

    • Mapping Model -Defines the EDI Mapping Model configuration for processing the EDI message stream to a stream of SAX events that can be processed by Smooks.

    • Validate -This attribute turns on/off datatype validation in the EDI Parser. Validation is on by default. It makes sense to turn datatype validation off on the EDI Reader if the EDI data is being bound into a Java Object model.

  • JSON

    • Target Profile -Defines the target profile

    • Array Element Name -The element name of a array element. Default of 'element'.

    • Encoding -encoding: The default encoding of any JSON message InputStream processed by this Reader. Default of 'UTF-8'.

    • Illegal Element Name Char Replacement -If illegal characters are encountered in a JSON element name then they are replaced with this value. By default this is not defined, so that the reader doesn't doesn't search for illegal characters.

    • Indent -Add indentation character data to the generated event stream. This simply makes the generated event stream easier to read in its serialized form. Useful for testing etc.Default:false.

    • Key Prefix on Numeric -The prefix character to add if the JSON node name starts with a number. By default this is not defined, so that the reader doesn't search for element names that start with a number.

    • Key Whitespace Replacement -The replacement character for whitespaces in a JSON map key. By default this not defined, so that the reader doesn't search for whitespaces.

    • Null Value Replacement -The replacement string for JSON NULL values. Default is ""(an empty string).

    • Root Name -The element name of the document root. Default of 'json'.

    • Key Maps -Defines a JSON element name mapping The "from" key will be replaced with the "to" key or the contents of the element.

  • Custom

    • Target Profile -

    • Class -Custom reader class.

    • Handlers -Set a handler on the reader instance e.g. an EntityResolver, ErrorHandler etc.

    • Features -Reader Features List

    • Parametres -Resource Parameters

  • CSV

    • not defined

    • ','

    • '"'

    • csv-record

    • csv-set

    • true

    • 0

  • EDI

    • not defined

    • UTF-8

    • not defined

    • true

  • JSON

    • not defined

    • element

    • UTF-8

    • not defined

    • false

    • not defined

    • not defined

    • ""(an empty string)

    • 'json'

    • not defined

  • Custom

    • no defaults

Input DataYou should select a data file using Add and Delete buttons 
Input Model ViewUsing this view you can see the structure of your input file.If the file has been changed, to see the changes click Refreshlink. 

This section describes Options tab of the Smooks Configuration File editor, gives short recommendations how this tab can be used during the project configuring.