IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class DataMapperExpressionConverterFormat

java.lang.Object
  extended by com.ibm.btt.base.FormatElement
      extended by com.ibm.btt.base.KeyedCollectionFormat
          extended by com.ibm.btt.base.RecordFormat
              extended by com.ibm.btt.base.DataMapperFormat
                  extended by com.ibm.btt.base.DataMapperConverterFormat
                      extended by com.ibm.btt.base.DataMapperExpressionConverterFormat
All Implemented Interfaces:
Cacheable, java.io.Externalizable, java.io.Serializable

public class DataMapperExpressionConverterFormat
extends DataMapperConverterFormat

Data mapping format class with extension to support mapping from expression manipulation to context value.

See Also:
Serialized Form

Field Summary
static java.lang.String Asterisk
           
static java.lang.String FromExpression
          The String from expression
 
Fields inherited from class com.ibm.btt.base.DataMapperConverterFormat
APPEND_FALSE, APPEND_IGNORE, APPEND_TRUE, ByReference, ConversioType, From
 
Fields inherited from class com.ibm.btt.base.KeyedCollectionFormat
dataElementEmpty, elements
 
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName, externalizer, name
 
Constructor Summary
DataMapperExpressionConverterFormat()
           
 
Method Summary
protected  void mapContextToContext(Context inputContext, Context outputContext, boolean byReference, java.lang.String converType, int append)
           The alternative for this algorithm is to create two dummy contexts.
protected  void mapContextToKColl(Context inputContext, Context outputContext, java.lang.String toDataField, boolean byReference, java.lang.String converType, int append)
           Since the left (from) is a "*", it means the root keyed collection which is context.getKeyedCollection().
protected  void mapKCollToContext(Context inputContext, Context outputContext, java.lang.String fromDataField, boolean byReference, java.lang.String converType, int append)
           
protected  void mapSingleElement(DataElement fromDataElement, DataElement toDataElement, java.lang.String converType, boolean byReference, int append)
          Maps the contexts of one operation into the context of another operation.
protected  void mapSingleElements(DataElement fromDataElement, DataElement toDataElement, java.lang.String converType, boolean byReference, int append)
          The purpose of this method is to perform exact match between data elements.
protected  void mapSingleTag(Context inputContext, Context outputContext, Tag element)
          Process mapping described in single tag descriptions.
protected  void mapSingleTagWithExpression(java.lang.String fromExpression, java.lang.String toExpression, Context inputContext, Context outputContext, boolean byReference, java.lang.String converType, int append)
           
 void setMapSystemData(boolean value)
          Set the flag whether to map BTT internal dse_ system data (like dse_sessionId, dse_processorId ..).
 
Methods inherited from class com.ibm.btt.base.DataMapperConverterFormat
deepMapSingleIndexedCollectionElements, deepMapSingleKeyedCollectionElements, initializeFrom, mapContents, mapSingleTag
 
Methods inherited from class com.ibm.btt.base.DataMapperFormat
toStrings
 
Methods inherited from class com.ibm.btt.base.RecordFormat
extract, formatContext, formatKeyedCollection, obtainDataElement, obtainDataElement, toString, unformat, unformat, unformatContext, unformatKeyedCollection
 
Methods inherited from class com.ibm.btt.base.KeyedCollectionFormat
add, addElementAt, addFirst, at, checkIndexes, format, format, getDataElementEmpty, getElements, getEnumeration, reinitialize, removeAll, removeAt, setElements, size, unformat, unformat
 
Methods inherited from class com.ibm.btt.base.FormatElement
exceptionInfo, externalizer, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, isNull, readExternal, readExternal, readObject, removeExternal, rootDecorated, 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

FromExpression

public static final java.lang.String FromExpression
The String from expression

See Also:
Constant Field Values

Asterisk

public static final java.lang.String Asterisk
See Also:
Constant Field Values
Constructor Detail

DataMapperExpressionConverterFormat

public DataMapperExpressionConverterFormat()
Method Detail

mapSingleTagWithExpression

protected void mapSingleTagWithExpression(java.lang.String fromExpression,
                                          java.lang.String toExpression,
                                          Context inputContext,
                                          Context outputContext,
                                          boolean byReference,
                                          java.lang.String converType,
                                          int append)
                                   throws DSEInvalidArgumentException,
                                          DSEInvalidRequestException
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapSingleTag

protected void mapSingleTag(Context inputContext,
                            Context outputContext,
                            Tag element)
                     throws DSEInvalidArgumentException,
                            DSEInvalidRequestException
Description copied from class: DataMapperConverterFormat
Process mapping described in single tag descriptions. Such as <map from="fromField" to="toField"/>.

Overrides:
mapSingleTag in class DataMapperConverterFormat
Parameters:
inputContext - input context
outputContext - output context
element - tag element read from XML snippet
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapContextToContext

protected void mapContextToContext(Context inputContext,
                                   Context outputContext,
                                   boolean byReference,
                                   java.lang.String converType,
                                   int append)
                            throws DSEInvalidRequestException,
                                   DSEInvalidArgumentException
The alternative for this algorithm is to create two dummy contexts.

Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

mapContextToKColl

protected void mapContextToKColl(Context inputContext,
                                 Context outputContext,
                                 java.lang.String toDataField,
                                 boolean byReference,
                                 java.lang.String converType,
                                 int append)
                          throws DSEInvalidRequestException,
                                 DSEInvalidArgumentException
Since the left (from) is a "*", it means the root keyed collection which is context.getKeyedCollection(). So creating a dummy context add the original keyed Collection as its child, then do the real mapping.

Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

mapKCollToContext

protected void mapKCollToContext(Context inputContext,
                                 Context outputContext,
                                 java.lang.String fromDataField,
                                 boolean byReference,
                                 java.lang.String converType,
                                 int append)
                          throws DSEInvalidRequestException,
                                 DSEInvalidArgumentException
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
See Also:
mapContextToKColl

mapSingleElements

protected void mapSingleElements(DataElement fromDataElement,
                                 DataElement toDataElement,
                                 java.lang.String converType,
                                 boolean byReference,
                                 int append)
                          throws DSEInvalidArgumentException,
                                 DSEInvalidRequestException
The purpose of this method is to perform exact match between data elements. The exact match means mapping the sub-data elements one by one recursively rather than replace 'to' data element with 'from' data element simply. Actually the mapping can be separated as two groups, typed data and non-typed data. However mapping for typed data is implemented by Type component, so only non-typed data is concerned in this method, the mapping for typed data is same as DataMapperConverterFormat.

Overrides:
mapSingleElements in class DataMapperConverterFormat
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

setMapSystemData

public void setMapSystemData(boolean value)
Set the flag whether to map BTT internal dse_ system data (like dse_sessionId, dse_processorId ..). This method is used for Req 26 mutiple project support (set value to false). By default, the value is true, and dse system data is mapped.


mapSingleElement

protected void mapSingleElement(DataElement fromDataElement,
                                DataElement toDataElement,
                                java.lang.String converType,
                                boolean byReference,
                                int append)
                         throws DSEInvalidArgumentException,
                                DSEInvalidRequestException
Description copied from class: DataMapperConverterFormat
Maps the contexts of one operation into the context of another operation.

Overrides:
mapSingleElement in class DataMapperConverterFormat
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011