IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class CodeSetTranslator

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

@ATTR(value="to#String#IMPLIED")
public class CodeSetTranslator
extends FormatDecorator

This class translates the decorated string to the code set specified by its attribute toCodeSet.

See Also:
Serialized Form

Field Summary
protected  java.lang.String fromCodeSet
           
protected  java.lang.String toCodeSet
           
 
Fields inherited from class com.ibm.btt.base.FormatDecorator
decorated
 
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName, externalizer, name
 
Constructor Summary
CodeSetTranslator()
          This constructor creates a CodeSetTranslator object.
CodeSetTranslator(java.lang.String aName)
          This constructor creates a new instance of the CodeSetTranslator class, which is obtained from the external definition files through aName>/I>.
 
Method Summary
 java.lang.String addDecoration(java.lang.String aString)
          Converts aString to the code set specified by toCodeSet.
 java.lang.String getFromCodeSet()
          Returns the value of fromCodeSet.
 java.lang.String getToCodeSet()
          Returns the value of toCodeSet.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes a CodeSetTranslator with the aTag attributes.
 java.lang.String removeDecoration(java.lang.String aString)
          Converts aString from the code set specified for toCodeSet to the default locale.
 void setFromCodeSet(java.lang.String aCodeSet)
          Sets the value of fromCodeSet.
 void setToCodeSet(java.lang.String aCodeSet)
          Sets the value of toCodeSet.
 Vector toStrings()
          Returns a visual representation of this decorator.
 int unformat(int ndxFrom, int ndxTo, java.lang.String str, Context ctx)
          Unformat strings that between ndxFrom and ndxTo into the Context.
 int unformat(int ndxFrom, int ndxTo, java.lang.String str, DataElement de)
          Unformat strings that between ndxFrom and ndxTo into the DataElement.
 
Methods inherited from class com.ibm.btt.base.FormatDecorator
extract, format, format, getDataElementName, getDecorated, getName, isConstant, isItConstant, reinitialize, rootDecorated, rootDecorator, setDecorated, toString, unformat, unformat
 
Methods inherited from class com.ibm.btt.base.FormatElement
checkIndexes, exceptionInfo, externalizer, getExternalizer, getTagName, isCacheable, isNull, readExternal, readExternal, readObject, removeExternal, setDataElementName, setExternalizer, setName, setSize, toTags, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

toCodeSet

protected java.lang.String toCodeSet

fromCodeSet

protected java.lang.String fromCodeSet
Constructor Detail

CodeSetTranslator

public CodeSetTranslator()
This constructor creates a CodeSetTranslator object.


CodeSetTranslator

public CodeSetTranslator(java.lang.String aName)
                  throws java.io.IOException
This constructor creates a new instance of the CodeSetTranslator class, which is obtained from the external definition files through aName>/I>.

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

addDecoration

public java.lang.String addDecoration(java.lang.String aString)
                               throws DSEInvalidArgumentException
Converts aString to the code set specified by toCodeSet.

Specified by:
addDecoration in class FormatDecorator
Parameters:
aString - String
Returns:
String
Throws:
DSEInvalidArgumentException

getFromCodeSet

public java.lang.String getFromCodeSet()
Returns the value of fromCodeSet.

Returns:
int

getToCodeSet

public java.lang.String getToCodeSet()
Returns the value of toCodeSet.

Returns:
int

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
Initializes a CodeSetTranslator with the aTag attributes.

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

removeDecoration

public java.lang.String removeDecoration(java.lang.String aString)
                                  throws DSEInvalidArgumentException
Converts aString from the code set specified for toCodeSet to the default locale.

Specified by:
removeDecoration in class FormatDecorator
Parameters:
aString - String
Returns:
java.lang.String
Throws:
DSEInvalidArgumentException

setFromCodeSet

public void setFromCodeSet(java.lang.String aCodeSet)
Sets the value of fromCodeSet.

Parameters:
aCodeSet - String

setToCodeSet

public void setToCodeSet(java.lang.String aCodeSet)
Sets the value of toCodeSet.

Parameters:
aCodeSet - String

toStrings

public Vector toStrings()
Returns a visual representation of this decorator.

Specified by:
toStrings in class FormatDecorator
Returns:
java.lang.Vector

unformat

public int unformat(int ndxFrom,
                    int ndxTo,
                    java.lang.String str,
                    Context ctx)
             throws DSEInvalidRequestException,
                    DSEInvalidArgumentException
Unformat strings that between ndxFrom and ndxTo into the Context.

Overrides:
unformat in class FormatElement
Parameters:
str - java.lang.String
ndxFrom - int
ndxTo - int
ctx - com.ibm.btt.base.Context;
Returns:
int
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformat

public int unformat(int ndxFrom,
                    int ndxTo,
                    java.lang.String str,
                    DataElement de)
             throws DSEInvalidRequestException,
                    DSEInvalidArgumentException
Unformat strings that between ndxFrom and ndxTo into the DataElement.

Overrides:
unformat in class FormatElement
Parameters:
str - java.lang.String
ndxFrom - int
ndxTo - int
de - com.ibm.btt.base.DataElement;
Returns:
int
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010