com.jalios.jcms.spellchecker
Class SpellCheckerManager

java.lang.Object
  extended by com.jalios.jcms.spellchecker.SpellCheckerManager

public class SpellCheckerManager
extends Object

Spell Checking manager

Since:
jcms-6.0
Version:
$Revision: 25831 $

Field Summary
static String REVISION
           
 
Constructor Summary
SpellCheckerManager()
           
 
Method Summary
static List<String> getLanguageList()
          Returns a list of available languages for spell-checking.
static SpellChecker getSpellChecker()
          Retrieve the SpellChecker instance (initialized it if needed).
static void reloadSpellChecker()
          Reload the SpellChecker from properties.
static void setSpellChecker(SpellChecker spellChecker)
          Change the SpellChecker already initialized by this manager.
static List<SpellCheckResult> spellCheck(String text, String lang)
          Spell-check the specified text in the specified language and return a list of SpellCheckResult.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

SpellCheckerManager

public SpellCheckerManager()
Method Detail

getLanguageList

public static List<String> getLanguageList()
Returns a list of available languages for spell-checking.

Returns:
a List of ISO-639 language code

spellCheck

public static List<SpellCheckResult> spellCheck(String text,
                                                String lang)
Spell-check the specified text in the specified language and return a list of SpellCheckResult.

Parameters:
text - the text to check
lang - the language of the text (ISO-639 code)
Returns:
a List of SpellCheckResult

getSpellChecker

public static SpellChecker getSpellChecker()
Retrieve the SpellChecker instance (initialized it if needed).

Returns:
the SpellChecker instance as defined by property "spellchecker.class" or replaced by setSpellChecker(SpellChecker).

setSpellChecker

public static void setSpellChecker(SpellChecker spellChecker)
Change the SpellChecker already initialized by this manager.

Parameters:
spellChecker - a SpellChecker instance, must not be null.

reloadSpellChecker

public static void reloadSpellChecker()
Reload the SpellChecker from properties.



Copyright © 2001-2010 Jalios SA. All Rights Reserved.