IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class StringFormat

java.lang.Object
  extended by com.ibm.btt.base.FormatElement
      extended by com.ibm.btt.base.FieldFormat
          extended by com.ibm.btt.base.StringFormat
All Implemented Interfaces:
Cacheable, java.io.Externalizable, java.io.Serializable

@ATTR(value={"formatAs#String#IMPLIED","unformatAs#String#IMPLIED"})
public class StringFormat
extends FieldFormat

This class formats a String. This class can convert the String to uppercase or lowercase.

See Also:
Serialized Form

Field Summary
 int formatAs
          The property decides the case of the alphabetic characters after formatting.
 int unformatAs
          The property decides the case of the alphabetic characters after unformatting.
 
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName, externalizer, name
 
Constructor Summary
StringFormat()
          This is the default constructor used to create a StringFormat object.
StringFormat(java.lang.String aName)
          This is the constructor used by the externalizer to create a StringFormat object.
 
Method Summary
 java.lang.String formatField(DataField aDataField)
          Converts the string value of aDataField to lowercase or uppercase as determined by the value of the formatAs attribute.
 int getFormatAs()
          Gets the formatAs property (an int) value.
 int getUnformatAs()
          Gets the unformatAs property (an int) value.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes a StringFormat with the aTag attributes.
 void setFormatAs(int type)
          Sets the value of formatAs based on the value of the type parameter: 1 - lowercase 2 - uppercasse other - no changes .
 void setUnformatAs(int type)
          Sets the value of unformatAs based on the value of the type parameter: 1 - lowercase 2 - uppercasse other - no changes .
 java.lang.String toString()
          Returns a visual representation of this format.
 DataField unformatField(java.lang.String aString, DataField aDataField)
          Unformats aString and updates the value of aDataField.
 
Methods inherited from class com.ibm.btt.base.FieldFormat
format, format, toStrings, unformat, unformat, unformat
 
Methods inherited from class com.ibm.btt.base.FormatElement
checkIndexes, exceptionInfo, externalizer, extract, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, isNull, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toTags, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

formatAs

public int formatAs
The property decides the case of the alphabetic characters after formatting.


unformatAs

public int unformatAs
The property decides the case of the alphabetic characters after unformatting.

Constructor Detail

StringFormat

public StringFormat()
This is the default constructor used to create a StringFormat object.


StringFormat

public StringFormat(java.lang.String aName)
             throws java.io.IOException
This is the constructor used by the externalizer to create a StringFormat object.

Parameters:
aName - java.lang.String
Throws:
java.io.IOException
Method Detail

formatField

public java.lang.String formatField(DataField aDataField)
                             throws DSEInvalidClassException
Converts the string value of aDataField to lowercase or uppercase as determined by the value of the formatAs attribute.

Specified by:
formatField in class FieldFormat
Parameters:
aDataField - DataField
Returns:
java.lang.String
Throws:
DSEInvalidClassException

getFormatAs

public int getFormatAs()
Gets the formatAs property (an int) value.

Returns:
The formatAs property value.
See Also:
setFormatAs(int)

getUnformatAs

public int getUnformatAs()
Gets the unformatAs property (an int) value.

Returns:
The unformatAs property value.
See Also:
setUnformatAs(int)

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException
Initializes a StringFormat with the aTag attributes.

Specified by:
initializeFrom in class FormatElement
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
data.DataElement
Throws:
java.io.IOException

setFormatAs

public void setFormatAs(int type)
Sets the value of formatAs based on the value of the type parameter: .

Parameters:
type - int

setUnformatAs

public void setUnformatAs(int type)
Sets the value of unformatAs based on the value of the type parameter: .

Parameters:
type - int

toString

public java.lang.String toString()
Returns a visual representation of this format.

Overrides:
toString in class FormatElement
Returns:
com.ibm.btt.base.Vector

unformatField

public DataField unformatField(java.lang.String aString,
                               DataField aDataField)
Unformats aString and updates the value of aDataField. The unformat converts the String to lowercase or uppercase as determined by the value of the unformatAs attribute.

Specified by:
unformatField in class FieldFormat
Parameters:
aString - java.lang.String
aDataField - DataField
Returns:
DataField

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011