IBM Bank Transformation Toolkit Javadoc

com.ibm.btt.format.impl
Class Delimiter

java.lang.Object
  extended by com.ibm.btt.format.AbstractFormatElement
      extended by com.ibm.btt.format.BaseDecorator
          extended by com.ibm.btt.format.impl.Delimiter
All Implemented Interfaces:
FormatDecorator, FormatElement

public class Delimiter
extends BaseDecorator


Field Summary
 
Fields inherited from class com.ibm.btt.format.AbstractFormatElement
dataName, tagName, TOSTRINGS_MARGIN
 
Constructor Summary
Delimiter()
           
 
Method Summary
protected  Message addDecoration(Message message)
           
protected  java.util.Map<java.lang.String,java.lang.String> attributes()
          Generic attributes method.
 Message[] extract(Message message)
          Extracts (strips) the subMessage corresponding to the FormatElement from the input Message and returns it and the remaining Message as the elements of an array.
 byte[] getDelimChar()
           
protected  Message removeDecoration(Message message)
           
 void setDelimChar(java.lang.String str)
           
 
Methods inherited from class com.ibm.btt.format.BaseDecorator
format, getDataName, getDecorated, isContainer, rootDecorated, setDecorated, toStrings, unformat
 
Methods inherited from class com.ibm.btt.format.AbstractFormatElement
setDataName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Delimiter

public Delimiter()
Method Detail

getDelimChar

public byte[] getDelimChar()

setDelimChar

public void setDelimChar(java.lang.String str)

addDecoration

protected Message addDecoration(Message message)
                         throws FormatException
Specified by:
addDecoration in class BaseDecorator
Throws:
FormatException

removeDecoration

protected Message removeDecoration(Message message)
                            throws UnformatException
Specified by:
removeDecoration in class BaseDecorator
Throws:
UnformatException

extract

public Message[] extract(Message message)
                  throws ExtractException
Description copied from interface: FormatElement
Extracts (strips) the subMessage corresponding to the FormatElement from the input Message and returns it and the remaining Message as the elements of an array.
The returned array of Message should always contain two elements.

Take Message 1FCD2639FE for example. The returned array of Message may be {1FCD, 2639FE}, the first element 1FCD is the Message required by this FormatElement, while the second element 2639FE is the remaining Message.

This method is not attended to be called by client code of FormatElement
This method is called by the unformat() method of the composite formats such as com.ibm.btt.format.impl.RecordFormat and com.ibm.btt.format.impl.IndexedFormat.

Specified by:
extract in interface FormatElement
Overrides:
extract in class BaseDecorator
Returns:
Throws:
ExtractException

attributes

protected java.util.Map<java.lang.String,java.lang.String> attributes()
Description copied from class: AbstractFormatElement
Generic attributes method. This method parse throw the 'get' methods of the class, and finds out all the attributes of the bean. It is a simple implementation. Customers are recommended to override this method.

Overrides:
attributes in class BaseDecorator
Returns:

IBM Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2008