public class JSpellDictionaryServlet extends JSpellDictionary
batchCount, batchSize, defaultCountry, defaultLanguage, defaultVersion, errors, language, learnWords, maxSuggestions, suggestions| Constructor and Description |
|---|
JSpellDictionaryServlet()
Construct a JSpellDictionaryServlet.
|
| Modifier and Type | Method and Description |
|---|---|
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.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 |
postResponse(java.lang.StringBuffer data) |
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 |
setURL(java.lang.String urlName)
Sets the URL of the JSpell Servlet.
|
adjustErrorPositions, checkCaps, checkCaps, getBatchSize, getCurrentError, getDictionaryCountry, getDictionaryLanguage, getDictionaryReady, getDictionaryVersion, getForceUpperCase, getIgnoreDoubleWords, getIgnoreFirstCaps, getIgnoreIrregularCaps, getIgnoreUpper, getIgnoreWordsWithNumbers, getLanguage, getLearnWords, ignoreWord, init, isValidWord, learnWordManual, resetAll, resetErrors, setDictionaryReady, setForceUpperCase, setIgnoreDoubleWords, setIgnoreFirstCaps, setIgnoreIrregularCaps, setIgnoreUpper, setIgnoreWordsWithNumbers, setLanguage, setLearnWords, setMaxSuggestions, validWordsPutpublic JSpellDictionaryServlet()
public final void open()
JSpellDictionaryAccessorpublic void setURL(java.lang.String urlName)
urlName - a String.public java.lang.String getURL()
public void setBatchSize(int batchSize)
setBatchSize in interface JSpellDictionaryAccessorsetBatchSize in class JSpellDictionarybatchSize - an int.public void close()
public boolean checkWord(JSpellWordBundle word) throws java.lang.Exception
checkWord in interface JSpellDictionaryAccessorcheckWord in class JSpellDictionaryword - a String.java.lang.Exception - an Exception object.public JSpellErrorInfo getNextError() throws java.lang.Exception
getNextError in interface JSpellDictionaryAccessorgetNextError in class JSpellDictionaryjava.lang.Exception - an Exception object.protected void sendBatch()
throws java.io.IOException
java.io.IOException - an Exception object.protected void getResults()
throws java.io.IOException
java.io.IOException - an Exception object.protected final void postResponse(java.lang.StringBuffer data)
throws java.io.IOException
java.io.IOExceptionprotected final void checkResponse(java.lang.StringBuffer sb)
throws java.io.IOException
sb - a StringBuffer.java.io.IOException - an Exception object.protected void learnResponse(java.lang.StringBuffer sb)
throws java.io.IOException
sb - a StringBuffer.java.io.IOException - an Exception object.public java.util.Vector getLanguages()
throws java.io.IOException
java.io.IOException - an Exception object.public void learnWord(java.lang.String word)
learnWord in interface JSpellDictionaryAccessorlearnWord in class JSpellDictionaryword - a String.JSpell SDK - Spell Checker for the Java Platform
Copyright © 2009-2019 Page Scholar Inc, All Rights Reserved - https://www.jspell.com