|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.visualization.engines.blind.TextChecker
public class TextChecker
Utility class to check alternative text
Method Summary | |
---|---|
TextCheckResult |
checkAlt(String alt)
|
TextCheckResult |
checkAlt(String alt,
Set<String> ngWords)
|
TextCheckResult |
checkAlt(String alt,
String src)
|
TextCheckResult |
checkAlt(String alt,
String src,
Set<String> ngWords)
Check alt attribute string and returns result in one of the constants defined above. |
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 |
isAsciiArtString(String str)
|
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 |
---|
public static TextChecker getInstance()
TextChecker
TextChecker
public boolean isRedundantText(String prevText, String curText)
prevText
- previous textcurText
- target text to check
public boolean isInappropriateAlt(String alt)
alt
- target alternative text
Set
public int checkInappropriateAlt(String alt)
alt
- target alternative text
public boolean isSeparatedJapaneseChars(String target)
target
- target String
public Set<String> getInappropriateALTSet()
Set
Set
of inappropriate alternative textpublic void setInappropriateAltSet(Set<String> inappAltSet)
Set
. The new Set
will
be stored into PreferenceStore
.
inappAltSet
- Set
of inappropriate alternative textpublic TextCheckResult checkAlt(String alt)
public TextCheckResult checkAlt(String alt, String src)
public TextCheckResult checkAlt(String alt, Set<String> ngWords)
public TextCheckResult checkAlt(String alt, String src, Set<String> ngWords)
alt
- The value of the alt attributes of images, buttons, area
elements, etc. It MUST NOT be null.src
- The value of the src attribute. Set null if it does not exist.ngWords
- additional NG words set; when we check ALT text of area
element, we want to add "area" as additional NG word.
public boolean isAsciiArtString(String str)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |