EDIFACT Integrator - Online Help
EDIFACT Integrator
Questions / Feedback?

Edifacttranslator Configuration

The bean accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

EDIFACTTranslator Configuration Settings

CloseStreamAfterTranslate:   If true, the bean will close the output stream after translation.

When set to True (default), the bean will close the output stream specified by SetOutputStream after Translate returns. If set to False the output stream will remain open. The default value is True.

CrossFieldValidationEnabled:   Enables cross-field validation rules.

If true, cross-field validation rules present in the document schema will be checked. The default value is false. Note, Bots Schema Files do not support syntax rules, therefore CrossFieldValidation rules will never execute for these schemas.

Encoding:   The character encoding to be applied when reading and writing data.

If the data contains non-ASCII characters this setting should be specified so characters are properly preserved. This value should be set to a valid character set such as "UTF-8" or "ISO-8859-1".

IncludeFooters:   Whether to include footer information in the XML.

This setting specifies whether footer information is included in the translated XML. For EDIFACT this includes UNT, UNE, and UNZ. For X12 this include GE, SE, and IEA. The default value is False.

RenamingRulesData:   The renaming rules data.

This setting may be used to get or set renaming rules without using a file on disk. When calling SaveRenamingRules or LoadRenamingRules set the RuleFile parameter of the method to empty string to use the value in this setting instead of a file on disk. For instance:

//Save Renaming Rules
editranslator.SaveRenamingRules("");
string ruleData = editranslator.Config("RenamingRulesData");


//Load Renaming Rules
editranslator.Config("RenamingRulesData=" + ruleData);
editranslator.LoadRenamingRules("");

ComponentDelimiter:   The delimiter character to use to separate components.

When set, this changes the default delimiter to use to separate components within a data element. The default value depends on the EDI specification being used.

ElementDelimiter:   The delimiter character to use to separate data elements.

When set, this changes the default delimiter to use to separate data elements within a segment. The default value depends on the EDI specification being used.

ReleaseChar:   The character to use to escape delimiters within values.

When set, this changes the default escape character. The default value depends on the EDI specification being used.

RepetitionChar:   The repetition character.

When set, this changes the default repetition character. The default value depends on the EDI specification being used.

SegmentDelimiter:   The delimiter character to use to separate segments.

When set, this changes the default delimiter to use to separate segments within an EDI document. The default value depends on the EDI specification being used.

UseSchemaId:   Specifies whether to use the Id from the schema as the XML element name.

This setting specifies whether the XML element name written to output is taken from the Id of the element defined in the schema. It is only applicable to RSSBus JSON schemas. For instance, given an EDIFACT document with the segment:

UCM+1++7

When this setting is True the XML generated may look like:

<UCMLoop1 type="Loop">
<UCM type="Segment">
<_0062 desc="Message reference number">1</_0062>
<S009  type="Composite" desc="MESSAGE IDENTIFIER"><_0065></_0065></S009>
<_0083 desc="Action, coded">7</_0083>
</UCM>
</UCMLoop1>

Where the elements "_0062", "S009", etc. are taken from the Id values of the EDI elements in the schema files.

Note: In order to produce valid XML, elements that would begin with a digit are prefixed with the "_" character.

In contrast if UseSchemaId is set to False (default) the XML generated may look like:

<UCMLoop1 type="Loop">
<UCM type="Segment">
<UCM01 desc="Message reference number">1</UCM01>
<UCM02  type="Composite" desc="MESSAGE IDENTIFIER"><UCM0201></UCM0201></UCM02>
<UCM03 desc="Action, coded">7</UCM03>
</UCM>
</UCMLoop1>
The default value is False. This setting is only applicable when using RSSBus JSON schemas.

StrictSchemaValidation:   Specifies the behavior during schema validation.

This setting specifies what happens when performing schema validation and a validation warning occurs. By default this value is set to 1 (Warn) and the Warning event will fire, but processing will not stop. See the WarnCode parameter list in the Warning event for details about possible validation warnings. Possible values for this setting are:

0 (Ignore) All validation warnings will be ignored. Warning will not fire with warnings.
1 (Warn - default) The Warning event will fire with all validation warnings.
1 (Error) All validation warnings are treated as errors and will cause an exception. Processing will stop immediately.

Base Configuration Settings

GUIAvailable:   Tells the bean whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The bean will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GuiAvailable to false will ensure that the bean does not attempt to process external events.

UseDaemonThreads:   Whether threads created by the bean are daemon threads.

If set to True, when the bean creates a thread the thread's Daemon property will be explicitly set to True. By default this setting is False and the bean will not set the Daemon property on the created thread.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 1.0.6635.0