public class BidiConversionProperties
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
NUMERALS_ANY
Value identifying that numeral shapes can be Nominal or National
Pass-through the original digit shapes.
|
static int |
NUMERALS_CONTEXTUAL
Value identifying that numeral shapes are Contextual (Nominal or National
depending on context)
Use nominal or national depending on context.
|
static int |
NUMERALS_DEFAULT
Value identifying that numeral shapes should be the default
according to the string type.
|
static int |
NUMERALS_NATIONAL
Value identifying that numeral shapes are National
Use Indic digit shapes for all numbers.
|
static int |
NUMERALS_NOMINAL
Value identifying that numeral shapes are Nominal.
|
Constructor and Description |
---|
BidiConversionProperties()
Constructs a BidiConversionProperties object.
|
Modifier and Type | Method and Description |
---|---|
int |
getBidiNumeralShaping()
Gets the numeral shaping property.
|
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 |
isBidiExpandLamAlef()
Indicates whether lam-alef ligatures should get decomposed into lam and alef characters
when transforming from visual to logical.
|
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 |
setBidiExpandLamAlef(boolean expandLamAlef)
Sets whether lam-alef ligatures should get decomposed into lam and alef characters
when transforming from visual to logical.
|
void |
setBidiImplicitReordering(boolean bidiImplicitReordering)
Sets the bidi implicit LTR-RTL reordering property.
|
void |
setBidiInsertDirectionalMarks(boolean bidiInsertDirectionalMarks)
Sets the bidi insert directional marks property.
|
void |
setBidiNumeralShaping(int numeralShaping)
Sets the numeral shaping 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 Representation 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.
|
void |
traceLog(int category,
java.lang.String message) |
public static final int NUMERALS_DEFAULT
public static final int NUMERALS_NOMINAL
public static final int NUMERALS_NATIONAL
public static final int NUMERALS_CONTEXTUAL
public static final int NUMERALS_ANY
public BidiConversionProperties()
public void setBidiStringType(int bidiStringType)
bidiStringType
- The bidi string type.public int getBidiStringType()
public void setBidiRemoveMarksOnImplicitToVisual(boolean removeMarks)
removeMarks
- true to remove the directional marks only when transforming from logical to visual; false otherwise.public boolean isBidiRemoveMarksOnImplicitToVisual()
public void setBidiImplicitReordering(boolean bidiImplicitReordering)
bidiImplicitReordering
- true to use the bidi implicit reordering; false otherwise.public boolean isBidiImplicitReordering()
public void setBidiNumericOrderingRoundTrip(boolean bidiNumericOrderingRoundTrip)
bidiNumericOrderingRoundTrip
- true to use the bidi numeric ordering round trip property; false otherwise.public boolean isBidiNumericOrderingRoundTrip()
public void setBidiWindowCompatibility(boolean bidiWindowCompatibility)
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".
bidiWindowCompatibility
- true to use the window compatibility property; false otherwise.public boolean isBidiWindowCompatibility()
public void setBidiInsertDirectionalMarks(boolean bidiInsertDirectionalMarks)
bidiInsertDirectionalMarks
- true to use the insert directional marks property; false otherwise.public boolean isBidiInsertDirectionalMarks()
public void setBidiRemoveDirectionalMarks(boolean bidiRemoveDirectionalMarks)
bidiRemoveDirectionalMarks
- true to use the remove directional marks property; false otherwise.public boolean isBidiRemoveDirectionalMarks()
public void setBidiWordBreak(boolean wordBreak)
wordBreak
- true to consider white space to always follow base orientation; false otherwise.public boolean isBidiWordBreak()
public void setBidiNumeralShaping(int numeralShaping)
The possible values are:
numeralShaping
- what shapes to use for numeralspublic int getBidiNumeralShaping()
The possible values are:
public void setBidiDestinationRequired(boolean destinationRequired)
destinationRequired
- true if the destination is required; false otherwise.public boolean isBidiDestinationRequired()
public void setBidiCreateSourceToDestinationMapping(boolean srcToDstMapRequired)
srcToDstMapRequired
- true to use the bidi create a source to destination mapping property; false otherwise.public boolean isBidiCreateSourceToDestinationMapping()
public void setBidiCreateDestinationToSourceMapping(boolean dstToSrcMapRequired)
dstToSrcMapRequired
- true to use the create a destination to source mapping property; false otherwise.public boolean isBidiCreateDestinationToSourceMapping()
public void setBidiCreatePropertyMap(boolean propertyMapRequired)
propertyMapRequired
- true to use the create a property map property; false otherwise.public boolean isBidiCreatePropertyMap()
public int getInputCount()
public int getOutputCount()
public int[] getSourceToDestinationMap()
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()..
public int[] getDestinationToSourceMap()
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().
public byte[] getPropertyMap()
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().
public boolean isBidiExpandLamAlef()
public void setBidiExpandLamAlef(boolean expandLamAlef)
expandLamAlef
- public void traceLog(int category, java.lang.String message)
category
- message
-