Index Changes

Difference between version and version     

Back to Encoding Properties, or Encoding Properties Info


At line 1 changed 1 line.
xxxxxxxxxxxx
!!!Editing Encoding Properties
Once the encoding style is applied, you can edit detailed encoding rules at the node level using the special {{encoding}} node under the element's {{annotation}} node.
!!Encoding Properties
The following figure shows the majority of encoding properties associated with various nodes.
__Figure 1-2 Encoding Properties (Root Node/Fixed Length/Encoded)__
[{Image src='Enc_Props_Root_FL_Enc.gif' width='' height='' align='left|center|right' }]
__Table 1-1 Encoding Properties__
|| Name|| Description
| Encoding Style| Specifies the encoding style, for example: {{customencoder-[version]}}.
| Node Type| Specifies the format for parsing and serialization. The options are:\\- {{group}}, which provides organizational grouping for purposes such as repetition. Does not apply to Choice Element or Field nodes.\\- {{array}}, which is a delimited structure. If repeated, occurrences are separated by the {{repeat}} delimiter. The last occurrence may be terminated by a {{normal}} delimiter. Does not apply to Choice Element nodes.\\- {{delimited}}, which is a delimited structure. If repeated, occurrences are separated by a {{normal}} delimiter. Does not apply to Choice Element nodes. See Specifying Delimiters for additional information.\\- {{fixedLength}}, which indicates a fixed length and is specified by non-negative integer (or zero to indicate end of parent node data). Does not apply to Choice Element nodes.\\- {{transient}}, which appears only in an internal tree as a scratchpad field. It does not appear in external data representation, and can only have {{transient}} node types as children.\\The default value is {{delimited}}.\\See also Node Type Default Values (following this table) for more information.
| Fixed Length Type| Displayed for {{fixedLength}} Node Type only.The options are:\\- {{regular}} \\- {{encoded}} \\- {{determined by regex match}} \\
(Specifies a fixed-length field whose length is determined by a regular expression at runtime.)\\- {{deducted from end}}\\
| Encoded Field Length| Displayed only for {{fixedLength}} Node Type with the {{encoded}} option. Specifies the length of the field; the default value is {{0}}.
| Encoded Field Offset| Displayed only for {{fixedLength}} Node Type with the {{encoded}} option.
| Encoded Field Position| Displayed only for {{fixedLength}} Node Type with the {{encoded}} option.
| Length From End| Displayed only for {{fixedLength}} Node Type with the {{deducted from end}} option.
| Array Delimiter| Displayed for {{array}} Node Type only.
| Delimiter List| Opens the Delimiter List Editor. See Specifying Delimiters for information.
| Top| Applies to root node only. Specifies whether or not parsing/serializing encoding is supported for descendant nodes. The default value is {{true}} (checked box).
| Input Charset| Specifies the character set of the input data. This is only needed if the parsing is done upon byte array data and the character set that the byte array data is encoded against is not safe for delimiter scanning. If this property is not specified, the value specified for the {{Parsing Charset}} property will be used. This property is displayed only when the {{Top}} property is set to {{true}} (checked box). Applies to root node only. See Data Encoding for additional information.
| Output Charset| Specifies the character set if it needs to be different from the serializing character set. If this property is not specified, the value specified for the {{Serializing Charset}} property will be used. This property is displayed only when the {{Top}} property is set to {{true}} (checked box). Applies to root node only. SeeData Encoding for additional information. Note: his character set may be unsafe for delimiter scanning.
| Parsing Charset| Specifies the character set used to decode byte array data into string during parsing. It is recommended to use UTF-8 for DBCS data, since the hex value of some ASCII delimiter may coincide with a hex value contained within a double-byte character. This property is displayed only when the {{Top}} property is set to {{true}} (checked box). See Data Encoding for additional information.
| Serializing Charset| Specifies the character set used to encode string data into byte array data during serialization of the data. This property is displayed only when the {{Top}} property is set to {{true}} (checked box). See Data Encoding for additional information.
| Order| Specifies the ordering of the selected node’s children during the parsing process. See Order Property (following this table) for additional information.\\- {{sequence}} specifies that the child nodes must appear in the sequence given in the metadata.\\- {{any}} specifies that the child nodes must remain grouped, but the groups can appear in any order.\\- {{mixed}} specifies that the child nodes can appear in any order\\Note: Does not apply to __choice element__ nodes.
| NofN minN| Specifies the minimum number of child nodes that should appear.
| NofN maxN| Specifies the maximum number of child nodes that should appear.
| MinOcc| Applies to repeating nodes only. Specifies the minimum number of nodes that should appear.
| MaxOcc| Applies to repeating nodes only. Specifies the maximum number of nodes that should appear.
| Scavenger Chars| Specifies the characters to be stripped out when parsing the data, if they appear at the start of the byte stream for this element.
| Output Scavenger 1st Char| Specifies the character to be stripped out when serializing the data, if it appears as the first character of the output byte stream from this element.
| Array Delimiter| Displayed for {{array}} Node Type only.
| Begin Delimiter| Once beginning delimiters are specified, the value field displays the delimiter characters.
| Begin Delimiter Detached| Specifies whether the Begin Delimiter is anchored or detached. The default value is {{false}} (unchecked box), indicating an anchored delimiter.
| Delimiter| Displayed for {{delim}} Node Type only.Once delimiters are specified, the value field displays the delimiter characters. Does not apply to __choice element__ nodes.
| Escape Sequence| Displayed only when the {{top}} property is set to {{true}} (checked box).
| Fine Inherit| Displayed only when the {{top}} property is set to {{true}} (checked box). Enables the inheritance of the following delimiters to be inherited individually from the parent nodes:\\- begin\\- end\\- repeating\\The default value is {{false}} (unchecked box).
| Undefined Data Policy| Displayed only when the {{top}} property is set to {{true}} (checked box). The options are as follows:\\- {{map}} \\- {{ship}} \\- {{prohibit}} \\
!Node Type Default Values
The basic default value for the nodeType property is {{delimited}}. If, however, the node is the child of a parent node whose Node Type is {{fixedLength}} or {{transient}}, then the child takes on the same Node Type as the parent. See the following table for additional information.
%%information
Note - This rule does not apply to Choice Element nodes.\\
%%
__Table 1-2 Node Type Default Values__
|| Parent|| Child
| array| delimited
| delimited| delimited
| fixed| fixed
| group| delimited
| transient| transient
!Order Property
To illustrate how the {{order}} property works, consider the simple tree structure shown in the following diagram, where __a__ is an element node, __b__ is a non-repeating field node, and __c__ is a repeating field node. The value set for the {{order}} property allows the field nodes to appear as shown in following table.
__Figure 1-3 Order Property Example__
[{Image src='Order_Property.gif' width='' height='' align='left|center|right' }]
__Table 1-3 Order Property Example__
|| Value|| Allowed Node Order
| sequence| b, c1, c2
| any| b, c1, c2, __or__ c1, c2, b
| mixed| b, c1, c2, __or__ c1, c2, b, __or__ c1, b, c2
!!Data Encoding
For GlassFish ESB to correctly handle data in byte-oriented protocol, the encoding method for inbound and outbound Encoders and the native code used for parsing must be specified in the Encoding properties. If you do not specify otherwise, UTF-8 is assumed to be the encoding method in each case.
Supporting UTF-8 by default allows the use of the Unicode character set in both ASCII and non-ASCII based environments without further specification. GlassFish ESB also supports ASCII for English, Japanese, and Korean locales, and the localized country-specific encoding methods shown in the following table.
The data encoding you specify when configuring the Encoding properties modifies the Java methods used for encoding and decoding. The encoding and decoding processes differ from one another depending upon which Java method you use, and whether you are encoding to or decoding from bytes or strings. The diagrams shown in About Data Parsing and Serialization illustrate these differences.
The encoding options available to you depend on the locale specified by your version of GlassFish ESB. UTF-8 is the default in all locales.
__Table 1-4 Partial Listing of Supported Encoding Options According to Locale__
|| English|| Japanese|| Korean|| Simplified Chinese|| Traditional Chinese
| UTF-8| UTF-8| UTF-8| UTF-8| UTF-8
| ASCII| ASCII| ASCII| GB2312| Big5
| EBCDIC| EUC-JP| EUC-KR| |
| UTF-16| SJIS| MS949| |
| | MS932| | |

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-18) was last changed on 15-Dec-08 17:12 PM, -0800 by NormS