IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class RecordFormat

java.lang.Object
  extended by com.ibm.btt.base.FormatElement
      extended by com.ibm.btt.base.KeyedCollectionFormat
          extended by com.ibm.btt.base.RecordFormat
All Implemented Interfaces:
Cacheable, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
DataMapperFormat, DynamicRecordFormat, JSONFormat, XMLFormat

@EXTEND(value="NOT")
public class RecordFormat
extends KeyedCollectionFormat

This class is an implementation of the KeyedCollectionFormat.

See Also:
Serialized Form

Field Summary
 
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
RecordFormat()
          RecordFormat default constructor.
RecordFormat(java.lang.String aName)
          Constructor used by the externalizer.
 
Method Summary
 java.lang.String[] extract(java.lang.String aString)
          Extract a String calling the extract methods of these elements.
 java.lang.String formatContext(Context aContext)
          This method performs the format seeking the elements to format around the context tree of the context passed as parameter.
 java.lang.String formatKeyedCollection(KeyedCollection aKeyedCollection)
          This method performs the format seeking the elements to format around the keyedCollection passed as parameter.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes a RecordFormat with the Tag attributes.
protected  java.lang.Object obtainDataElement(FormatElement aFormatElement, Context aContext)
          Seeks the element which will format aFormatElement.
protected  DataElement obtainDataElement(FormatElement aFormatElement, KeyedCollection aKeyedCollection)
          Seeks the element which will format aFormatElement.
 java.lang.String toString()
          Returns a visual representation of this format element.
 Vector toStrings()
          Returns a visual representation of this format element.
 int unformat(int ndxFrom, int ndxTo, java.lang.String aString, Context ctx)
          This method performs the unformat seeking the elements to format around the context tree of the ctx passed as parameter.
 int unformat(int ndxFrom, int ndxTo, java.lang.String aString, DataElement kc)
          This method performs the unformat seeking the elements to format around the kc passed as parameter.
 DataElement unformatContext(java.lang.String aString, Context aContext)
          This method performs the unformat seeking the elements to format around the context tree of the context passed as parameter.
 KeyedCollection unformatKeyedCollection(java.lang.String aString, KeyedCollection aKeyedCollection)
          This method performs the unformat seeking the elements to format around the keyedCollection passed as parameter.
 
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
 

Constructor Detail

RecordFormat

public RecordFormat()
RecordFormat default constructor.


RecordFormat

public RecordFormat(java.lang.String aName)
             throws java.io.IOException
Constructor used by the externalizer.

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

extract

public java.lang.String[] extract(java.lang.String aString)
                           throws DSEInvalidArgumentException
Extract a String calling the extract methods of these elements. and taking the substring in which they are interested.

Overrides:
extract in class FormatElement
Parameters:
aString - String
Returns:
String[]
Throws:
DSEInvalidArgumentException

formatContext

public java.lang.String formatContext(Context aContext)
                               throws DSEInvalidClassException,
                                      DSEInvalidRequestException,
                                      DSEInvalidArgumentException
This method performs the format seeking the elements to format around the context tree of the context passed as parameter.

Specified by:
formatContext in class KeyedCollectionFormat
Parameters:
aContext - com.ibm.btt.base.Context
Returns:
java.lang.String
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

formatKeyedCollection

public java.lang.String formatKeyedCollection(KeyedCollection aKeyedCollection)
                                       throws DSEInvalidClassException,
                                              DSEInvalidRequestException,
                                              DSEInvalidArgumentException
This method performs the format seeking the elements to format around the keyedCollection passed as parameter.

Specified by:
formatKeyedCollection in class KeyedCollectionFormat
Parameters:
aKeyedCollection - com.ibm.btt.base.KeyedCollection
Returns:
java.lang.String
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

initializeFrom

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

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

obtainDataElement

protected java.lang.Object obtainDataElement(FormatElement aFormatElement,
                                             Context aContext)
                                      throws DSEInvalidRequestException
Seeks the element which will format aFormatElement. Particular cases are handled.

Parameters:
aFormatElement - com.ibm.btt.base.FormatElement
aContext - com.ibm.btt.base.Context
Returns:
java.lang.Object
Throws:
com.ibm.btt.base.DSEInvalidRequestException.
DSEInvalidRequestException

obtainDataElement

protected DataElement obtainDataElement(FormatElement aFormatElement,
                                        KeyedCollection aKeyedCollection)
                                 throws DSEInvalidRequestException
Seeks the element which will format aFormatElement. Particular cases are handled.

Parameters:
aFormatElement - com.ibm.btt.base.FormatElement
aKeyedCollection - com.ibm.btt.base.KeyedCollection
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException

toString

public java.lang.String toString()
Description copied from class: FormatElement
Returns a visual representation of this format element.

Overrides:
toString in class FormatElement
Returns:
java.lang.String

toStrings

public Vector toStrings()
Description copied from class: FormatElement
Returns a visual representation of this format element.

Overrides:
toStrings in class FormatElement
Returns:
Tag[]

unformatContext

public DataElement unformatContext(java.lang.String aString,
                                   Context aContext)
                            throws DSEInvalidRequestException,
                                   DSEInvalidArgumentException
This method performs the unformat seeking the elements to format around the context tree of the context passed as parameter.

Specified by:
unformatContext in class KeyedCollectionFormat
Parameters:
aString - java.lang.String
aContext - com.ibm.btt.base.Context
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformatKeyedCollection

public KeyedCollection unformatKeyedCollection(java.lang.String aString,
                                               KeyedCollection aKeyedCollection)
                                        throws DSEInvalidRequestException,
                                               DSEInvalidArgumentException
This method performs the unformat seeking the elements to format around the keyedCollection passed as parameter.

Specified by:
unformatKeyedCollection in class KeyedCollectionFormat
Parameters:
aString - java.lang.String
aKeyedCollection - com.ibm.btt.base.KeyedCollection
Returns:
com.ibm.btt.base.KeyedCollection
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformat

public int unformat(int ndxFrom,
                    int ndxTo,
                    java.lang.String aString,
                    DataElement kc)
             throws DSEInvalidRequestException,
                    DSEInvalidArgumentException
This method performs the unformat seeking the elements to format around the kc passed as parameter.

Overrides:
unformat in class KeyedCollectionFormat
Parameters:
ndxFrom - - the initial index
ndxTo - - the final index
aString - java.lang.String
kc - com.ibm.btt.base.KeyedCollection
Returns:
int
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformat

public int unformat(int ndxFrom,
                    int ndxTo,
                    java.lang.String aString,
                    Context ctx)
             throws DSEInvalidRequestException,
                    DSEInvalidArgumentException
This method performs the unformat seeking the elements to format around the context tree of the ctx passed as parameter.

Overrides:
unformat in class KeyedCollectionFormat
Parameters:
ndxFrom - - the initial index
ndxTo - - the final index
aString - java.lang.String
ctx - com.ibm.btt.base.Context
Returns:
int
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010