|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface JSpellDictionaryAccessor
This interface describes the requirements for any JSpellDictionary object.
| Method Summary | |
|---|---|
void |
adjustErrorPositions(int offset)
Adjust internal positions of any error objects. |
boolean |
checkCaps(char curChar,
char prevChar)
Check for end of sentence. |
boolean |
checkCaps(char curChar,
char prevChar,
boolean hasDigits,
boolean capsFlag)
Check for end of sentence. |
boolean |
checkWord(JSpellWordBundle word)
Send an individual JSpellWordBundle to be checked. |
void |
close()
Close access to a dictionary. |
int |
getBatchSize()
Get the number of words that can be validated by this access interface before getting errors back. |
JSpellErrorInfo |
getCurrentError()
Get the current error, useful when rechecking a word to get the capsFlag status. |
boolean |
getDictionaryReady()
Return whether JSpellDictionary is ready. |
boolean |
getForceUpperCase()
If true, return suggestions in UPPER CASE. |
boolean |
getIgnoreDoubleWords()
Return whether this dictionary accessor ignores double words. |
boolean |
getIgnoreFirstCaps()
Return whether this dictionary accessor ignores capitalization errors on the first word. |
boolean |
getIgnoreIrregularCaps()
Return whether this dictionary accessor ignores irregular capitalization. |
boolean |
getIgnoreUpper()
Return whether this dictionary accessor checks capitalized words. |
boolean |
getIgnoreWordsWithNumbers()
Return whether this dictionary accessor ignores words with numbers. |
boolean |
getLearnWords()
Returns whether this dictionary accessor allows learning of words. |
JSpellErrorInfo |
getNextError()
Get error info/suggestions, when null caller may continue sending words to check. |
void |
ignoreWord(java.lang.String word)
Add a word to the list of words to ignore/not check. |
void |
learnWord(java.lang.String word)
Add a new word to the dictionary. |
void |
learnWordManual(java.lang.String word)
Add a new word to the dictionary that is not persisted either to local storage or to a network dictionary. |
void |
open()
Opens access to a dictionary. |
void |
resetAll()
Reset dictionary and clear any cached errors. |
void |
resetErrors()
Reset any cached errors. |
void |
setBatchSize(int batchSize)
Set the number of words to validate in one call to the dictionary access interface. |
void |
setForceUpperCase(boolean forceUpperCase)
If true, return suggestions in UPPER CASE. |
void |
setIgnoreDoubleWords(boolean ignoreDoubleWords)
Ignore double words. |
void |
setIgnoreFirstCaps(boolean ignoreFirstCaps)
Ignore irregular capitalization on the first word. |
void |
setIgnoreIrregularCaps(boolean ignoreIrregularCaps)
Ignore irregular capitalization. |
void |
setIgnoreUpper(boolean ignoreWordsInCaps)
Ignore capitalized words if true. |
void |
setIgnoreWordsWithNumbers(boolean ignoreWordsWithNumbers)
Ignore words with numbers. |
| Method Detail |
|---|
void open()
throws JSpellException
JSpellException - An exception.void close()
boolean checkWord(JSpellWordBundle word)
throws java.lang.Exception
word - A String containing an individual word.
java.lang.Exception - An Exception object.
JSpellErrorInfo getNextError()
throws java.lang.Exception
java.lang.Exception - An Exceptionint getBatchSize()
boolean getDictionaryReady()
boolean getLearnWords()
void setBatchSize(int batchSize)
batchSize - number of wordsvoid learnWord(java.lang.String word)
word - A String containing an individual word.void learnWordManual(java.lang.String word)
word - A String containing an individual word.void ignoreWord(java.lang.String word)
word - A String containing an individual word.JSpellErrorInfo getCurrentError()
void resetAll()
void resetErrors()
void setIgnoreIrregularCaps(boolean ignoreIrregularCaps)
ignoreIrregularCaps - true or falseboolean getIgnoreIrregularCaps()
void setIgnoreFirstCaps(boolean ignoreFirstCaps)
ignoreFirstCaps - true or falseboolean getIgnoreFirstCaps()
void setIgnoreWordsWithNumbers(boolean ignoreWordsWithNumbers)
ignoreWordsWithNumbers - true or falseboolean getIgnoreWordsWithNumbers()
void setIgnoreDoubleWords(boolean ignoreDoubleWords)
ignoreDoubleWords - true or falseboolean getIgnoreDoubleWords()
void setIgnoreUpper(boolean ignoreWordsInCaps)
ignoreWordsInCaps - true or falseboolean getIgnoreUpper()
void adjustErrorPositions(int offset)
offset - number of characters to offset.void setForceUpperCase(boolean forceUpperCase)
forceUpperCase - true or falseboolean getForceUpperCase()
boolean checkCaps(char curChar,
char prevChar)
curChar - current character.prevChar - previous character.
boolean checkCaps(char curChar,
char prevChar,
boolean hasDigits,
boolean capsFlag)
curChar - current character.prevChar - previous character.hasDigits - embedded numbers in current word?capsFlag - previous capitalization state.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||