com.ibm.as400.access
Class BidiConversionProperties

java.lang.Object
  |
  +--com.ibm.as400.access.BidiConversionProperties
All Implemented Interfaces:
Serializable

public class BidiConversionProperties
extends Object
implements Serializable

The BidiConversionProperties class provides a set of properties that can be used to control the conversion of character set data.

See Also:
Serialized Form

Constructor Summary
BidiConversionProperties()
          Constructs a BidiConversionProperties object.
 
Method Summary
 int getBidiStringType()
          Gets the bidi string type.
 int[] getDestinationToSourceMap()
          Output value: destination-to-source map from the last transform with dstToSrcMapRequired specified; if this option was not specified, the content of dstToSrcMap should be ignored.
 int getInputCount()
          Output value: number of characters processed in the source data by the last transform.
 int getOutputCount()
          Output value: number of characters written in the destination data by the last transform
 byte[] getPropertyMap()
          Output value: property map from the last transform with propertyMapRequired specified; if this option was not specified, the content of propertyMap should be ignored.
 int[] getSourceToDestinationMap()
          Output value: source-to-destination map from the last transform with srcToDstMapRequired specified; if this option was not specified, the content of srcToDstMap should be ignored.
 boolean isBidiCreateDestinationToSourceMapping()
          Indicates the value of the bidi create a destination to source mapping property.
 boolean isBidiCreatePropertyMap()
          Indicates the value of the bidi create a property map property.
 boolean isBidiCreateSourceToDestinationMapping()
          Indicates the value of the bidi create a source to destination mapping property.
 boolean isBidiDestinationRequired()
          Indicates the value of the bidi destination required property.
 boolean isBidiImplicitReordering()
          Indicates the value of the bidi implicit LTR-RTL reordering property.
 boolean isBidiInsertDirectionalMarks()
          Indicates the value of the bidi insert directional marks property.
 boolean isBidiNumericOrderingRoundTrip()
          Indicates the value of the bidi numeric ordering round trip property.
 boolean isBidiRemoveDirectionalMarks()
          Indicates the value of the bidi remove directional marks property.
 boolean isBidiRemoveMarksOnImplicitToVisual()
          Indicates the value of the bidi remove the directional marks only when transforming from logical to visual property.
 boolean isBidiWindowCompatibility()
          Indicates the value of the bidi window compatibility property.
 boolean isBidiWordBreak()
          Indicates the value of the bidi consider white space to always follow base orientation property.
 void setBidiCreateDestinationToSourceMapping(boolean dstToSrcMapRequired)
          Sets the create a destination to source mapping property.
 void setBidiCreatePropertyMap(boolean propertyMapRequired)
          Sets the create a property map property.
 void setBidiCreateSourceToDestinationMapping(boolean srcToDstMapRequired)
          Sets the create a source to destination mapping property.
 void setBidiDestinationRequired(boolean destinationRequired)
          Sets the bidi destination required property.
 void setBidiImplicitReordering(boolean bidiImplicitReordering)
          Sets the bidi implicit LTR-RTL reordering property.
 void setBidiInsertDirectionalMarks(boolean bidiInsertDirectionalMarks)
          Sets the bidi insert directional marks property.
 void setBidiNumericOrderingRoundTrip(boolean bidiNumericOrderingRoundTrip)
          Sets the bidi numeric ordering round trip property.
 void setBidiRemoveDirectionalMarks(boolean bidiRemoveDirectionalMarks)
          Sets the bidi remove directional marks property.
 void setBidiRemoveMarksOnImplicitToVisual(boolean removeMarks)
          Remove the directional marks only when transforming from logical to visual.
 void setBidiStringType(int bidiStringType)
          Sets the bidi string type, as defined by the CDRA (Character Data Representataion Architecture).
 void setBidiWindowCompatibility(boolean bidiWindowCompatibility)
          Sets the bidi window compatibility property.
 void setBidiWordBreak(boolean wordBreak)
          Sets the bidi consider white space to always follow base orientation property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BidiConversionProperties

public BidiConversionProperties()
Constructs a BidiConversionProperties object.

Method Detail

setBidiStringType

public void setBidiStringType(int bidiStringType)
Sets the bidi string type, as defined by the CDRA (Character Data Representataion Architecture). See BidiStringType for more information and valid values. This option is set to BidiStringType.DEFAULT by default.

Parameters:
bidiStringType - The bidi string type.

getBidiStringType

public int getBidiStringType()
Gets the bidi string type.

Returns:
The bidi string type.

setBidiRemoveMarksOnImplicitToVisual

public void setBidiRemoveMarksOnImplicitToVisual(boolean removeMarks)
Remove the directional marks only when transforming from logical to visual.

Parameters:
removeMarks - true to remove the directional marks only when transforming from logical to visual; false otherwise.

isBidiRemoveMarksOnImplicitToVisual

public boolean isBidiRemoveMarksOnImplicitToVisual()
Indicates the value of the bidi remove the directional marks only when transforming from logical to visual property.

Returns:
true if the remove the directional marks only when transforming from logical to visual property is enabled; false otherwise.

setBidiImplicitReordering

public void setBidiImplicitReordering(boolean bidiImplicitReordering)
Sets the bidi implicit LTR-RTL reordering property. This property is true by default.

Parameters:
bidiImplicitReordering - true to use the bidi implicit reordering; false otherwise.

isBidiImplicitReordering

public boolean isBidiImplicitReordering()
Indicates the value of the bidi implicit LTR-RTL reordering property.

Returns:
true if the bidi implicit LTR-RTL reordering property is enabled; false otherwise.

setBidiNumericOrderingRoundTrip

public void setBidiNumericOrderingRoundTrip(boolean bidiNumericOrderingRoundTrip)
Sets the bidi numeric ordering round trip property. This property is false by default.

Parameters:
bidiNumericOrderingRoundTrip - true to use the bidi numeric ordering round trip property; false otherwise.

isBidiNumericOrderingRoundTrip

public boolean isBidiNumericOrderingRoundTrip()
Indicates the value of the bidi numeric ordering round trip property.

Returns:
true if the bidi numeric ordering round trip property is enabled; false otherwise.

setBidiWindowCompatibility

public void setBidiWindowCompatibility(boolean bidiWindowCompatibility)
Sets the bidi window compatibility property. This property is false by default.

If this option is true, the reordering algorithm is modified to perform more closely like Windows. In particular, logical string "12ABC" in LTR orientation (where ABC represent Arabic or Hebrew letters) is reordered as "CBA12" instead of "12CBA". Also, logical string "abc 123 45" (where all digits represent Hindi numbers) is reordered as "abc 123 45" instead of "abc 45 123".

Parameters:
bidiWindowCompatibility - true to use the window compatibility property; false otherwise.

isBidiWindowCompatibility

public boolean isBidiWindowCompatibility()
Indicates the value of the bidi window compatibility property.

Returns:
true if the bidi window compatibility property is enabled; false otherwise.

setBidiInsertDirectionalMarks

public void setBidiInsertDirectionalMarks(boolean bidiInsertDirectionalMarks)
Sets the bidi insert directional marks property. This property is false by default. Insert directional marks when going from visual to implicit to guarantee correct roundtrip back to visual.

Parameters:
bidiInsertDirectionalMarks - true to use the insert directional marks property; false otherwise.

isBidiInsertDirectionalMarks

public boolean isBidiInsertDirectionalMarks()
Indicates the value of the bidi insert directional marks property.

Returns:
true if the bidi insert directional marks property is enabled; false otherwise.

setBidiRemoveDirectionalMarks

public void setBidiRemoveDirectionalMarks(boolean bidiRemoveDirectionalMarks)
Sets the bidi remove directional marks property. This property is false by default. Remove directional marks when going from implict to visual.

Parameters:
bidiRemoveDirectionalMarks - true to use the remove directional marks property; false otherwise.

isBidiRemoveDirectionalMarks

public boolean isBidiRemoveDirectionalMarks()
Indicates the value of the bidi remove directional marks property.

Returns:
true if the bidi remove directional marks property is enabled; false otherwise.

setBidiWordBreak

public void setBidiWordBreak(boolean wordBreak)
Sets the bidi consider white space to always follow base orientation property. This property is false by default.

Parameters:
wordBreak - true to consider white space to always follow base orientation; false otherwise.

isBidiWordBreak

public boolean isBidiWordBreak()
Indicates the value of the bidi consider white space to always follow base orientation property.

Returns:
true if the bidi consider white space to always follow base orientation property is enabled; false otherwise.

setBidiDestinationRequired

public void setBidiDestinationRequired(boolean destinationRequired)
Sets the bidi destination required property. This property is true by default.

Parameters:
destinationRequired - true if the destination is required; false otherwise.

isBidiDestinationRequired

public boolean isBidiDestinationRequired()
Indicates the value of the bidi destination required property.

Returns:
true if the bidi destination required property is enabled; false otherwise.

setBidiCreateSourceToDestinationMapping

public void setBidiCreateSourceToDestinationMapping(boolean srcToDstMapRequired)
Sets the create a source to destination mapping property. This property is false by default.

Parameters:
srcToDstMapRequired - true to use the bidi create a source to destination mapping property; false otherwise.

isBidiCreateSourceToDestinationMapping

public boolean isBidiCreateSourceToDestinationMapping()
Indicates the value of the bidi create a source to destination mapping property.

Returns:
true if the bidi create a source to destination mapping property is enabled; false otherwise.

setBidiCreateDestinationToSourceMapping

public void setBidiCreateDestinationToSourceMapping(boolean dstToSrcMapRequired)
Sets the create a destination to source mapping property. This property is false by default.

Parameters:
dstToSrcMapRequired - true to use the create a destination to source mapping property; false otherwise.

isBidiCreateDestinationToSourceMapping

public boolean isBidiCreateDestinationToSourceMapping()
Indicates the value of the bidi create a destination to source mapping property.

Returns:
true if the bidi create a destination to source mapping property is enabled; false otherwise.

setBidiCreatePropertyMap

public void setBidiCreatePropertyMap(boolean propertyMapRequired)
Sets the create a property map property. This property is false by default.

Parameters:
propertyMapRequired - true to use the create a property map property; false otherwise.

isBidiCreatePropertyMap

public boolean isBidiCreatePropertyMap()
Indicates the value of the bidi create a property map property.

Returns:
true if the bidi create a property map property is enabled; false otherwise.

getInputCount

public int getInputCount()
Output value: number of characters processed in the source data by the last transform.


getOutputCount

public int getOutputCount()
Output value: number of characters written in the destination data by the last transform


getSourceToDestinationMap

public int[] getSourceToDestinationMap()
Output value: source-to-destination map from the last transform with srcToDstMapRequired specified; if this option was not specified, the content of srcToDstMap should be ignored.

If when starting a transformation this field refers to a large enough array of integers, this array will be re-used to put the new map. Otherwise a new array will be created.

This map has a number for each character processed in the source data by the last transform. This number is the index of where this character is moved in the character array of the destination BidiText. If the removeMarkers option was specified and LRM or RLM markers have been removed from the destination text, the corresponding elements of srcToDstMap will contain -1.

Note that the allocated array may have more elements than the number of characters processed in the source BidiText. In that case, the extra elements should be ignored. The number of relevant elements can be found from getInputCount().


getDestinationToSourceMap

public int[] getDestinationToSourceMap()
Output value: destination-to-source map from the last transform with dstToSrcMapRequired specified; if this option was not specified, the content of dstToSrcMap should be ignored.

If when starting a transformation this field refers to a large enough array of integers, this array will be re-used to put the new map. Otherwise a new array will be created.

This map has a number for each character in the "interesting" data of the destination BidiText. This number is the index of the source character from which the destination character originates. This index is relative to the beginning of the "interesting" data. If the offset of the source BidiText is not zero, index 0 does not indicate the first character of the data array, but the character at position "offset". If the insertMarkers option was specified and LRM or RLM markers have been added, the corresponding elements of dstToSrcMap will contain -1.

Note that the allocated array may have more elements than the number of characters in the "interesting" part of the destination BidiText. In that case, the extra elements should be ignored. The number of relevant elements can be found from getOutputCount().


getPropertyMap

public byte[] getPropertyMap()
Output value: property map from the last transform with propertyMapRequired specified; if this option was not specified, the content of propertyMap should be ignored.

If when starting a transformation this field refers to a large enough array of bytes, this array will be re-used to put the new map. Otherwise a new array will be created.

This map has a byte for each character processed in the source data by the last transform. The 6 lower bits of each property element is the Bidi level of the corresponding input character. The highest bit is a new-cell indicator for composed character environments: a value of 0 indicates a zero-length composing character element, and a value of 1 indicates an element that begins a new cell.

Note: the content of this map has no simple interpretation if the bidi implicit reordering property is true.

Note also that the allocated array may have more elements than the number of characters processed in the source BidiText. In that case, the extra elements should be ignored. The number of relevant elements can be found from getInputCount().