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.
-
OS2
- Used to set input or output host type to OS/2 platfrom
-
OS390
- Used to set input or output host type to OS/390 platfrom.
-
OS400
- Used to set input or output host type to OS/400 platfrom.
-
UNIX
- Used to set input or output host type to Unix platfrom
-
WIN
- Used to set input or output host type to Dos/Windows platfrom
-
Converter()
- Default public constructor
-
addActionListener(ActionListener)
- Adds listeners of ActionEvent.
-
dispose()
- Cleans up a memory
-
execute(ActInfo)
- This method fills the bean properties according to an atttributes pases with ActInfo structure,
and starts the conversion by calling processConversion() method.
-
execute(ConvertEvent)
- This method implements ConvertListener interface.
-
getInputCodepage()
- Gets inputCodepage property
-
getInputFileName()
- Gets inputFileName property.
-
getInputHostType()
- Gets inputHostType property
-
getInputTextOrientation()
- Gets inputTextOrientation property
-
getInputTextType()
- Gets inputTextType property
-
getNumeralShaping()
- Gets numeralShaping boolean property
-
getOutputCodepage()
- Gets outputCodepage property
-
getOutputFileName()
- Gets outputFileName property.
-
getOutputHostType()
- Gets outputHostType property
-
getOutputTextOrientation()
- Gets outputTextOrientation property
-
getOutputTextType()
- Gets outputTextType property
-
getRecordLength()
- Gets recordLength boolean property
-
isBinMode()
- Gets BinMode boolean property
-
isLamAlef()
- Gets lamAlef boolean property
-
isSymSwap()
- Gets SymSwap boolean property
-
processConversion()
- Performs codepage-to-codepage transformation according to attributes set the bean properties
-
removeActionListener(ActionListener)
- Removes listeners of ActionEvent
-
setBinMode(boolean)
- Sets BinMode boolean property.
-
setInputCodepage(String)
- Sets inputCodepage property
-
setInputFileName(String)
- Sets inputFileName property.
-
setInputHostType(String)
- Sets inputHostType property.
-
setInputTextOrientation(String)
- Sets inputTextOrientation property
The property value should be one of correct values of Session TextOrientation property.
-
setInputTextType(String)
- Sets inputTextType property.
-
setLamAlef(boolean)
- Sets lamAlef boolean property.
-
setNumeralShaping(String)
- Sets numeralShaping boolean property
The property value should be one of correct values of Session NumeralShaping property.
-
setOutputCodepage(String)
- Sets outputCodepage property
-
setOutputFileName(String)
- Sets outputFileName property.
-
setOutputHostType(String)
- Sets outputHostType property
The value should be one of following String constants defined in the class:
UNIX
WIN
OS2
OS390
OS400
-
setOutputTextOrientation(String)
- Sets outputTextOrientation property.
-
setOutputTextType(String)
- Sets outputTextType property.
-
setRecordLength(int)
- Sets recordLength boolean property.
-
setSymSwap(boolean)
- Sets SymSwap boolean property.
UNIX
public static final String UNIX
- Used to set input or output host type to Unix platfrom
WIN
public static final String WIN
- Used to set input or output host type to Dos/Windows platfrom
OS2
public static final String OS2
- Used to set input or output host type to OS/2 platfrom
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
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
Converter
public Converter()
- Default public constructor
setInputTextType
public void setInputTextType(String inputTextType)
- Sets inputTextType property.
The property value should be one of correct values of Session TextType property.
getInputTextType
public String getInputTextType()
- Gets inputTextType property
setOutputTextType
public void setOutputTextType(String outputTextType)
- Sets outputTextType property.
The property value should be one of correct values of Session TextType property.
getOutputTextType
public String getOutputTextType()
- Gets outputTextType property
setInputTextOrientation
public void setInputTextOrientation(String inputTextOrientation)
- Sets inputTextOrientation property
The property value should be one of correct values of Session TextOrientation property.
getInputTextOrientation
public String getInputTextOrientation()
- Gets inputTextOrientation property
setOutputTextOrientation
public void setOutputTextOrientation(String outputTextOrientation)
- Sets outputTextOrientation property.
The property value should be one of correct values of Session TextOrientation property.
getOutputTextOrientation
public String getOutputTextOrientation()
- Gets outputTextOrientation property
setInputFileName
public void setInputFileName(String inputFileName)
- Sets inputFileName property.
getInputFileName
public String getInputFileName()
- Gets inputFileName property.
setOutputFileName
public void setOutputFileName(String outputFileName)
- Sets outputFileName property.
getOutputFileName
public String getOutputFileName()
- Gets outputFileName property.
setInputCodepage
public void setInputCodepage(String inputCodepage)
- Sets inputCodepage property
getInputCodepage
public String getInputCodepage()
- Gets inputCodepage property
setOutputCodepage
public void setOutputCodepage(String outputCodepage)
- Sets outputCodepage property
getOutputCodepage
public String getOutputCodepage()
- Gets outputCodepage property
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
getInputHostType
public String getInputHostType()
- Gets inputHostType property
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
getOutputHostType
public String getOutputHostType()
- Gets outputHostType property
getNumeralShaping
public String getNumeralShaping()
- Gets numeralShaping boolean property
setNumeralShaping
public void setNumeralShaping(String numeralShaping)
- Sets numeralShaping boolean property
The property value should be one of correct values of Session NumeralShaping property.
setLamAlef
public void setLamAlef(boolean lamAlef)
- Sets lamAlef boolean property.
The property enables/disables LamAlef transform for Arabic codepages.
isLamAlef
public boolean isLamAlef()
- Gets lamAlef boolean property
setSymSwap
public void setSymSwap(boolean SymSwap)
- Sets SymSwap boolean property.
The property enables/disables Symmetric Swaping for Arabic and Hebrew codepages.
isSymSwap
public boolean isSymSwap()
- Gets SymSwap boolean property
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.
isBinMode
public boolean isBinMode()
- Gets BinMode boolean property
setRecordLength
public void setRecordLength(int RecordLength)
- Sets recordLength boolean property.
getRecordLength
public int getRecordLength()
- Gets recordLength boolean property
processConversion
public void processConversion()
- Performs codepage-to-codepage transformation according to attributes set the bean properties
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
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
addActionListener
public void addActionListener(ActionListener l)
- Adds listeners of ActionEvent.
The ActionEvent is sent to all listeners when next file conversion is finished.
removeActionListener
public void removeActionListener(ActionListener l)
- Removes listeners of ActionEvent
dispose
public void dispose()
- Cleans up a memory
- Overrides:
- dispose in class HODBean
All Packages Class Hierarchy This Package Previous Next Index