Package org.omegat.languagetools
Class LanguageToolNetworkBridge
- java.lang.Object
-
- org.omegat.languagetools.BaseLanguageToolBridge
-
- org.omegat.languagetools.LanguageToolNetworkBridge
-
- All Implemented Interfaces:
ILanguageToolBridge
public class LanguageToolNetworkBridge extends BaseLanguageToolBridge
-
-
Constructor Summary
Constructors Constructor Description LanguageToolNetworkBridge(Language sourceLang, Language targetLang, java.lang.String url)
Get instance talking to remote serverLanguageToolNetworkBridge(Language sourceLang, Language targetLang, java.lang.String path, int port)
Get instance spawning and talking to local server
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyRuleFilters(java.util.Set<java.lang.String> disabledCategories, java.util.Set<java.lang.String> disabledRules, java.util.Set<java.lang.String> enabledRules)
Free resources before destructionvoid
stop()
Handle project or application closing-
Methods inherited from class org.omegat.languagetools.BaseLanguageToolBridge
getCheckResults
-
-
-
-
Constructor Detail
-
LanguageToolNetworkBridge
public LanguageToolNetworkBridge(Language sourceLang, Language targetLang, java.lang.String url) throws java.lang.Exception
Get instance talking to remote server- Parameters:
url
- URL of remote LanguageTool server- Throws:
java.lang.Exception
-
LanguageToolNetworkBridge
public LanguageToolNetworkBridge(Language sourceLang, Language targetLang, java.lang.String path, int port) throws java.lang.Exception
Get instance spawning and talking to local server- Parameters:
path
- local LanguageTool directoryport
- local port for spawned server to listen- Throws:
java.lang.Exception
-
-
Method Detail
-
stop
public void stop()
Description copied from interface:ILanguageToolBridge
Handle project or application closing
-
applyRuleFilters
public void applyRuleFilters(java.util.Set<java.lang.String> disabledCategories, java.util.Set<java.lang.String> disabledRules, java.util.Set<java.lang.String> enabledRules)
Description copied from interface:ILanguageToolBridge
Free resources before destruction- Parameters:
disabledCategories
- Comma-separated list of disabled category IDsdisabledRules
- Comma-separated list of disabled rule IDsenabledRules
- Comma-separated list of enabled rule IDs
-
-