Class Parameters
- java.lang.Object
-
- net.sf.okapi.common.BaseParameters
-
- net.sf.okapi.common.StringParameters
-
- net.sf.okapi.common.AbstractGroupParameters
-
- net.sf.okapi.filters.plaintext.base.Parameters
-
- net.sf.okapi.filters.plaintext.regex.Parameters
-
- All Implemented Interfaces:
IParameters,ISimplifierRulesParameters
public class Parameters extends Parameters
Parameters of the Regex Plain Text Filter- Version:
- 0.1, 09.06.2009
-
-
Field Summary
Fields Modifier and Type Field Description static intDEF_GROUPstatic intDEF_OPTIONSstatic StringDEF_RULEstatic StringDEF_SAMPLEintregexOptionsJava regex options.StringruleJava regex rule used to extract lines of text.StringsampleSample text for the rule.intsourceGroupJava regex capturing group denoting text to be extracted.-
Fields inherited from class net.sf.okapi.filters.plaintext.base.Parameters
codeFinderRules, preserveWS, subfilter, trimLeading, trimTrailing, unescapeSource, useCodeFinder, wrapMode
-
Fields inherited from class net.sf.okapi.common.StringParameters
buffer
-
Fields inherited from class net.sf.okapi.common.BaseParameters
path
-
Fields inherited from interface net.sf.okapi.common.ISimplifierRulesParameters
SIMPLIFIERRULES, SIMPLIFIERRULES_DISPLAY_NAME, SIMPLIFIERRULES_SHORT_DESC
-
-
Constructor Summary
Constructors Constructor Description Parameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidload(ParametersString buffer)Load from buffer.voidreset()Reset this parameters object to its default values.protected voidsave(ParametersString buffer)Save to buffer.-
Methods inherited from class net.sf.okapi.common.AbstractGroupParameters
fromString, getData, getSimplifierRules, loadFromResource, loadGroup, loadGroup, saveGroup, saveGroup, saveToResource, setSimplifierRules, toString, validateSimplifierRules
-
Methods inherited from class net.sf.okapi.common.StringParameters
fromString, getBoolean, getGroup, getInteger, getString, setBoolean, setGroup, setInteger, setString
-
Methods inherited from class net.sf.okapi.common.BaseParameters
getParametersDescription, getPath, load, load, save, setPath
-
-
-
-
Field Detail
-
DEF_RULE
public static final String DEF_RULE
- See Also:
- Constant Field Values
-
DEF_GROUP
public static final int DEF_GROUP
- See Also:
- Constant Field Values
-
DEF_SAMPLE
public static final String DEF_SAMPLE
- See Also:
- Constant Field Values
-
DEF_OPTIONS
public static final int DEF_OPTIONS
- See Also:
- Constant Field Values
-
rule
public String rule
Java regex rule used to extract lines of text.Default: "(^(?=.+))(.*?)$".
-
sourceGroup
public int sourceGroup
Java regex capturing group denoting text to be extracted.Default: 2.
-
regexOptions
public int regexOptions
Java regex options.Default: Pattern.MULTILINE.
-
sample
public String sample
Sample text for the rule.
-
-
Method Detail
-
load
protected void load(ParametersString buffer)
Description copied from class:AbstractGroupParametersLoad from buffer. The protected buffer variable is visible in all subclasses of BaseParameters.- Overrides:
loadin classParameters
-
reset
public void reset()
Description copied from class:StringParametersReset this parameters object to its default values.Subclasses should override this method to set any initial values and instantiate any objects that require allocation. It is recommended that subclasses also call
super.reset()in the override to ensure that the buffer is empty.- Specified by:
resetin interfaceIParameters- Overrides:
resetin classParameters
-
save
protected void save(ParametersString buffer)
Description copied from class:AbstractGroupParametersSave to buffer. The protected buffer variable is visible in all subclasses of BaseParameters.- Overrides:
savein classParameters
-
-