IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.formatter.client
Class FormatElement

java.lang.Object
  extended bycom.ibm.btt.formatter.client.FormatElement

public class FormatElement
extends java.lang.Object

This class is the facade of CHAFormatterService, which uses exteral defined proxy to

interact with remote CHAFormatterService instance.


Field Summary
static java.util.ResourceBundle exceptionBundle
          Defines exception resource bundle.
 java.lang.String name
          The format name.
static java.util.ResourceBundle traceBundle
          Defines trace resource bundle.
 
Constructor Summary
FormatElement()
          This constructor creates a Trace object.
 
Method Summary
 java.lang.String format(Context aContext)
          Formats a context.
 java.lang.String format(DataElement aDataElement)
          Formats a DataElement.
 Hashtable formatHashtable(Context aContext)
          Formats a context by a given hashtable format.
 Hashtable formatHashtable(KeyedCollection aKeyedCollection)
          Formats a KeyedCollection by a given hashtable format.
static java.lang.String getExceptionMsg(java.lang.String key)
          Gets exception message from resource bundle.
 java.lang.String getName()
          Returns the value of format name.
static java.lang.String getTraceMsg(java.lang.String key)
          Gets trace message from resource bundle.
 void mapContents(Context inputContext, Context outputContext)
          Maps two contexts.
 void setName(java.lang.String aName)
          Sets format name.
 DataElement unformat(java.lang.String aString, Context aContext)
          Unformats a context by a given format.
 DataElement unformat(java.lang.String aString, DataElement aDataElement)
          Unformats a data element.
 DataElement unformatHashtable(Hashtable aHashtable, Context aContext)
          Unformats a context by a given hashtable format.
 DataElement unformatHashtable(Hashtable aHashtable, KeyedCollection aKeyedCollection)
          Unformats a KeyedCollection by a given hashtable format.
 void unformatIndexedCollection(Vector aVectorOfHashtables, Context aContext)
          Unformats a context by a given hashtable IndexedCollection format.
 IndexedCollection unformatIndexedCollection(Vector aVector, IndexedCollection anIndexedCollection)
          Unformats an IndexedCollection by a given hashtable IndexedCollection format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The format name.


traceBundle

public static java.util.ResourceBundle traceBundle
Defines trace resource bundle.


exceptionBundle

public static java.util.ResourceBundle exceptionBundle
Defines exception resource bundle.

Constructor Detail

FormatElement

public FormatElement()
This constructor creates a Trace object.

Method Detail

setName

public void setName(java.lang.String aName)
Sets format name.


getName

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

Returns:
java.lang.String

format

public java.lang.String format(Context aContext)
                        throws DSEInvalidClassException,
                               DSEInvalidRequestException,
                               DSEInvalidArgumentException
Formats a context.

Parameters:
aContext - com.ibm.dse.base.Context
Returns:
java.lang.String
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

format

public java.lang.String format(DataElement aDataElement)
                        throws DSEInvalidClassException,
                               DSEInvalidRequestException,
                               DSEInvalidArgumentException
Formats a DataElement.

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

unformat

public DataElement unformat(java.lang.String aString,
                            Context aContext)
                     throws DSEInvalidRequestException,
                            DSEInvalidArgumentException
Unformats a context by a given format.

Parameters:
aContext - com.ibm.btt.base.Context
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformat

public DataElement unformat(java.lang.String aString,
                            DataElement aDataElement)
                     throws DSEInvalidRequestException,
                            DSEInvalidArgumentException
Unformats a data element.

Parameters:
aDataElement - com.ibm.btt.base.DataElement
aString - java.lang.String
Returns:
com.ibm.btt.base.DataElememt
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

mapContents

public void mapContents(Context inputContext,
                        Context outputContext)
                 throws DSEInvalidArgumentException,
                        DSEInvalidClassException,
                        DSEInvalidRequestException
Maps two contexts.

Parameters:
inputContext - com.ibm.dse.base.Context
outputContext - com.ibm.dse.base.Context
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

formatHashtable

public Hashtable formatHashtable(Context aContext)
                          throws DSEInvalidRequestException,
                                 DSEInvalidClassException,
                                 DSEInvalidArgumentException
Formats a context by a given hashtable format.

Parameters:
aContext - com.ibm.btt.base.aContext
Returns:
java.util.Hashtable
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

formatHashtable

public Hashtable formatHashtable(KeyedCollection aKeyedCollection)
                          throws DSEInvalidRequestException,
                                 DSEInvalidClassException,
                                 DSEInvalidArgumentException
Formats a KeyedCollection by a given hashtable format.

Parameters:
aKeyedCollection - com.ibm.btt.base.KeyedCollection
Returns:
java.util.Hashtable
Throws:
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

unformatHashtable

public DataElement unformatHashtable(Hashtable aHashtable,
                                     Context aContext)
                              throws DSEInvalidArgumentException,
                                     DSEInvalidRequestException
Unformats a context by a given hashtable format.

Parameters:
aContext - com.ibm.btt.base.Context
aHashtable - com.ibm.btt.base.Hashtable
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformatHashtable

public DataElement unformatHashtable(Hashtable aHashtable,
                                     KeyedCollection aKeyedCollection)
                              throws DSEInvalidRequestException,
                                     DSEInvalidArgumentException
Unformats a KeyedCollection by a given hashtable format.

Parameters:
aKeyedCollection - com.ibm.btt.base.KeyedCollection
aHashtable - com.ibm.btt.base.Hashtable
Returns:
com.ibm.btt.base.DataElement
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

unformatIndexedCollection

public void unformatIndexedCollection(Vector aVectorOfHashtables,
                                      Context aContext)
                               throws java.io.IOException,
                                      DSEInvalidRequestException,
                                      DSEInvalidArgumentException,
                                      DSEObjectNotFoundException
Unformats a context by a given hashtable IndexedCollection format.

Parameters:
aContext - com.ibm.btt.base.Context
aVectorOfHashtables - com.ibm.btt.base.Vector
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
DSEObjectNotFoundException
java.io.IOException

unformatIndexedCollection

public IndexedCollection unformatIndexedCollection(Vector aVector,
                                                   IndexedCollection anIndexedCollection)
                                            throws DSEInvalidRequestException,
                                                   DSEInvalidArgumentException,
                                                   DSEObjectNotFoundException,
                                                   java.io.IOException
Unformats an IndexedCollection by a given hashtable IndexedCollection format.

Parameters:
anIndexedCollection - com.ibm.btt.base.IndexedCollection
aVector - com.ibm.btt.base.Vector
Returns:
com.ibm.btt.baes.IndexedCollection
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
DSEObjectNotFoundException
java.io.IOException

getExceptionMsg

public static java.lang.String getExceptionMsg(java.lang.String key)
Gets exception message from resource bundle.

Parameters:
key - java.lang.String
Returns:
java.lang.String

getTraceMsg

public static java.lang.String getTraceMsg(java.lang.String key)
Gets trace message from resource bundle.

Parameters:
key - java.lang.String
Returns:
java.lang.String

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005