All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eNetwork.beans.HOD.cpc.Converter

java.lang.Object
   |
   +----com.ibm.eNetwork.beans.HOD.HODBean
           |
           +----com.ibm.eNetwork.beans.HOD.cpc.Converter

public class Converter
extends HODBean
implements ConvertListener
The Converter bean implements codepage-to-codepage conversion. For BIDI (Arabic and Hebrew) languages, it performs BIDI specific transformation also, including logical-to-implicit transform, reversing and Lam-Alef processing (for Arabic only). The Converter bean receives ConvertEvent event with information about of a file requires conversion. The conversion properties are passed into ActInfo structure. When conversion is finished, the Converter bean sends ActionEvent to inform that it is ready to next action. Any codepage should be declared into CodePage class, and their legal CharToByte... and ByteToChar... converters should be present into com.ibm.eNetwork.HOD.converters package. There are two ways for calling method to set conversion attributes: to create an instanse of ActInfo class contains required attributes and to send ConvertEvent with the instance as argument, or set properties by bean setters and send ConvertEvent with null argument.


Variable Index

 o OS2
Used to set input or output host type to OS/2 platfrom
 o OS390
Used to set input or output host type to OS/390 platfrom.
 o OS400
Used to set input or output host type to OS/400 platfrom.
 o UNIX
Used to set input or output host type to Unix platfrom
 o WIN
Used to set input or output host type to Dos/Windows platfrom

Constructor Index

 o Converter()
Default public constructor

Method Index

 o addActionListener(ActionListener)
Adds listeners of ActionEvent.
 o dispose()
Cleans up a memory
 o execute(ActInfo)
This method fills the bean properties according to an atttributes pases with ActInfo structure, and starts the conversion by calling processConversion() method.
 o execute(ConvertEvent)
This method implements ConvertListener interface.
 o getInputCodepage()
Gets inputCodepage property
 o getInputFileName()
Gets inputFileName property.
 o getInputHostType()
Gets inputHostType property
 o getInputTextOrientation()
Gets inputTextOrientation property
 o getInputTextType()
Gets inputTextType property
 o getNumeralShaping()
Gets numeralShaping boolean property
 o getOutputCodepage()
Gets outputCodepage property
 o getOutputFileName()
Gets outputFileName property.
 o getOutputHostType()
Gets outputHostType property
 o getOutputTextOrientation()
Gets outputTextOrientation property
 o getOutputTextType()
Gets outputTextType property
 o getRecordLength()
Gets recordLength boolean property
 o isBinMode()
Gets BinMode boolean property
 o isLamAlef()
Gets lamAlef boolean property
 o isSymSwap()
Gets SymSwap boolean property
 o processConversion()
Performs codepage-to-codepage transformation according to attributes set the bean properties
 o removeActionListener(ActionListener)
Removes listeners of ActionEvent
 o setBinMode(boolean)
Sets BinMode boolean property.
 o setInputCodepage(String)
Sets inputCodepage property
 o setInputFileName(String)
Sets inputFileName property.
 o setInputHostType(String)
Sets inputHostType property.
 o setInputTextOrientation(String)
Sets inputTextOrientation property The property value should be one of correct values of Session TextOrientation property.
 o setInputTextType(String)
Sets inputTextType property.
 o setLamAlef(boolean)
Sets lamAlef boolean property.
 o setNumeralShaping(String)
Sets numeralShaping boolean property The property value should be one of correct values of Session NumeralShaping property.
 o setOutputCodepage(String)
Sets outputCodepage property
 o setOutputFileName(String)
Sets outputFileName property.
 o setOutputHostType(String)
Sets outputHostType property The value should be one of following String constants defined in the class: UNIX WIN OS2 OS390 OS400
 o setOutputTextOrientation(String)
Sets outputTextOrientation property.
 o setOutputTextType(String)
Sets outputTextType property.
 o setRecordLength(int)
Sets recordLength boolean property.
 o setSymSwap(boolean)
Sets SymSwap boolean property.

Variables

 o UNIX
 public static final String UNIX
Used to set input or output host type to Unix platfrom

 o WIN
 public static final String WIN
Used to set input or output host type to Dos/Windows platfrom

 o OS2
 public static final String OS2
Used to set input or output host type to OS/2 platfrom

 o OS390
 public static final String OS390
Used to set input or output host type to OS/390 platfrom. For the platform, only files with fixed record length are processed properly

 o OS400
 public static final String OS400
Used to set input or output host type to OS/400 platfrom. For the platform, only files with fixed record length are processed properly

Constructors

 o Converter
 public Converter()
Default public constructor

Methods

 o setInputTextType
 public void setInputTextType(String inputTextType)
Sets inputTextType property. The property value should be one of correct values of Session TextType property.

 o getInputTextType
 public String getInputTextType()
Gets inputTextType property

 o setOutputTextType
 public void setOutputTextType(String outputTextType)
Sets outputTextType property. The property value should be one of correct values of Session TextType property.

 o getOutputTextType
 public String getOutputTextType()
Gets outputTextType property

 o setInputTextOrientation
 public void setInputTextOrientation(String inputTextOrientation)
Sets inputTextOrientation property The property value should be one of correct values of Session TextOrientation property.

 o getInputTextOrientation
 public String getInputTextOrientation()
Gets inputTextOrientation property

 o setOutputTextOrientation
 public void setOutputTextOrientation(String outputTextOrientation)
Sets outputTextOrientation property. The property value should be one of correct values of Session TextOrientation property.

 o getOutputTextOrientation
 public String getOutputTextOrientation()
Gets outputTextOrientation property

 o setInputFileName
 public void setInputFileName(String inputFileName)
Sets inputFileName property.

 o getInputFileName
 public String getInputFileName()
Gets inputFileName property.

 o setOutputFileName
 public void setOutputFileName(String outputFileName)
Sets outputFileName property.

 o getOutputFileName
 public String getOutputFileName()
Gets outputFileName property.

 o setInputCodepage
 public void setInputCodepage(String inputCodepage)
Sets inputCodepage property

 o getInputCodepage
 public String getInputCodepage()
Gets inputCodepage property

 o setOutputCodepage
 public void setOutputCodepage(String outputCodepage)
Sets outputCodepage property

 o getOutputCodepage
 public String getOutputCodepage()
Gets outputCodepage property

 o setInputHostType
 public void setInputHostType(String inputHostType)
Sets inputHostType property. The value should be one of following String constants defined in the class: UNIX WIN OS2 OS390 OS400

 o getInputHostType
 public String getInputHostType()
Gets inputHostType property

 o setOutputHostType
 public void setOutputHostType(String outputHostType)
Sets outputHostType property The value should be one of following String constants defined in the class: UNIX WIN OS2 OS390 OS400

 o getOutputHostType
 public String getOutputHostType()
Gets outputHostType property

 o getNumeralShaping
 public String getNumeralShaping()
Gets numeralShaping boolean property

 o setNumeralShaping
 public void setNumeralShaping(String numeralShaping)
Sets numeralShaping boolean property The property value should be one of correct values of Session NumeralShaping property.

 o setLamAlef
 public void setLamAlef(boolean lamAlef)
Sets lamAlef boolean property. The property enables/disables LamAlef transform for Arabic codepages.

 o isLamAlef
 public boolean isLamAlef()
Gets lamAlef boolean property

 o setSymSwap
 public void setSymSwap(boolean SymSwap)
Sets SymSwap boolean property. The property enables/disables Symmetric Swaping for Arabic and Hebrew codepages.

 o isSymSwap
 public boolean isSymSwap()
Gets SymSwap boolean property

 o setBinMode
 public void setBinMode(boolean BinMode)
Sets BinMode boolean property. If the property is set to TRUE, the Converter converts end-of-line sign according to input and output host types. For OS/390 and OS/400, only fixed record length file processing is available. The recordLength property is set to use the record length.

 o isBinMode
 public boolean isBinMode()
Gets BinMode boolean property

 o setRecordLength
 public void setRecordLength(int RecordLength)
Sets recordLength boolean property.

 o getRecordLength
 public int getRecordLength()
Gets recordLength boolean property

 o processConversion
 public void processConversion()
Performs codepage-to-codepage transformation according to attributes set the bean properties

 o execute
 public synchronized void execute(ConvertEvent e)
This method implements ConvertListener interface. It calls execute(ActInfo a) method and sends ActionEvent to inform the conversion finishing

Parameters:
e - an instance of ConvertEvent
See Also:
ConvertEvent, ActInfo
 o execute
 public synchronized void execute(ActInfo a)
This method fills the bean properties according to an atttributes pases with ActInfo structure, and starts the conversion by calling processConversion() method. See ActInfo for mode information.

Parameters:
a - an instance of ActInfo
 o addActionListener
 public void addActionListener(ActionListener l)
Adds listeners of ActionEvent. The ActionEvent is sent to all listeners when next file conversion is finished.

 o removeActionListener
 public void removeActionListener(ActionListener l)
Removes listeners of ActionEvent

 o dispose
 public void dispose()
Cleans up a memory

Overrides:
dispose in class HODBean

All Packages  Class Hierarchy  This Package  Previous  Next  Index