Configuring the Delimited data handler

To configure the Delimited data handler, take the following steps:

Each of these steps is described in more detail in the following sections.

Configuring the Delimited child meta-object

To configure a Delimited data handler, you must ensure that its configuration information is provided in the Delimited child meta-object. For the Delimited data handler, IBM delivers the MO_DataHandler_DefaultDelimitedConfig child meta-object. Each attribute in this meta-object defines a configuration property for the Delimited data handler. Table 57 describes the attributes in this child meta-object.

Table 57. Child meta-object attributes for the Delimited data handler
Meta-object attribute name Meaning Delivered default value
ClassName
Name of the data handler class to load for use with the specified MIME type. The top-level data-handler meta-object has an attribute whose name matches the specified MIME type and whose type is the Delimited child meta-object (described by Table 57). com.crossworlds. DataHandlers. text.delimited
CxBlank
Establishes the equivalent value in the Delimited data for the special business object attribute value, Blank (the CxBlank constant). For more information, see CxBlank. CxBlank constant
(blank space)
CxIgnore
Establishes the equivalent value in the Delimited data for the special business object attribute value, Ignore (the CxIgnore constant). For more information, see CxIgnore. CxIgnore constant
(empty string)



Delimiter
String used to separate the values in business object attributes when writing business object data to files, or that is assumed to separate fields of data that correspond to attributes when converting a file to a business object. This value can contain multiple characters. ~ (tilde)
DummyKey
Key attribute required by the business integration system. 1
Escape
String used to escape the delimiter and escape characters if they occur in a business object attribute value. This value can only be one character in length. \ (backslash)
OmitObjectEventId
Boolean value to determine whether or not to include ObjectEventId data in business object-to-String and String-to-business object conversions. false
ObjectEventId
Placeholder attribute required by the business integration system. none

The "Delivered default value" column in Table 57 lists the value in the Default Value property for the corresponding attribute in the delivered business object. You must examine your environment and set the Default Value properties of those attributes to the appropriate values for your system and your Delimited documents. You must make sure that at least the ClassName attribute has a default value.

Note:
Use Business Object Designer Express to modify business object definitions.

Business object requirements

The Delimited data handler makes assumptions about the business objects that it handles. Therefore, when you create a business object for conversion using the Delimited data handler, follow these rules:

The Delimiter attribute in the child meta-object configures the delimiter used to separate attribute fields. The default value is a tilde (~).

You can set the child meta-object attribute Escape to configure a string to escape the delimiter and escape strings. The escape string allows the attribute value data to contain delimiter-like and escape-like strings.

Business object structure

There are no requirements regarding the structure of the business objects for the Delimited data handler. The data handler can process any business object.

The business objects that the data handler processes can have any name allowed by the integration broker.

Business object attribute properties

Business object architecture contains various properties that apply to attributes. Table 58 describes how the Delimited data handler interprets several of these properties and describes how to set the properties when modifying a business object.

Table 58. Attribute properties for business objects converted using the Delimited data handler
Property name Description
Name Every business object attribute must have a unique name.
Type Each business object attribute must have a type, such as Integer, String, or the type of a contained child business object.
Key Not used by the Delimited data handler.
MaxLength Not used by the Delimited data handler.
Foreign Key Not used by the Delimited data handler.
Required Not used by the Delimited data handler.
Default Value Not used by the Delimited data handler.
Cardinality Supports cardinality 1 and cardinality n objects.

Attributes in business objects can have the special values of CxIgnore or CxBlank. The Delimited data handler takes special processing steps when attributes have these values, as described in the following sections.

CxIgnore

The CxIgnore meta-object attribute establishes the equivalent value in a Delimited data for the Ignore attribute value (the CxIgnore constant). By default, the CxIgnore meta-object attribute is set to the value of the CxIgnore constant. The data handler uses the CxIgnore meta-object attribute as follows:

Note:
Business objects must have at least one primary key that does not contain the value CxIgnore at runtime.

CxBlank

The CxBlank meta-object attribute establishes the equivalent value in a Delimited data for the Blank attribute value (the CxBlank constant). By default, the CxBlank meta-object attribute is set to the value of the CxBlank constant. The data handler uses the CxBlank meta-object attribute as follows:

Note:
Business objects must have at least one primary key that does not contain the value CxBlank at runtime.

Business object application-specific information

The Delimited data handler does not require any application-specific information in business objects or their attributes. The data handler does, however, check for the existence of the cw_mo_ tag, which a business object might use to indicate any child meta-object that the connector uses. The data handler ignores any attribute identified by the cw_mo_ tag in the application-specific information of the business object.

Using existing business object definitions

The Delimited data handler can convert any business object to a Delimited string as long as the business object delivers data in a form that complies with the requirements of the data handler. The single requirement of the Delimited data handler is that if the data handler must read in a delimited file, that each individual field is separated by the configured delimiter.

Although existing business objects that meet this requirement can be converted by the Delimited data handler, a good practice is to create your own business objects for each type of data to be processed. If you use a sample business object, or a business object developed to support the same application in another implementation, be sure to modify the definition as necessary to include only the attributes required for the implementation for which you are developing.

Therefore, to convert existing business objects to a form that closely corresponds to your data, modify the business object to provide only the data required by the application and the information required by the data handler. To adapt existing business objects for use with the Delimited data handler, do the following:

  1. Perform a functional analysis of the target application, and compare the results to existing business objects to determine the required fields of a business object definition.
  2. Use Business Object Designer Express to add or delete attributes from the business object definition as needed.

Copyright IBM Corp. 1997, 2003