IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class IndexedCollectionFormat

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

This class formats the elements of a IndexedCollection using the same format
 for each one.

See Also:
Serialized Form

Field Summary
protected  int append
          
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName, externalizer, name
 
Constructor Summary
IndexedCollectionFormat()
          
Method Summary
 java.lang.String[] extract(java.lang.String aString)
          
Methods inherited from class com.ibm.btt.base.FormatElement
checkIndexes, exceptionInfo, externalizer, format, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, isNull, readExternal, readExternal, readObject, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toString, toTags, unformat, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

element

public FormatElement element
The formatter element for the child data elements of the indexed collection.


append

protected int append
The append attribute. *

Constructor Detail

IndexedCollectionFormat

public IndexedCollectionFormat()
This is the default constructor used to create an IndexedCollectionFormat object.


IndexedCollectionFormat

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

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

extract

public java.lang.String[] extract(java.lang.String aString)
                           throws DSEInvalidArgumentException
Extracts an element a number of times equal to the timesRepeat attribute.

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

format

public java.lang.String format(DataElement aDataElement)
                        throws DSEInvalidClassException,
                               DSEInvalidRequestException,
                               DSEInvalidArgumentException
Verifies that the passed DataElement is an IndexedCollection and then calls formatIndexedCollection().

Specified by:
format in class FormatElement
Parameters:
aDataElement - com.ibm.btt.base.DataElement
Returns:
java.lang.String
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

formatIndexedCollection

public java.lang.String formatIndexedCollection(IndexedCollection anIndexedCollection)
                                         throws DSEInvalidClassException,
                                                DSEInvalidRequestException,
                                                DSEInvalidArgumentException
Formats the IndexedCollection elements according to the FormatElement in the element attribute.

Parameters:
anIndexedCollection - com.ibm.btt.base.IndexedCollection
Returns:
java.lang.String
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

getAppend

public java.lang.String getAppend()
Returns the value of the append property.

Returns:
java.lang.String - The current value of append

getElement

public FormatElement getElement()
Returns the value of element.

Returns:
com.ibm.btt.base.FormatElement

getTimesRepeat

public int getTimesRepeat()
Returns the value of timesRepeat.

Returns:
int

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException
Initializes an IndexedCollectionFormat 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

reinitialize

public void reinitialize()
This method will call element reinitialize.

Specified by:
reinitialize in interface Cacheable
Overrides:
reinitialize in class FormatElement

setAppend

public void setAppend(java.lang.String aString)
Sets the value of the append property.

Parameters:
aString - java.lang.String - The new value of the property

setElement

public void setElement(FormatElement aFormatElement)
Sets the value of element.

Parameters:
aFormatElement - com.ibm.btt.base.FormatElement

setTimesRepeat

public void setTimesRepeat(int aNumber)
Sets the value of timesRepeat.

Parameters:
aNumber - int

toStrings

public Vector toStrings()
Returns an XML representation of the instance.

Overrides:
toStrings in class FormatElement
Returns:
java.util.Vector

unformat

public DataElement unformat(java.lang.String aString,
                            DataElement aDataElement)
                     throws DSEInvalidRequestException,
                            DSEInvalidArgumentException
Verifies that the passed DataElement is an IndexedCollection and calls unformatIndexedCollection().

Specified by:
unformat in class FormatElement
Parameters:
aString - java.lang.String
aDataElement - com.ibm.btt.base.DataElement
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformatIndexedCollection

public IndexedCollection unformatIndexedCollection(java.lang.String aString,
                                                   IndexedCollection anIndexedCollection)
                                            throws DSEInvalidRequestException,
                                                   DSEInvalidArgumentException
Update the IndexedCollection elements by interpreting the formatted string.

Parameters:
aString - java.lang.String
anIndexedCollection - com.ibm.btt.base.IndexedCollection
Returns:
com.ibm.btt.base.IndexedCollection
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformat

public int unformat(int ndxFrom,
                    int ndxTo,
                    java.lang.String str,
                    DataElement de)
             throws DSEInvalidRequestException,
                    DSEInvalidArgumentException
Verifies that the passed DataElement is an IndexedCollection and calls unformatIndexedCollection().

Overrides:
unformat in class FormatElement
Parameters:
ndxFrom - - the initial index
ndxTo - - the final index
str - String
de - DataElement
Returns:
int
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformatIndexedCollection

protected int unformatIndexedCollection(int ndxFrom,
                                        int ndxTo,
                                        java.lang.String str,
                                        IndexedCollection ic)
                                 throws DSEInvalidRequestException,
                                        DSEInvalidArgumentException
Update the IndexedCollection elements by interpreting the formatted string.

Parameters:
ndxFrom - - the initial index
ndxTo - - the final index
str - String
ic - IndexedCollection
Returns:
int
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

goOn

protected boolean goOn(int ndxFrom,
                       int ndxTo,
                       int counter,
                       java.lang.String str)
return boolean


IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009