HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.common
Class TextReplacementPair

java.lang.Object
  extended by com.ibm.hats.common.TextReplacementPair
All Implemented Interfaces:
Cloneable

public class TextReplacementPair
extends Object
implements Cloneable

An individual mapping between a string that is found in a host screen and the desired replacement text for that string.


Field Summary
static String ATTR_IMAGE
           
static String ATTR_MATCH_CASE
           
static String ATTR_MATCH_LTR
           
static String ATTR_MATCH_REVERSE
           
static String ATTR_MATCH_RTL
           
static String ATTR_REGEX
           
static String ATTR_SEPARATOR
           
static Hashtable characterMappings
           
static String CLASSNAME
           
static String VALUES_SEPARATOR
           
 
Constructor Summary
TextReplacementPair(String settingsString)
          Constructs a new TextReplacementPair object from the specified String
TextReplacementPair(String from, String to, String toImage, boolean caseSensitive)
          Constructs a text replacement mapping between two strings.
TextReplacementPair(String from, String to, String toImage, boolean caseSensitive, boolean regularExpression)
          Constructs a text replacement mapping between two strings with regular expression support.
TextReplacementPair(String from, String to, String toImage, boolean caseSensitive, boolean isBidi, boolean matchLTRVal, boolean matchRTLVal, boolean matchReverseVal)
          Constructs a text replacement mapping between two strings, with additional Bidi options.
TextReplacementPair(String from, String to, String toImage, boolean caseSensitive, boolean regularExpression, boolean isBidi, boolean matchLTRVal, boolean matchRTLVal, boolean matchReverseVal)
          Constructs a text replacement mapping between two strings with regular expression support and Bidi options.
 
Method Summary
 Object clone()
           
 boolean containsHTML()
           
 String getFrom()
          Gets the replaced string of this pair.
 String getImageName()
          Gets the image to replace the specified string, null if only replacing with text.
 String getTo()
          Gets the replacing string from this pair, null if replacing with an image.
 boolean isBIDI()
          For BIDI Sessions only Gets whether or not the session is BIDI
 boolean isCaseSensitive()
          Gets whether or not we are case sensitive in matching on the string to be replaced.
 boolean isMatchLTR()
          For BIDI Sessions only Gets whether or not we match on LTR screen in matching on the string to be replace.
 boolean isMatchReverse()
          For BIDI Sessions only Gets whether or not we match on Reversed screen in matching on the string to be replace.
 boolean isMatchRTL()
          For BIDI Sessions only Gets whether or not we match on RTL screen in matching on the string to be replace.
 boolean isRegularExpression()
          Gets whether or not regular expressions are being used to find/replace patterns.
static String replaceMapCharacters(String theString)
           
static String replaceSpecialCharacters(String theString)
           
 void setBIDI(boolean isbidi)
          For BIDI Sessions only Sets whether or not the session is BIDI
 void setCaseSensitive(boolean caseSensitive)
          Sets whether or not we are case sensitive in matching on the string to be replaced.
 void setFrom(String from)
          Sets the replaced string of this pair.
 void setMatchLTR(boolean matchLTRval)
          For BIDI Sessions only Sets whether or not we match on LTR screen in matching on the string to be replace.
 void setMatchReverse(boolean matchReverseval)
          For BIDI Sessions only Sets whether or not we match on Reversed screen in matching on the string to be replace.
 void setMatchRTL(boolean matchRTLval)
          For BIDI Sessions only Sets whether or not we match on RTL screen in matching on the string to be replace.
 void setRegularExpression(boolean regularExpression)
          Sets whether or not we are case sensitive in matching on the string to be replaced.
 void setTo(String to)
          Sets the replacing string from this pair.
 void setToImage(String toImage)
          Sets the replacing image from this pair.
 String toSettingsString()
           
 String toString()
          Gets this pair as a string, for debugging purposes.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values

ATTR_MATCH_CASE

public static final String ATTR_MATCH_CASE
See Also:
Constant Field Values

ATTR_REGEX

public static final String ATTR_REGEX
See Also:
Constant Field Values

ATTR_IMAGE

public static final String ATTR_IMAGE
See Also:
Constant Field Values

ATTR_MATCH_LTR

public static final String ATTR_MATCH_LTR
See Also:
Constant Field Values

ATTR_MATCH_RTL

public static final String ATTR_MATCH_RTL
See Also:
Constant Field Values

ATTR_MATCH_REVERSE

public static final String ATTR_MATCH_REVERSE
See Also:
Constant Field Values

VALUES_SEPARATOR

public static final String VALUES_SEPARATOR
See Also:
Constant Field Values

ATTR_SEPARATOR

public static final String ATTR_SEPARATOR
See Also:
Constant Field Values

characterMappings

public static Hashtable characterMappings
Constructor Detail

TextReplacementPair

public TextReplacementPair(String from,
                           String to,
                           String toImage,
                           boolean caseSensitive)
Constructs a text replacement mapping between two strings.

Parameters:
from - the string to be replaced
to - the value to replace the from string with
caseSensitive - caseSensitivity for matching on the from string

TextReplacementPair

public TextReplacementPair(String from,
                           String to,
                           String toImage,
                           boolean caseSensitive,
                           boolean regularExpression)
Constructs a text replacement mapping between two strings with regular expression support.

Parameters:
from - string to be replaced
to - value to replace the from string with
caseSensitive - caseSensitivity for matching on the from string
regularExpression - use patterns to match/replace strings

TextReplacementPair

public TextReplacementPair(String from,
                           String to,
                           String toImage,
                           boolean caseSensitive,
                           boolean isBidi,
                           boolean matchLTRVal,
                           boolean matchRTLVal,
                           boolean matchReverseVal)
Constructs a text replacement mapping between two strings, with additional Bidi options.

Parameters:
from - string to be replaced
to - value to replace the from string with
caseSensitive - caseSensitivity for matching on the from string
isBidi - for BIDI Sessions
matchLTRVal - matchLTR for matching on LTR screen
matchRTLVal - matchRTL for matching on RTL screen
matchReverseVal - for matching on reversed screen

TextReplacementPair

public TextReplacementPair(String from,
                           String to,
                           String toImage,
                           boolean caseSensitive,
                           boolean regularExpression,
                           boolean isBidi,
                           boolean matchLTRVal,
                           boolean matchRTLVal,
                           boolean matchReverseVal)
Constructs a text replacement mapping between two strings with regular expression support and Bidi options.

Parameters:
from - string to be replaced
to - value to replace the from string with
caseSensitive - caseSensitivity for matching on the from string
regularExpression - use patterns to match/replace strings
isBidi - for BIDI Sessions
matchLTRVal - matchLTR for matching on LTR screen
matchRTLVal - matchRTL for matching on RTL screen
matchReverseVal - for matching on reversed screen

TextReplacementPair

public TextReplacementPair(String settingsString)
Constructs a new TextReplacementPair object from the specified String

Format: from=to,[matchCase],[matchLTR],[matchRTL],[matchReverse],[toImage] If [toImage] is specified, the "to" string is treated as the path to an image and not just plain text.

Method Detail

getFrom

public String getFrom()
Gets the replaced string of this pair.


getTo

public String getTo()
Gets the replacing string from this pair, null if replacing with an image.


getImageName

public String getImageName()
Gets the image to replace the specified string, null if only replacing with text.


isCaseSensitive

public boolean isCaseSensitive()
Gets whether or not we are case sensitive in matching on the string to be replaced.


isRegularExpression

public boolean isRegularExpression()
Gets whether or not regular expressions are being used to find/replace patterns.


isBIDI

public boolean isBIDI()
For BIDI Sessions only Gets whether or not the session is BIDI


isMatchLTR

public boolean isMatchLTR()
For BIDI Sessions only Gets whether or not we match on LTR screen in matching on the string to be replace.


isMatchRTL

public boolean isMatchRTL()
For BIDI Sessions only Gets whether or not we match on RTL screen in matching on the string to be replace.


isMatchReverse

public boolean isMatchReverse()
For BIDI Sessions only Gets whether or not we match on Reversed screen in matching on the string to be replace.


setFrom

public void setFrom(String from)
Sets the replaced string of this pair.


setTo

public void setTo(String to)
Sets the replacing string from this pair.


setToImage

public void setToImage(String toImage)
Sets the replacing image from this pair.


containsHTML

public boolean containsHTML()

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Sets whether or not we are case sensitive in matching on the string to be replaced.


setRegularExpression

public void setRegularExpression(boolean regularExpression)
Sets whether or not we are case sensitive in matching on the string to be replaced.


setBIDI

public void setBIDI(boolean isbidi)
For BIDI Sessions only Sets whether or not the session is BIDI


setMatchLTR

public void setMatchLTR(boolean matchLTRval)
For BIDI Sessions only Sets whether or not we match on LTR screen in matching on the string to be replace.


setMatchRTL

public void setMatchRTL(boolean matchRTLval)
For BIDI Sessions only Sets whether or not we match on RTL screen in matching on the string to be replace.


setMatchReverse

public void setMatchReverse(boolean matchReverseval)
For BIDI Sessions only Sets whether or not we match on Reversed screen in matching on the string to be replace.


toString

public String toString()
Gets this pair as a string, for debugging purposes.

Overrides:
toString in class Object

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

toSettingsString

public String toSettingsString()

replaceMapCharacters

public static String replaceMapCharacters(String theString)

replaceSpecialCharacters

public static String replaceSpecialCharacters(String theString)

HATS 7.5.1 (201005110649)