Developing Java CAPS Projects

Object Type Definitions

Figure 17 Object Type Definition Icon

Image of an Object Type Definition icon.

The basic functionality of a Project is processing and routing messages, which it accomplishes by means of Collaborations. To operate on a message, the Collaboration needs a description of the message structure and format. This description is embodied in an Object Type Definition, or OTD, instances of which are incorporated into the Collaboration Definition.

A Collaboration will typically receive a message containing the external representation of a particular OTD. It will use the unmarshal method of an instance of that OTD to parse the data and make it accessible though the hierarchical data structure. Then it will perform some operation— for example, copying parts of the data to another OTD instance. Finally, it will invoke the marshal method on the other OTD instance to render the contents of its data structure as a single, serialized data stream for further transport.

In some cases, the OTD can be generated semi-automatically based on the external data source itself; in other cases, you must create the OTD using the tools provided in the NetBeans IDE.