com.jspell.domain.net
Class JSpellTools

java.lang.Object
  extended by com.jspell.domain.net.JSpellTools
Direct Known Subclasses:
JSpellHTMLTools, JSpellIFrameTools

public class JSpellTools
extends java.lang.Object

The base class for the JSpellHTMLTools and JSpellIFrameTools classes.

Author:
clifford_admin

Field Summary
protected  boolean bannerPrinted
          A boolean indicating whether the copyright banner has been displayed.
 java.lang.String cacheSize
          Cache Size.
protected  java.lang.String defaultProxy
          Specifies the URL for the spell checker.
 java.lang.String dictionaryPath
          Path to dictionary files.
 boolean indexReady
          Index opened successfully?
protected  java.lang.String softwareID
          String description of software module ID.
 
Constructor Summary
protected JSpellTools()
          Creates a new instance of JSpellTools
 
Method Summary
 java.lang.String getImagePath(javax.servlet.ServletRequest request)
          Returns the URL of the images for the non direct edit version of JSpell HTML
 java.lang.String getLanguage(javax.servlet.ServletRequest request)
          Returns the language of the spell check request.
 java.lang.String getProxy(javax.servlet.http.HttpServletRequest request)
          Gets proxy URL if specified, or URL of JSpell.jsp.
 java.lang.String getStyleSheetURL(javax.servlet.http.HttpServletRequest request)
          Returns the URL of the style sheet URL.
 java.lang.String getSupplementalDictionary(javax.servlet.ServletRequest request)
          Returns the words in the supplemental dictionary.
 void indexSetup(javax.servlet.ServletConfig config, java.lang.String dictionaryOverride)
          Initializes the dictionaries.
 java.lang.String loadSupplementalDictionary(java.lang.String supplementalDictionary)
          Loads a list of words to ignore for purposes of spell checking.
static void setCache(javax.servlet.http.HttpServletResponse response)
          Sets the cache response header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

softwareID

protected java.lang.String softwareID
String description of software module ID.


defaultProxy

protected java.lang.String defaultProxy
Specifies the URL for the spell checker.


indexReady

public boolean indexReady
Index opened successfully?


dictionaryPath

public java.lang.String dictionaryPath
Path to dictionary files.


cacheSize

public java.lang.String cacheSize
Cache Size.


bannerPrinted

protected boolean bannerPrinted
A boolean indicating whether the copyright banner has been displayed.

Constructor Detail

JSpellTools

protected JSpellTools()
Creates a new instance of JSpellTools

Method Detail

loadSupplementalDictionary

public java.lang.String loadSupplementalDictionary(java.lang.String supplementalDictionary)
Loads a list of words to ignore for purposes of spell checking. The parameter specifies the name of the dictionary file. Using this approach, multiple permanent ignore lists can be maintained, e.g., each user or client could have a separate ignore list.

Parameters:
supplementalDictionary - a String.
Returns:
a String.

indexSetup

public void indexSetup(javax.servlet.ServletConfig config,
                       java.lang.String dictionaryOverride)
Initializes the dictionaries.

Parameters:
config - a ServletConfig object.
dictionaryOverride - a String - optional path to directory containing JSpell dictionary files.

getStyleSheetURL

public java.lang.String getStyleSheetURL(javax.servlet.http.HttpServletRequest request)
                                  throws java.lang.Exception
Returns the URL of the style sheet URL.

Parameters:
request - an HttpServletRequest object.
Returns:
a String.
Throws:
java.lang.Exception - an Exception object.

getSupplementalDictionary

public java.lang.String getSupplementalDictionary(javax.servlet.ServletRequest request)
                                           throws java.lang.Exception
Returns the words in the supplemental dictionary.

Parameters:
request - a ServletRequest object.
Returns:
a String.
Throws:
java.lang.Exception - an Exception object.

getLanguage

public java.lang.String getLanguage(javax.servlet.ServletRequest request)
                             throws java.lang.Exception
Returns the language of the spell check request.

Parameters:
request - a ServletRequest object.
Returns:
a String.
Throws:
java.lang.Exception - an Exception object.

getImagePath

public java.lang.String getImagePath(javax.servlet.ServletRequest request)
                              throws java.lang.Exception
Returns the URL of the images for the non direct edit version of JSpell HTML

Parameters:
request - a ServletRequest object.
Returns:
a String.
Throws:
java.lang.Exception - an Exception object.

getProxy

public java.lang.String getProxy(javax.servlet.http.HttpServletRequest request)
Gets proxy URL if specified, or URL of JSpell.jsp.

Parameters:
request - an HttpServletRequest object.
Returns:
a String.

setCache

public static void setCache(javax.servlet.http.HttpServletResponse response)
Sets the cache response header.

Parameters:
response - an HttpServletResponse object.


JSpell SDK - Spell Checker for the Java ™ Platform
Copyright © 2009 Page Scholar Inc, All Rights Reserved - http://www.jspell.com