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.DataMapperExpressionConverterFormat
All Implemented Interfaces:
Cacheable, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
ConditionalDataMapperFormat

public class DataMapperExpressionConverterFormat
extends DataMapperFormat

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

See Also:
Serialized Form

Nested Class Summary
static interface DataMapperExpressionConverterFormat.ElementMappingFilter
          The interface for filtering the data elements which will be mapped or not.
protected static interface DataMapperExpressionConverterFormat.ICollIterator
          The logic invoked from IndexedCollection iteration during mapping.
protected  class DataMapperExpressionConverterFormat.MapParams
          Parameters related to single map definition.
protected  class DataMapperExpressionConverterFormat.WildcardInvalidArgumentException
          The exception used for invalid wildcard mapping definitions.
 
Field Summary
protected static int APPEND_FALSE
          The false value for the append attribute.
protected static int APPEND_IGNORE
          The ignore value for the append attribute.
protected static int APPEND_TRUE
          The true value for the append attribute.
static java.lang.String ByReference
          The String byReference
static java.lang.String ConversioType
          The String convType
protected  DataMapperExpressionConverterFormat.ElementMappingFilter elementFilter
          Filter the source mapping elements
protected static ExpressionEval expressionEval
          Utility expression execution engine, global static
static java.lang.String From
          The String from
static java.lang.String FromExpression
          The String from expression
static java.lang.Object INTERRUPT
          The constant variable to interrupt current mapping, may return from global functions
protected static java.lang.String SEPERATOR
          The splitter characters for wildcard expression including: "(", ")", ",", "+", "-", "*", "/", "&&", "||", "!
 
Fields inherited from class com.ibm.btt.base.KeyedCollectionFormat
dataElementEmpty, elements
 
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName, externalizer, name, xmlSupport
 
Constructor Summary
DataMapperExpressionConverterFormat()
           
 
Method Summary
 java.lang.Object initializeFrom(Tag aTag)
          Initializes a RecordFormat with the Tag attributes.
protected  void iterateIndexedCollection(IndexedCollection from, IndexedCollection to, DataMapperExpressionConverterFormat.MapParams params, DataMapperExpressionConverterFormat.ICollIterator iterator)
          Iterate Indexed Collection and process the logic defined in ICollIterator.
 void mapContents(Context inputContext, Context outputContext)
          Maps the contexts of a context into another context.
protected  void mapContents(Context inputContext, Context outputContext, DataMapperExpressionConverterFormat.MapParams params)
          Map input context to output context using desired mapping parameters
protected  void mapContextToKColl(Context fromCtx, KeyedCollection to, DataMapperExpressionConverterFormat.MapParams params)
          Iterate to KeyedCollection, map each data from sourceCtx with the same data element name.
protected  void mapDataField(DataField from, DataField to, DataMapperExpressionConverterFormat.MapParams params)
          Mapping between DataFileds.
protected  void mapElement(DataElement from, DataElement to, DataMapperExpressionConverterFormat.MapParams params)
          Mapping between abstract Data Elements such as DataField, KeyedCollection, IndexedCollection, etc.
protected  void mapIndexedCollection(IndexedCollection from, IndexedCollection to, DataMapperExpressionConverterFormat.MapParams params)
          Mapping between IndexedCollections.
protected  void mapKeyedCollection(KeyedCollection from, KeyedCollection to, DataMapperExpressionConverterFormat.MapParams params)
          Mapping between KeyedCollections.
protected  void mapValueToWildcard(Context inputContext, Context outputContext, DataMapperExpressionConverterFormat.MapParams params, java.lang.String targetIteration)
          Support mapping from expression value(constant for instance) to elements in IndexedCollection.
 void setElementFilter(DataMapperExpressionConverterFormat.ElementMappingFilter elementFilter)
          Set filter instance to filter out the source data elements which do not need to map.
 
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, getAttributeValueForXMLFormat, 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

APPEND_IGNORE

protected static final int APPEND_IGNORE
The ignore value for the append attribute.

See Also:
Constant Field Values

APPEND_TRUE

protected static final int APPEND_TRUE
The true value for the append attribute.

See Also:
Constant Field Values

APPEND_FALSE

protected static final int APPEND_FALSE
The false value for the append attribute.

See Also:
Constant Field Values

From

public static final java.lang.String From
The String from

See Also:
Constant Field Values

ConversioType

public static final java.lang.String ConversioType
The String convType

See Also:
Constant Field Values

ByReference

public static final java.lang.String ByReference
The String byReference

See Also:
Constant Field Values

FromExpression

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

See Also:
Constant Field Values

SEPERATOR

protected static final java.lang.String SEPERATOR
The splitter characters for wildcard expression including: "(", ")", ",", "+", "-", "*", "/", "&&", "||", "!=", "!", "===", "==", ">=", "<=", ">", "<"

See Also:
Constant Field Values

elementFilter

protected DataMapperExpressionConverterFormat.ElementMappingFilter elementFilter
Filter the source mapping elements


expressionEval

protected static ExpressionEval expressionEval
Utility expression execution engine, global static


INTERRUPT

public static final java.lang.Object INTERRUPT
The constant variable to interrupt current mapping, may return from global functions

Constructor Detail

DataMapperExpressionConverterFormat

public DataMapperExpressionConverterFormat()
Method Detail

mapContents

public void mapContents(Context inputContext,
                        Context outputContext)
                 throws DSEInvalidArgumentException,
                        DSEInvalidClassException,
                        DSEInvalidRequestException
Description copied from class: DataMapperFormat
Maps the contexts of a context into another context.

Overrides:
mapContents in class DataMapperFormat
Parameters:
inputContext - com.ibm.btt.base.Context
outputContext - com.ibm.btt.base.Context
Throws:
DSEInvalidArgumentException
DSEInvalidClassException
DSEInvalidRequestException

mapContents

protected void mapContents(Context inputContext,
                           Context outputContext,
                           DataMapperExpressionConverterFormat.MapParams params)
                    throws DSEInvalidArgumentException,
                           DSEInvalidRequestException
Map input context to output context using desired mapping parameters

Parameters:
inputContext - input context
outputContext - output context
params - mapping parameters
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapValueToWildcard

protected void mapValueToWildcard(Context inputContext,
                                  Context outputContext,
                                  DataMapperExpressionConverterFormat.MapParams params,
                                  java.lang.String targetIteration)
                           throws DSEInvalidArgumentException,
                                  DSEInvalidRequestException
Support mapping from expression value(constant for instance) to elements in IndexedCollection. For instance, fromExpression="'123'" to="iCollA.*.fieldA".

Parameters:
inputContext - input context
outputContext - output context
params - mapping parameters
targetIteration - iteration string for "to" attribute, in order to replace * with detailed numbers
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapElement

protected void mapElement(DataElement from,
                          DataElement to,
                          DataMapperExpressionConverterFormat.MapParams params)
                   throws DSEInvalidArgumentException,
                          DSEInvalidRequestException
Mapping between abstract Data Elements such as DataField, KeyedCollection, IndexedCollection, etc.

Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapKeyedCollection

protected void mapKeyedCollection(KeyedCollection from,
                                  KeyedCollection to,
                                  DataMapperExpressionConverterFormat.MapParams params)
                           throws DSEInvalidArgumentException,
                                  DSEInvalidRequestException
Mapping between KeyedCollections.

Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapContextToKColl

protected void mapContextToKColl(Context fromCtx,
                                 KeyedCollection to,
                                 DataMapperExpressionConverterFormat.MapParams params)
                          throws DSEInvalidArgumentException,
                                 DSEInvalidRequestException
Iterate to KeyedCollection, map each data from sourceCtx with the same data element name.

Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapIndexedCollection

protected void mapIndexedCollection(IndexedCollection from,
                                    IndexedCollection to,
                                    DataMapperExpressionConverterFormat.MapParams params)
                             throws DSEInvalidArgumentException,
                                    DSEInvalidRequestException
Mapping between IndexedCollections.

Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

iterateIndexedCollection

protected final void iterateIndexedCollection(IndexedCollection from,
                                              IndexedCollection to,
                                              DataMapperExpressionConverterFormat.MapParams params,
                                              DataMapperExpressionConverterFormat.ICollIterator iterator)
                                       throws DSEInvalidArgumentException,
                                              DSEInvalidRequestException
Iterate Indexed Collection and process the logic defined in ICollIterator.
This method will be responsible for handling append attribute whose value can be ignore, true and false.

Parameters:
from - from IndexedCollection
to - to IndexedCollection
params - mapping parameters
iterator - the logic to process during iterate
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapDataField

protected void mapDataField(DataField from,
                            DataField to,
                            DataMapperExpressionConverterFormat.MapParams params)
                     throws DSEInvalidArgumentException,
                            DSEInvalidRequestException
Mapping between DataFileds.

Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException
Description copied from class: RecordFormat
Initializes a RecordFormat with the Tag attributes.

Overrides:
initializeFrom in class RecordFormat
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException

setElementFilter

public void setElementFilter(DataMapperExpressionConverterFormat.ElementMappingFilter elementFilter)
Set filter instance to filter out the source data elements which do not need to map.
One usage scenario is by remote flow to filter out the system elements(dse_*) when processing mapping.

Parameters:
elementFilter - the instance for filtering the data elements which will be mapped or not.

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011