org.languagetool.gui
Class Configuration

java.lang.Object
  extended by org.languagetool.gui.Configuration

public class Configuration
extends Object

Configuration like list of disabled rule IDs, server mode etc. Configuration is loaded from and stored to a properties file.

Author:
Daniel Naber

Constructor Summary
Configuration(File baseDir, Language lang)
           
Configuration(File baseDir, String filename, Language lang)
           
Configuration(Language lang)
          Uses the configuration file from the default location.
 
Method Summary
 boolean getAutoDetect()
           
 Set<String> getDisabledCategoryNames()
           
 Set<String> getDisabledRuleIds()
           
 Set<String> getEnabledRuleIds()
           
 Language getMotherTongue()
           
 boolean getRunServer()
           
 int getServerPort()
           
 boolean getUseGUIConfig()
           
 void saveConfiguration(Language lang)
           
 void setAutoDetect(boolean autoDetect)
           
 void setDisabledCategoryNames(Set<String> categoryNames)
           
 void setDisabledRuleIds(Set<String> ruleIDs)
           
 void setEnabledRuleIds(Set<String> ruleIDs)
           
 void setMotherTongue(Language motherTongue)
           
 void setRunServer(boolean runServer)
           
 void setServerPort(int serverPort)
           
 void setUseGUIConfig(boolean useGUIConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration(Language lang)
              throws IOException
Uses the configuration file from the default location.

Parameters:
lang - The language for the configuration, used to distinguish rules that are enabled or disabled per language.
Throws:
IOException

Configuration

public Configuration(File baseDir,
                     String filename,
                     Language lang)
              throws IOException
Throws:
IOException

Configuration

public Configuration(File baseDir,
                     Language lang)
              throws IOException
Throws:
IOException
Method Detail

getDisabledRuleIds

public Set<String> getDisabledRuleIds()

getEnabledRuleIds

public Set<String> getEnabledRuleIds()

getDisabledCategoryNames

public Set<String> getDisabledCategoryNames()

setDisabledRuleIds

public void setDisabledRuleIds(Set<String> ruleIDs)

setEnabledRuleIds

public void setEnabledRuleIds(Set<String> ruleIDs)

setDisabledCategoryNames

public void setDisabledCategoryNames(Set<String> categoryNames)

getMotherTongue

public Language getMotherTongue()

setMotherTongue

public void setMotherTongue(Language motherTongue)

getAutoDetect

public boolean getAutoDetect()

setAutoDetect

public void setAutoDetect(boolean autoDetect)

getRunServer

public boolean getRunServer()

setRunServer

public void setRunServer(boolean runServer)

getServerPort

public int getServerPort()

setUseGUIConfig

public void setUseGUIConfig(boolean useGUIConfig)

getUseGUIConfig

public boolean getUseGUIConfig()

setServerPort

public void setServerPort(int serverPort)

saveConfiguration

public void saveConfiguration(Language lang)
                       throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.