IBM Bank Transformation Toolkit Javadoc

com.ibm.btt.format.impl
Class TimeFormat

java.lang.Object
  extended by com.ibm.btt.format.AbstractFormatElement
      extended by com.ibm.btt.format.FieldFormat
          extended by com.ibm.btt.format.impl.TimeFormat
All Implemented Interfaces:
FormatElement, JSONString

public class TimeFormat
extends FieldFormat
implements JSONString


Field Summary
 
Fields inherited from class com.ibm.btt.format.AbstractFormatElement
dataName, tagName, TOSTRINGS_MARGIN
 
Constructor Summary
TimeFormat()
           
 
Method Summary
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.
 Message format(ReadAdapter dataAdapter)
          This method is attended to be called by client code of FormatElement
protected  java.lang.String[] getAmPmStrings()
           
 java.lang.String getAmString()
           
protected  java.lang.String getPattern()
           
 java.lang.String getPmString()
           
 java.lang.String getSep()
           
 boolean isEscape()
           
 boolean isHours24()
           
 boolean isShowSeconds()
           
 boolean isUseSep()
           
 void setAmString(java.lang.String amString)
           
 void setEscape(java.lang.String escape)
           
 void setHours(java.lang.String hours)
           
 void setPmString(java.lang.String pmString)
           
 void setSep(java.lang.String sep)
           
 void setShowSeconds(java.lang.String showSeconds)
           
 void setUseSep(java.lang.String useSep)
           
 void unformat(Message message, WriteAdapter dataAdapter)
          This method is attended to be called by client code of FormatElement
 
Methods inherited from class com.ibm.btt.format.FieldFormat
isContainer
 
Methods inherited from class com.ibm.btt.format.AbstractFormatElement
getDataName, rootDecorated, setDataName, toString, toStrings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.btt.format.FormatElement
getDataName, rootDecorated, toStrings
 

Constructor Detail

TimeFormat

public TimeFormat()
Method Detail

getPattern

protected java.lang.String getPattern()

getAmPmStrings

protected java.lang.String[] getAmPmStrings()

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 AbstractFormatElement
Returns:
Throws:
ExtractException

format

public Message format(ReadAdapter dataAdapter)
               throws FormatException
Description copied from interface: FormatElement
This method is attended to be called by client code of FormatElement

Specified by:
format in interface FormatElement
Returns:
Throws:
FormatException

unformat

public void unformat(Message message,
                     WriteAdapter dataAdapter)
              throws UnformatException
Description copied from interface: FormatElement
This method is attended to be called by client code of FormatElement

Specified by:
unformat in interface FormatElement
Throws:
UnformatException

isShowSeconds

public boolean isShowSeconds()

setShowSeconds

public void setShowSeconds(java.lang.String showSeconds)

getAmString

public java.lang.String getAmString()

setAmString

public void setAmString(java.lang.String amString)

getPmString

public java.lang.String getPmString()

setPmString

public void setPmString(java.lang.String pmString)

isHours24

public boolean isHours24()

setHours

public void setHours(java.lang.String hours)

getSep

public java.lang.String getSep()

setSep

public void setSep(java.lang.String sep)

isUseSep

public boolean isUseSep()

setUseSep

public void setUseSep(java.lang.String useSep)

isEscape

public boolean isEscape()
Specified by:
isEscape in interface JSONString

setEscape

public void setEscape(java.lang.String escape)

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 AbstractFormatElement
Returns:

IBM Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2008