org.eclipse.actf.visualization.engines.blind
Class TextChecker

java.lang.Object
  extended by org.eclipse.actf.visualization.engines.blind.TextChecker

public class TextChecker
extends Object

Utility class to check alternative text


Method Summary
 int checkInappropriateAlt(String alt)
          Check possibly inappropriate alternative text.
 Set<String> getInappropriateALTSet()
          Get inappropriate alternative text Set
static TextChecker getInstance()
          Get instance of TextChecker
 boolean isInappropriateAlt(String alt)
          Check appropriateness of alternative text.
 boolean isRedundantText(String prevText, String curText)
          Check redundancy of text
 boolean isSeparatedJapaneseChars(String target)
          Check if the target String is space separated Japanese chars or not
 void setInappropriateAltSet(Set<String> inappAltSet)
          Set inappropriate alternative text Set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TextChecker getInstance()
Get instance of TextChecker

Returns:
instance of TextChecker

isRedundantText

public boolean isRedundantText(String prevText,
                               String curText)
Check redundancy of text

Parameters:
prevText - previous text
curText - target text to check
Returns:
true if the target text is redundant with previous text

isInappropriateAlt

public boolean isInappropriateAlt(String alt)
Check appropriateness of alternative text.

Parameters:
alt - target alternative text
Returns:
true if the alternative text matches with inappropriate alternative text Set

checkInappropriateAlt

public int checkInappropriateAlt(String alt)
Check possibly inappropriate alternative text.

Parameters:
alt - target alternative text
Returns:
  • 0: OK
  • 1: possibly inappropriate
  • 2: inappropriate
  • 3: space separated chars

isSeparatedJapaneseChars

public boolean isSeparatedJapaneseChars(String target)
Check if the target String is space separated Japanese chars or not

Parameters:
target - target String
Returns:
true if the target String is space separated Japanese chars

getInappropriateALTSet

public Set<String> getInappropriateALTSet()
Get inappropriate alternative text Set

Returns:
Set of inappropriate alternative text

setInappropriateAltSet

public void setInappropriateAltSet(Set<String> inappAltSet)
Set inappropriate alternative text Set. The new Set will be stored into PreferenceStore.

Parameters:
inappAltSet - Set of inappropriate alternative text