|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.wallstreetwise.app.jspell.domain.JSpellDictionary
com.wallstreetwise.app.jspell.domain.net.JSpellDictionaryServlet
public class JSpellDictionaryServlet
JSpellDictionary subclass which is designed to communicate with a JSpellServlet being hosted on a web server. See JSpellServlet documentation for help in configuring a JSpellServlet to run on your web server.
| Field Summary |
|---|
| Fields inherited from class com.wallstreetwise.app.jspell.domain.JSpellDictionary |
|---|
batchCount, batchSize, currentError, dictionaryReady, errorCache, errors, forceUpperCase, ignoreDoubleWords, ignoreFirstCaps, ignoreIrregularCaps, ignoreUpper, ignoreWords, ignoreWordsWithNumbers, learnWords, maxSuggestions, nextWord, suggestions, validWords |
| Constructor Summary | |
|---|---|
JSpellDictionaryServlet()
Construct a JSpellDictionaryServlet. |
|
| Method Summary | |
|---|---|
protected void |
checkResponse(java.lang.StringBuffer sb)
Performs the actual connection to the JSpell Servlet. |
boolean |
checkWord(JSpellWordBundle word)
Places a word in a batch to be checked by the JSpell Servlet. |
void |
close()
Closes the network connection to the dictionary server. |
java.lang.String |
getLanguage()
Get the language of the JSpell Servlet. |
java.util.Vector |
getLanguages()
Connects to the JSpell Servlet and retrieves the languages available in the JSpell Servlet. |
JSpellErrorInfo |
getNextError()
First check if there are words to be validated against the server that didn't make it in the last batch. |
protected void |
getResults()
Get results from the server. |
java.lang.String |
getURL()
Get the URL of the JSpell Servlet. |
protected void |
learnResponse(java.lang.StringBuffer sb)
Make a connection to the JSpell Servlet and persist the word contained in the StringBuffer. |
void |
learnWord(java.lang.String word)
Add a word to the internal valid words collection and call learnResponse to update the word in the JSpell Servlet. |
void |
open()
Opens access to a dictionary. |
protected void |
sendBatch()
Sends words to the server. |
void |
setBatchSize(int batchSize)
Set the number of words to validate in one call to the JSpell Servlet. |
void |
setFollowRedirects(boolean useRedirect)
Sets whether HTTP redirects (requests with response code 3xx) of the internal HttpURLConnection should be automatically followed by this class. |
void |
setLanguage(java.lang.String language)
Set the language of the JSpell Servlet. |
void |
setURL(java.lang.String urlName)
Sets the URL of the JSpell Servlet. |
| Methods inherited from class com.wallstreetwise.app.jspell.domain.JSpellDictionary |
|---|
addFrequentWords, adjustErrorPositions, checkCaps, checkCaps, getBatchSize, getCurrentError, getDictionaryReady, getForceUpperCase, getIgnoreDoubleWords, getIgnoreFirstCaps, getIgnoreIrregularCaps, getIgnoreUpper, getIgnoreWordsWithNumbers, getLearnWords, ignoreWord, init, learnWordManual, resetAll, resetErrors, setDictionaryReady, setForceUpperCase, setIgnoreDoubleWords, setIgnoreFirstCaps, setIgnoreIrregularCaps, setIgnoreUpper, setIgnoreWordsWithNumbers, setLearnWords, setMaxSuggestions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSpellDictionaryServlet()
| Method Detail |
|---|
public final void open()
JSpellDictionaryAccessor
public final void setFollowRedirects(boolean useRedirect)
useRedirect - true or falsepublic final void setURL(java.lang.String urlName)
urlName - a String.public final java.lang.String getURL()
public final void setLanguage(java.lang.String language)
language - a String.public final java.lang.String getLanguage()
public final void setBatchSize(int batchSize)
setBatchSize in interface JSpellDictionaryAccessorsetBatchSize in class JSpellDictionarybatchSize - an int.public final void close()
public final boolean checkWord(JSpellWordBundle word)
throws java.lang.Exception
checkWord in interface JSpellDictionaryAccessorcheckWord in class JSpellDictionaryword - a String.
java.lang.Exception - an Exception object.
public final JSpellErrorInfo getNextError()
throws java.lang.Exception
getNextError in interface JSpellDictionaryAccessorgetNextError in class JSpellDictionaryjava.lang.Exception - an Exception object.
protected final void sendBatch()
throws java.io.IOException
java.io.IOException - an Exception object.
protected final void getResults()
throws java.io.IOException
java.io.IOException - an Exception object.
protected final void checkResponse(java.lang.StringBuffer sb)
throws java.io.IOException
sb - a StringBuffer.
java.io.IOException - an Exception object.
public final java.util.Vector getLanguages()
throws java.io.IOException
java.io.IOException - an Exception object.
protected final void learnResponse(java.lang.StringBuffer sb)
throws java.io.IOException
sb - a StringBuffer.
java.io.IOException - an Exception object.public final void learnWord(java.lang.String word)
learnWord in interface JSpellDictionaryAccessorlearnWord in class JSpellDictionaryword - a String.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||