|
HATS 7.5.1 Web API ReferencePublicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.hats.transform.TextReplacementEngine
public class TextReplacementEngine
Usage:
ComponentElement[] cea = ...;
TextReplacementList trl = ...;
TextReplacementEngine tre = new TextReplacementEngine(trl);
tre.processComponentElements(cea);
| Field Summary | |
|---|---|
static String |
BIDITextReplacementEnd
|
static String |
BIDITextReplacementRevEnd
|
static String |
BIDITextReplacementRevStart
|
static String |
BIDITextReplacementStart
|
static String |
BIDITextReplLTREnd
|
static String |
BIDITextReplLTRStart
|
static String |
BIDITextReplRTLEnd
|
static String |
BIDITextReplRTLStart
|
static String |
CLASS_NAME
|
protected com.ibm.hats.transform.ITextReplacementFilter[] |
filters
|
static String |
PROPERTY_ENGINE_CLASS_NAME
|
static String |
PROPERTY_TRUNCATE_TO_PRESERVE_LENGTH
|
protected TextReplacementList |
trl
|
| Constructor Summary | |
|---|---|
TextReplacementEngine(TextReplacementList trl)
Constuctor method to build a new TextReplacementEngine
| |
| Method Summary | |
|---|---|
TextReplacementList |
getTextReplacementList()
Returns the TextReplacementList object associated with this engine instance. |
static TextReplacementEngine |
newInstance(String className,
ClassLoader classLoader,
TextReplacementList trl)
Static method to construct a new TextReplacementEngine object. |
static TextReplacementEngine |
newInstance(TextReplacementList trl)
|
boolean |
processComponentElements(ComponentElement[] cea,
ContextAttributes contextAttributes)
Method to perform text replacement on an array of com.ibm.hats.transform.elements.ComponentElement objects. |
boolean |
processHostScreen(HsrScreen hostScreen)
Method to perform text replacement on a HostScreen object. |
static String |
replaceText(String originalString,
TextReplacementPair pair,
boolean fixedLength,
ContextAttributes contextAttributes)
Static helper method which will perform text replacement on the specified String. |
static String |
replaceTextBIDI(String originalString,
TextReplacementPair pair,
boolean fixedLength,
ContextAttributes contextAttributes)
Static helper method for BIDI Sessions which will perform text replacement on the specified String. |
void |
setTextReplacementFilters(com.ibm.hats.transform.ITextReplacementFilter[] filters)
|
void |
setTextReplacementList(TextReplacementList trl)
Method to set the TextReplacementList object used by the process methods. |
static String |
symSwap(String str)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLASS_NAME
public static final String PROPERTY_ENGINE_CLASS_NAME
public static final String PROPERTY_TRUNCATE_TO_PRESERVE_LENGTH
protected TextReplacementList trl
protected com.ibm.hats.transform.ITextReplacementFilter[] filters
public static final String BIDITextReplacementStart
public static final String BIDITextReplacementEnd
public static final String BIDITextReplacementRevStart
public static final String BIDITextReplacementRevEnd
public static final String BIDITextReplLTRStart
public static final String BIDITextReplLTREnd
public static final String BIDITextReplRTLStart
public static final String BIDITextReplRTLEnd
| Constructor Detail |
|---|
public TextReplacementEngine(TextReplacementList trl)
TextReplacementEngine
trl - | Method Detail |
|---|
public void setTextReplacementList(TextReplacementList trl)
TextReplacementList object used by the process methods.
trl - public TextReplacementList getTextReplacementList()
TextReplacementList object associated with this engine instance.
TextReplacementList object associated with this engine instance.public boolean processHostScreen(HsrScreen hostScreen)
HostScreen object.
Note: This method is currently not implemented and is reserved for future use.
hostScreen - The host screen.
true if the specified HostScreen object was manipulated.
public boolean processComponentElements(ComponentElement[] cea,
ContextAttributes contextAttributes)
com.ibm.hats.transform.elements.ComponentElement objects.
The way in which text replacement occurs is dependent on the ComponentElement object being processed.
cea - Array of ComponentElement objects.contextAttributes - ContextAttributes object containing context-sensitive attributes. See com.ibm.hats.transform.context.ContextAttributes for more information on context attributes.
public static String replaceText(String originalString,
TextReplacementPair pair,
boolean fixedLength,
ContextAttributes contextAttributes)
String.
The fixedLength variable specifies whether the returned String must be the same
length as the original String specified. If true and the String specified in the
TextReplacementPair
originalString - String to perform the text replacement on.pair - TextReplacementPair to be used to perform the replacement with.fixedLength - If true, the length of the returned String will be the same length as the specified
String (length if preserved).
public static String replaceTextBIDI(String originalString,
TextReplacementPair pair,
boolean fixedLength,
ContextAttributes contextAttributes)
String.
The fixedLength variable specifies whether the returned String must be the same
length as the original String specified. If true and the String specified in the
TextReplacementPair
originalString - String to perform the text replacement on.pair - TextReplacementPair to be used to perform the replacement with.fixedLength - If true, the length of the returned String will be the same length as the specified
String (length if preserved).
public static String symSwap(String str)
public static TextReplacementEngine newInstance(TextReplacementList trl)
public static TextReplacementEngine newInstance(String className,
ClassLoader classLoader,
TextReplacementList trl)
TextReplacementEngine object. If the specified class name is null a
new object of type com.ibm.hats.transform.TextReplacementEngine is returned.
className - String fully-qualified class name of a class which extends the com.ibm.hats.transform.TextReplacementEngine class.classLoader - ClassLoader used to load the specified class. This parameter does not apply if the previous parameter is null.trl - TextReplacementList passed to the constructor of the newly created engine object.
public void setTextReplacementFilters(com.ibm.hats.transform.ITextReplacementFilter[] filters)
|
HATS 7.5.1 (201005110649) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||