SWIFT Integration Projects

Library Methods

The SWIFT OTD Library provides a set of run-time methods that allow you to manipulate OTD data in a variety of ways. The following methods are the most frequently used with validation operations:

In addition, the library has methods that allow you to perform basic but necessary operations with the OTDs. See Table 11.

Table 11 Basic OTD Methods

Method 

Description 

add()

Adds a repetition to a given child node. 

append()

Adds given data at the end of existing data. 

copy()

Copies given data at a specified point. 

count()

Gives the count of node repetitions. 

delete()

Erases data at a specified point. 

get()

Retrieves data from a node. 

has()

Checks whether a specified child node is present. 

insert()

Inserts given data at a specified point. 

length()

Returns the length of data contained in an object. 

marshal()

Serializes internal data into an output stream. 

remove()

Removes a given child node repetition. 

reset()

Clears out any data held by an OTD. 

size()

Returns the current number of repetitions for the current child node. 

unmarshal()

Parses given input data into an internal data tree. 

To help in your use of the SWIFT OTD Library and its features, the library includes a Javadoc. You can see this document for complete details on all of these methods. See Table 13 for more information on this document and how to use it.