com.ibm.dse.base
Class TypedDataElementFormat

java.lang.Object
  |
  +--com.ibm.dse.base.FormatElement
        |
        +--com.ibm.dse.base.TypedDataElementFormat

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

Fields inherited from class com.ibm.dse.base.FormatElement
dataElementName, 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.
 DataElement unformat(java.lang.String aString, DataElement aDataElement)
          Unformats a typed DataElement using its descriptor.
 
Methods inherited from class com.ibm.dse.base.FormatElement
exceptionInfo, externalizer, extract, format, format, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toStrings, toTags, unformat, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypedDataElementFormat

public TypedDataElementFormat()
Method Detail

format

public java.lang.String format(DataElement aDataElement)
                        throws DSEInvalidArgumentException
Formats a typed DataElement using its descriptor.
Overrides:
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.
Overrides:
initializeFrom in class FormatElement
Parameters:
aTag - com.ibm.dse.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

unformat

public DataElement unformat(java.lang.String aString,
                            DataElement aDataElement)
                     throws DSEInvalidArgumentException
Unformats a typed DataElement using its descriptor.
Overrides:
unformat in class FormatElement
Parameters:
aContext - com.ibm.dse.base.Context
Returns:
com.ibm.dse.base.DataElement
Throws:
DSEInvalidArgumentException - if the dataElement is not typed or if its converter has not been able to unformat the data