Developing OTDs for Communication Adapters

OTD Properties

The Object Type Definition pane (center pane) of the OTD Editor displays the nodes, elements, and fields of the OTD. When any of these are selected, the item’s properties are displayed in the Properties pane.

Node Properties

When an HL7 OTD is opened in the OTD Editor, the properties of the Root node are displayed in the Properties pane. The configurable node properties are displayed in the table.

Node Property Descriptions 

name 

Node display name. This can be a virtually-arbitrary string. 

javaName 

Property accessor basename. This is normally derived from the display name, modified to suit the restrictions on Java identifiers, and supplied automatically by the Sun Enterprise Service Bus. 

javaType 

Java type; automatically assigned, not editable. 

comment 

Free-form text (no run-time effect). 

delim 

Specified delimiter. See Specifying Delimiters.

nodeType 

Governs the marshal/unmarshal format. See Specifying the Node Type.

antecoding 

Specifies the input data coding (see Specifying Data Encoding on page 219). If this property is not specified, the value specified for the decoding property will be used for the input data. This property is displayed only when the top property is set to true.

decoding 

Specifies the unmarshal coding (see Specifying Data Encoding on page 219). (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.

encoding 

Specifies the marshal coding. This property is displayed only when the top property is set to true. 

order 

Specifies the ordering of the Root node’s children: 

  • seq: Specifies that the child nodes must appear in sequence.

  • any: Specifies that the child nodes can appear in any order.

  • mix:

postcoding 

Specifies the output data coding (see Specifying Data Encoding on page 219). If this property is not specified, the value specified for the encoding property will be used for the output data. This property is displayed only when the top property is set to true.

public 

Reserved for future development 

showDelim 

If nodeType is delimited. 

top 

Flag on Root node: support marshal/unmarshal (T/F). 


Note –

Do not modify the javaName property.


Element Properties

The set of properties associated with the element level is shown in the following figure.

Figure 1–14 OTD Editor - OTD Element Properties

OTD Editor - OTD Element Properties

The configurable element properties are displayed in the table.

Element Property Descriptions 

name 

Element display name. 

javaName 

Property accessor basename. 

javaType 

Java type; automatically assigned, not editable. 

comment 

Free-form text (no run-time effect). 

access 

Access specification. 

optional 

Flag: Can the element be absent? (T/F) Not applicable to Root, or child of a choice Node. 

repeat 

Flag: Can the node appear multiple times? (T/F) Not applicable to Root, or child of a choice Node. 

maxOccurs 

Specifies the maximum number of occurrences of the node if the node is repeating. Property has no effect if node is non-repeating, but may show error during validation if set to value >1. 

delim 

Delimiter specification (see Specifying Delimiters).

nodeType 

Governs the marshal/unmarshal format. 

showDelim 

If nodeType is delimited, 

Public 

For future use, not currently active. 

Top 

Specifies whether or not marshal/unmarshal is supported (true or false). The default value is true. 


Note –

Do not modify the javaName property.


Field Properties

The set of properties associated with the field level is shown in the following figure.

Figure 1–15 OTD Editor - OTD Field Properties

OTD Editor - OTD Field Properties

The configurable field properties are displayed in the table.

Field Property Descriptions 

name 

Field display name. 

javaName 

Property accessor basename. 

javaType 

Java type: can be either java.lang.String or byte array (byte[]). 

comment 

Free-form text (no run-time effect). 

access 

Access specification. 

optional 

Specifies whether or not the field can be absent from an instance. Clicking the Value field toggles between true and false. Not applicable if the field is the child of a choice element node. 

repeat 

Specifies whether or not the node can appear multiple times. Clicking the Value field toggles between true and false. Not applicable if the field is the child of a choice element node. 

maxOccurs 

Specifies the maximum number of occurrences of the node if the node is repeating. Property has no effect if node is non-repeating, but may show error during validation if set to value >1. 

delim 

Delimiter specification (see Specifying Delimiters).

initial 

Initial field value, set when the parent node is created or reset. When provided, it is assigned to the node before the node is populated with any data. 

match 

If nodeType is delimited, performs exact match to the data.

nodeType 

Governs the marshal/unmarshal format. 

align 

Specifies the byte alignment criteria for the match property. 

decoding 

Displayed only if nodeType is fixed. Specifies the unmarshal coding. (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 doublebyte character.) 

encoding 

Displayed only if nodeType is fixed. Specifies the marshal coding. 

length 

Displayed only if nodeType is fixed. Specifies the length of the field; the default value is 0. 


Note –

Do not modify the javaName property.