IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class ObjectFormat

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

@ATTR(value={"dataName#String#REQUIRED","key#String#IMPLIED"})
public class ObjectFormat
extends java.lang.Object
implements Externalizable

This class should be used only as elements in a HashtableFormat instance. It simply returns the value of the data element as an Object.

See Also:
Serialized Form

Field Summary
 java.lang.String dataElementName
          Keeps the name of the data element the formatter is managing.
 java.lang.String key
           
 
Constructor Summary
ObjectFormat()
           
 
Method Summary
 Externalizer externalizer()
          Returns the Externalizer assigned to the FormatElement class.
 java.lang.Object format(DataElement aDataElement)
          Formats aDataElement and returns it as an Object.
 java.lang.String getDataElementName()
          Returns the value of dataElementName attribute.
static Externalizer getExternalizer()
          Returns the Externalizer assigned to the FormatElement class.
 java.lang.String getKey()
          Returns the value of key attribute.
 java.lang.String getName()
          Returns the name of the class.
 java.lang.String getTagName()
          Returns the tag associated with the name of the class.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes an ObjectFormat with the Tag attributes.
 void readExternal()
          This method will find the tag that corresponds to the name of THIS entity.
 void readExternal(java.io.ObjectInput s)
          Invokes the object creation from an ObjectInput.
 void removeExternal()
          Removes the object's tags from the XML file in which it is externalized.
 void setDataElementName(java.lang.String aName)
          Sets the value of dataElementName attribute.
 void setKey(java.lang.String newKey)
          Sets the value of key attribute.
 void setName(java.lang.String aName)
          Sets the name of the ObjectFormat instance to aName.
 java.lang.String toString()
          Returns an XML representation of the format element.
 Vector toStrings()
          Returns a Vector containing XML representations of the format elements.
 Vector toTags()
          Returns a Vector with the ObjectFormat instance represented as a Tag.
 DataElement unformat(java.lang.Object aValue, DataElement aDataElement)
          Sets the value of aDataElement with aValue.
 void writeExternal()
          Writes the ObjectFormat instance converted to tags to its XML file.
 void writeExternal(java.io.ObjectOutput s)
          Provides concrete serialization handling for ObjectFormat.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataElementName

public java.lang.String dataElementName
Keeps the name of the data element the formatter is managing.


key

public java.lang.String key
Constructor Detail

ObjectFormat

public ObjectFormat()
Method Detail

externalizer

public Externalizer externalizer()
                          throws java.io.IOException
Returns the Externalizer assigned to the FormatElement class.

Throws:
java.io.IOException

format

public java.lang.Object format(DataElement aDataElement)
Formats aDataElement and returns it as an Object. This method should only be invoked by the format() method of "HashtableFormat" because this method does not return a String.

Parameters:
aDataElement - com.ibm.btt.base.DataElement - The data element within the operation context to be formatted
Returns:
java.lang.Object - The value in the data element aDataElement

getDataElementName

public java.lang.String getDataElementName()
Returns the value of dataElementName attribute.

Returns:
java.lang.String

getExternalizer

public static Externalizer getExternalizer()
Returns the Externalizer assigned to the FormatElement class.

Returns:
com.ibm.btt.base.Externalizer

getKey

public java.lang.String getKey()
Returns the value of key attribute. If the value of this attribute is null this attibute takes the dataElementName attribute value.

Returns:
java.lang.String

getName

public java.lang.String getName()
Returns the name of the class.


getTagName

public java.lang.String getTagName()
Returns the tag associated with the name of the class.

Returns:
java.lang.String

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEException
Initializes an ObjectFormat with the Tag attributes.

Parameters:
aTag - com.ibm.btt.base.Tag
Throws:
java.io.IOException
DSEException

readExternal

public void readExternal()
                  throws java.io.IOException
This method will find the tag that corresponds to the name of THIS entity. Then it will initialize THIS entity with the contents of the tag

Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput s)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Invokes the object creation from an ObjectInput.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
s - java.io.ObjectInput
Throws:
java.io.IOException
java.lang.ClassNotFoundException

removeExternal

public void removeExternal()
                    throws java.io.IOException
Removes the object's tags from the XML file in which it is externalized.

Throws:
java.io.IOException

setDataElementName

public void setDataElementName(java.lang.String aName)
Sets the value of dataElementName attribute.

Parameters:
aName - java.lang.String

setKey

public void setKey(java.lang.String newKey)
Sets the value of key attribute.

Parameters:
newKey - java.lang.String

setName

public void setName(java.lang.String aName)
Sets the name of the ObjectFormat instance to aName.

Parameters:
aName - java.lang.String

toString

public java.lang.String toString()
Returns an XML representation of the format element.

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

toStrings

public Vector toStrings()
Returns a Vector containing XML representations of the format elements.


toTags

public Vector toTags()
              throws java.io.IOException
Returns a Vector with the ObjectFormat instance represented as a Tag.

Throws:
java.io.IOException

unformat

public DataElement unformat(java.lang.Object aValue,
                            DataElement aDataElement)
                     throws DSEInvalidArgumentException
Sets the value of aDataElement with aValue. This method should only be invoked from the unformat() method of HashtableFormat.

Parameters:
aValue - java.lang.Object
aDataElement - com.ibm.btt.base.DataElement
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidArgumentException

writeExternal

public void writeExternal()
                   throws java.io.IOException
Writes the ObjectFormat instance converted to tags to its XML file.

Throws:
java.io.IOException

writeExternal

public void writeExternal(java.io.ObjectOutput s)
                   throws java.io.IOException
Provides concrete serialization handling for ObjectFormat.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
s - java.io.ObjectOutput
Throws:
java.io.IOException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009