public class Configuration extends Object
| Modifier and Type | Field and Description |
|---|---|
static short |
UNDERLINE_BOLD |
static short |
UNDERLINE_BOLDWAVE |
static short |
UNDERLINE_DASH |
static short |
UNDERLINE_WAVE |
| Constructor and Description |
|---|
Configuration(File baseDir,
Language lang) |
Configuration(File baseDir,
String filename,
File oldConfigFile,
Language lang) |
Configuration(File baseDir,
String filename,
Language lang) |
Configuration(Language lang)
Uses the configuration file from the default location.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDisabledRuleIds(Set<String> ruleIds) |
void |
addProfile(String profile)
add a new profile
|
void |
addProfiles(List<String> profiles)
add a list of profiles
|
boolean |
doFullCheckAtFirst()
do a full check at first iteration?
|
boolean |
doRemoteCheck() |
boolean |
getAutoDetect() |
int |
getConfigurableValue(String ruleID)
Get the configurable value of a rule by ruleID
returns -1 if no value is set by configuration
|
Map<String,Integer> |
getConfigurableValues()
returns all configured values
|
String |
getCurrentProfile()
get the current profile
|
Language |
getDefaultLanguage() |
List<String> |
getDefinedProfiles()
get the current profile
|
Set<String> |
getDisabledCategoryNames() |
Set<String> |
getDisabledRuleIds() |
Set<String> |
getEnabledCategoryNames() |
Set<String> |
getEnabledRuleIds() |
boolean |
getEnabledRulesOnly() |
Map<ITSIssueType,Color> |
getErrorColors() |
String |
getExternalRuleDirectory() |
String |
getFontName()
Returns the name of the GUI's editing textarea font.
|
int |
getFontSize()
Returns the size of the GUI's editing textarea font.
|
int |
getFontStyle()
Returns the style of the GUI's editing textarea font.
|
Language |
getLanguage() |
String |
getlogLevel() |
String |
getLookAndFeelName()
Returns the name of the GUI's LaF.
|
Language |
getMotherTongue() |
File |
getNgramDirectory()
Directory with ngram data or null.
|
int |
getNumParasToCheck()
get the number of paragraphs to be checked for TextLevelRules
|
boolean |
getRunServer() |
int |
getServerPort() |
String |
getServerUrl() |
Set<String> |
getSpecialTabCategories(String tabName) |
String[] |
getSpecialTabNames() |
boolean |
getTaggerShowsDisambigLog()
Determines whether the tagger window will also print the disambiguation
log.
|
Color |
getUnderlineColor(String category) |
Map<String,Color> |
getUnderlineColors() |
Short |
getUnderlineType(String category) |
Map<String,Short> |
getUnderlineTypes() |
boolean |
getUseDocLanguage() |
boolean |
getUseGUIConfig() |
File |
getWord2VecDirectory()
Directory with word2vec data or null.
|
void |
initOptions()
Initialize variables and clears Maps, Sets and Lists
|
void |
initStyleCategories(List<Rule> allRules) |
boolean |
isInSpecialTab(String category,
String tabName) |
boolean |
isMultiThread()
shall LO run in multi thread mode
|
boolean |
isResetCheck()
will all paragraphs check after every change of text?
|
boolean |
isSpecialTabCategory(String category) |
boolean |
isStyleCategory(String category) |
boolean |
isSwitchedOff()
if true: LT is switched Off, else: LT is switched On
|
boolean |
isValidServerUrl(String url)
Test if http-server URL is correct
|
void |
loadConfiguration(String profile) |
boolean |
markSingleCharBold() |
boolean |
noSynonymsAsSuggestions() |
void |
removeDisabledRuleIds(Set<String> ruleIds) |
void |
removeProfile(String profile)
remove an existing profile
|
void |
saveConfiguration(Language lang) |
void |
setAutoDetect(boolean autoDetect) |
void |
setConfigurableValue(String ruleID,
int value)
Set the value for a rule with ruleID
|
void |
setCurrentProfile(String profile)
set the current profile
|
void |
setDefaultUnderlineColor(String category) |
void |
setDefaultUnderlineType(String category) |
void |
setDisabledCategoryNames(Set<String> categoryNames) |
void |
setDisabledRuleIds(Set<String> ruleIds) |
void |
setDoResetCheck(boolean resetCheck)
set all paragraphs to be checked after every change of text
|
void |
setEnabledCategoryNames(Set<String> categoryNames) |
void |
setEnabledRuleIds(Set<String> ruleIds) |
void |
setExternalRuleDirectory(String path) |
void |
setFontName(String fontName)
Sets the name of the GUI's editing textarea font.
|
void |
setFontSize(int fontSize)
Sets the size of the GUI's editing textarea font.
|
void |
setFontStyle(int fontStyle)
Sets the style of the GUI's editing textarea font.
|
void |
setFullCheckAtFirst(boolean doFullCheckAtFirst)
set option to do a full check at first iteration
|
void |
setLanguage(Language language) |
void |
setLookAndFeelName(String lookAndFeelName)
Sets the name of the GUI's LaF.
|
void |
setMarkSingleCharBold(boolean markSingleCharBold) |
void |
setMotherTongue(Language motherTongue) |
void |
setMultiThreadLO(boolean isMultiThread)
run LO in multi thread mode
|
void |
setNgramDirectory(File dir)
Sets the directory with ngram data (may be null).
|
void |
setNoSynonymsAsSuggestions(boolean noSynonymsAsSuggestions) |
void |
setNumParasToCheck(int numParas)
set the number of paragraphs to be checked for TextLevelRules
|
void |
setOtherServerUrl(String otherServerUrl) |
void |
setRemoteCheck(boolean doRemoteCheck) |
void |
setRunServer(boolean runServer) |
void |
setServerPort(int serverPort) |
void |
setSwitchedOff(boolean switchOff,
Language lang)
Set LT is switched Off or On
save configuration
|
void |
setTaggerShowsDisambigLog(boolean taggerShowsDisambigLog)
Enables or disables the disambiguation log on the tagger window,
depending on the value of the parameter taggerShowsDisambigLog.
|
void |
setUnderlineColor(String category,
Color col) |
void |
setUnderlineType(String category,
short type) |
void |
setUseDocLanguage(boolean useDocLang) |
void |
setUseGUIConfig(boolean useGUIConfig) |
void |
setUseLtDictionary(boolean useLtDictionary) |
void |
setUseOtherServer(boolean useOtherServer) |
void |
setUseTextLevelQueue(boolean useTextLevelQueue)
set all paragraphs to be not checked after every change of text
if more than one document loaded?
|
void |
setWord2VecDirectory(File dir)
Sets the directory with word2vec data (may be null).
|
boolean |
useLtDictionary() |
boolean |
useOtherServer() |
boolean |
useTextLevelQueue()
will all paragraphs not checked after every change of text
if more than one document loaded?
|
public static final short UNDERLINE_WAVE
public static final short UNDERLINE_BOLDWAVE
public static final short UNDERLINE_BOLD
public static final short UNDERLINE_DASH
public Configuration(Language lang) throws IOException
lang - The language for the configuration, used to distinguish
rules that are enabled or disabled per language.IOExceptionpublic Configuration(File baseDir, Language lang) throws IOException
IOExceptionpublic Configuration(File baseDir, String filename, Language lang) throws IOException
IOExceptionpublic Configuration(File baseDir, String filename, File oldConfigFile, Language lang) throws IOException
IOExceptionpublic void initOptions()
public boolean getEnabledRulesOnly()
public Language getLanguage()
public void setLanguage(Language language)
public Language getMotherTongue()
public void setMotherTongue(Language motherTongue)
public Language getDefaultLanguage()
public void setUseDocLanguage(boolean useDocLang)
public boolean getUseDocLanguage()
public boolean getAutoDetect()
public void setAutoDetect(boolean autoDetect)
public void setRemoteCheck(boolean doRemoteCheck)
public boolean doRemoteCheck()
public void setUseOtherServer(boolean useOtherServer)
public boolean useOtherServer()
public void setOtherServerUrl(String otherServerUrl)
public String getServerUrl()
public String getlogLevel()
public void setMarkSingleCharBold(boolean markSingleCharBold)
public boolean markSingleCharBold()
public void setUseLtDictionary(boolean useLtDictionary)
public boolean useLtDictionary()
public void setNoSynonymsAsSuggestions(boolean noSynonymsAsSuggestions)
public boolean noSynonymsAsSuggestions()
public boolean getTaggerShowsDisambigLog()
public void setTaggerShowsDisambigLog(boolean taggerShowsDisambigLog)
taggerShowsDisambigLog - If true, the tagger window will print thepublic boolean getRunServer()
public void setRunServer(boolean runServer)
public int getServerPort()
public void setUseGUIConfig(boolean useGUIConfig)
public boolean getUseGUIConfig()
public void setServerPort(int serverPort)
public String getExternalRuleDirectory()
public void setExternalRuleDirectory(String path)
public int getNumParasToCheck()
public void setNumParasToCheck(int numParas)
public boolean isResetCheck()
public void setDoResetCheck(boolean resetCheck)
public boolean useTextLevelQueue()
public void setUseTextLevelQueue(boolean useTextLevelQueue)
public void setFullCheckAtFirst(boolean doFullCheckAtFirst)
public boolean doFullCheckAtFirst()
public String getCurrentProfile()
public void setCurrentProfile(String profile)
public void addProfile(String profile)
public void removeProfile(String profile)
public void setMultiThreadLO(boolean isMultiThread)
public boolean isMultiThread()
public String getFontName()
Font.getFamily()public void setFontName(String fontName)
fontName - the name of the font.Font.getFamily()public int getFontStyle()
Font.getStyle()public void setFontStyle(int fontStyle)
fontStyle - the style of the font.Font.getStyle()public int getFontSize()
Font.getSize()public void setFontSize(int fontSize)
fontSize - the size of the font.Font.getSize()public String getLookAndFeelName()
UIManager.LookAndFeelInfo.getName()public void setLookAndFeelName(String lookAndFeelName)
lookAndFeelName - the name of the LaF.UIManager.LookAndFeelInfo.getName()@Nullable public File getNgramDirectory()
public void setNgramDirectory(File dir)
@Nullable public File getWord2VecDirectory()
public void setWord2VecDirectory(File dir)
public Map<ITSIssueType,Color> getErrorColors()
public boolean isStyleCategory(String category)
public void initStyleCategories(List<Rule> allRules)
public boolean isSpecialTabCategory(String category)
public boolean isInSpecialTab(String category, String tabName)
public String[] getSpecialTabNames()
public Set<String> getSpecialTabCategories(String tabName)
public Color getUnderlineColor(String category)
public void setUnderlineColor(String category, Color col)
public void setDefaultUnderlineColor(String category)
public Short getUnderlineType(String category)
public void setUnderlineType(String category, short type)
public void setDefaultUnderlineType(String category)
public Map<String,Integer> getConfigurableValues()
public int getConfigurableValue(String ruleID)
public void setConfigurableValue(String ruleID, int value)
public boolean isSwitchedOff()
public void setSwitchedOff(boolean switchOff,
Language lang)
throws IOException
IOExceptionpublic boolean isValidServerUrl(String url)
public void loadConfiguration(String profile) throws IOException
IOExceptionpublic void saveConfiguration(Language lang) throws IOException
IOException