IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.base
Class TypedDataElementFormat

java.lang.Object
  extended bycom.ibm.btt.base.FormatElement
      extended bycom.ibm.btt.base.TypedDataElementFormat
All Implemented Interfaces:
Cacheable, Externalizable, java.io.Externalizable, java.io.Serializable

public class TypedDataElementFormat
extends FormatElement

This is a FormatElement to work with typed DataElements. The format and unformat processes are performed by the data element descriptor using its converter for the specified conversionType.

See Also:
Serialized Form

Field Summary
(package private)  java.lang.String conversionType
           
 
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName, externalizer, name
 
Constructor Summary
TypedDataElementFormat()
           
 
Method Summary
 java.lang.String format(DataElement aDataElement)
          Formats a typed DataElement using its descriptor.
 java.lang.String getConversionType()
          Gets the convertionType attribute.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes a TypedDataElementFormat with the Tag attributes.
 void setConversionType(java.lang.String aConversionType)
          Sets the conversionType attribute.
 java.lang.String toString()
          Returns a visual representation of this format.
 Vector toStrings()
          Returns a visual representation of this format element.
 DataElement unformat(java.lang.String aString, DataElement aDataElement)
          Unformats a typed DataElement using its descriptor.
 
Methods inherited from class com.ibm.btt.base.FormatElement
exceptionInfo, externalizer, extract, format, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toTags, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

conversionType

java.lang.String conversionType
Constructor Detail

TypedDataElementFormat

public TypedDataElementFormat()
Method Detail

format

public java.lang.String format(DataElement aDataElement)
                        throws DSEInvalidArgumentException
Formats a typed DataElement using its descriptor.

Specified by:
format in class FormatElement
Parameters:
aDataElement - DataElement
Returns:
String
Throws:
DSEInvalidArgumentException - - If the dataElement is not typed or if its converter has not been able to format the data

getConversionType

public java.lang.String getConversionType()
Gets the convertionType attribute.

Returns:
java.lang.String

initializeFrom

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

Specified by:
initializeFrom in interface Externalizable
Specified by:
initializeFrom in class FormatElement
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
java.lang.Object
Throws:
IOException - - If an I/O Exception has occurred

setConversionType

public void setConversionType(java.lang.String aConversionType)
Sets the conversionType attribute.

Parameters:
aConversionType - java.lang.String

toString

public java.lang.String toString()
Returns a visual representation of this format.

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

toStrings

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

Specified by:
toStrings in interface Externalizable
Overrides:
toStrings in class FormatElement
Returns:
com.ibm.btt.base.Vector

unformat

public DataElement unformat(java.lang.String aString,
                            DataElement aDataElement)
                     throws DSEInvalidArgumentException
Unformats a typed DataElement using its descriptor.

Specified by:
unformat in class FormatElement
Parameters:
aString - java.lang.String
aDataElement - com.ibm.btt.base.DataElement
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidArgumentException - - If the dataElement is not typed or if its converter has not been able to unformat the data

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005