Package com.jalios.jcms.spellchecker
Class SpellCheckerManager
java.lang.Object
com.jalios.jcms.spellchecker.SpellCheckerManager
Spell Checking manager
- Since:
- jcms-6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of available languages for spell-checking.static SpellCheckerRetrieve the SpellChecker instance (initialized it if needed).static voidReload the SpellChecker from properties.static voidsetSpellChecker(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.
-
Constructor Details
-
SpellCheckerManager
public SpellCheckerManager()
-
-
Method Details
-
getLanguageList
Returns a list of available languages for spell-checking.- Returns:
- a List of ISO-639 language code
-
spellCheck
Spell-check the specified text in the specified language and return a list of SpellCheckResult.- Parameters:
text- the text to checklang- the language of the text (ISO-639 code)- Returns:
- a List of SpellCheckResult
-
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
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.
-