Package net.sf.okapi.filters.regex
Class Rule
- java.lang.Object
-
- net.sf.okapi.filters.regex.Rule
-
public class Rule extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected InlineCodeFindercodeFinderprotected booleancollapseNewlineprotected Stringexprprotected intnameGroupprotected intnoteGroupprotected Patternpatternprotected booleanpreserveWSprotected StringpropertyNameprotected StringpropertyValueprotected StringruleNameprotected intruleTypestatic intRULETYPE_CLOSEGROUPstatic intRULETYPE_COMMENTstatic intRULETYPE_CONTENTstatic intRULETYPE_NOTRANSstatic intRULETYPE_OPENGROUPstatic intRULETYPE_STRINGprotected Stringsampleprotected intsourceGroupprotected inttargetGroupprotected booleanuseCodeFinder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfromString(String data)StringgetCodeFinderRules()booleangetCollapseNewline()StringgetExpression()intgetNameGroup()intgetNoteGroup()StringgetPropertyName()StringgetPropertyValue()StringgetRuleName()intgetRuleType()StringgetSample()intgetSourceGroup()intgetTargetGroup()booleanpreserveWS()voidsetCodeFinderRules(String value)voidsetCollapseNewline(boolean value)voidsetExpression(String value)voidsetNameGroup(int index)voidsetNoteGroup(int index)voidsetPreserveWS(boolean value)voidsetPropertyName(String value)voidsetPropertyValue(String value)voidsetRuleName(String value)voidsetRuleType(int value)voidsetSample(String value)voidsetSourceGroup(int index)voidsetTargetGroup(int index)voidsetUseCodeFinder(boolean value)StringtoString()booleanuseCodeFinder()
-
-
-
Field Detail
-
RULETYPE_STRING
public static final int RULETYPE_STRING
- See Also:
- Constant Field Values
-
RULETYPE_CONTENT
public static final int RULETYPE_CONTENT
- See Also:
- Constant Field Values
-
RULETYPE_COMMENT
public static final int RULETYPE_COMMENT
- See Also:
- Constant Field Values
-
RULETYPE_NOTRANS
public static final int RULETYPE_NOTRANS
- See Also:
- Constant Field Values
-
RULETYPE_OPENGROUP
public static final int RULETYPE_OPENGROUP
- See Also:
- Constant Field Values
-
RULETYPE_CLOSEGROUP
public static final int RULETYPE_CLOSEGROUP
- See Also:
- Constant Field Values
-
ruleName
protected String ruleName
-
expr
protected String expr
-
ruleType
protected int ruleType
-
preserveWS
protected boolean preserveWS
-
useCodeFinder
protected boolean useCodeFinder
-
codeFinder
protected InlineCodeFinder codeFinder
-
collapseNewline
protected boolean collapseNewline
-
propertyName
protected String propertyName
-
propertyValue
protected String propertyValue
-
sample
protected String sample
-
sourceGroup
protected int sourceGroup
-
targetGroup
protected int targetGroup
-
nameGroup
protected int nameGroup
-
noteGroup
protected int noteGroup
-
pattern
protected Pattern pattern
-
-
Constructor Detail
-
Rule
public Rule()
-
Rule
public Rule(Rule obj)
-
-
Method Detail
-
getRuleName
public String getRuleName()
-
setRuleName
public void setRuleName(String value)
-
getExpression
public String getExpression()
-
setExpression
public void setExpression(String value)
-
getSample
public String getSample()
-
setSample
public void setSample(String value)
-
getRuleType
public int getRuleType()
-
setRuleType
public void setRuleType(int value)
-
getSourceGroup
public int getSourceGroup()
-
setSourceGroup
public void setSourceGroup(int index)
-
getTargetGroup
public int getTargetGroup()
-
setTargetGroup
public void setTargetGroup(int index)
-
getNameGroup
public int getNameGroup()
-
setNameGroup
public void setNameGroup(int index)
-
getNoteGroup
public int getNoteGroup()
-
setNoteGroup
public void setNoteGroup(int index)
-
preserveWS
public boolean preserveWS()
-
setPreserveWS
public void setPreserveWS(boolean value)
-
getPropertyName
public String getPropertyName()
-
setPropertyName
public void setPropertyName(String value)
-
getPropertyValue
public String getPropertyValue()
-
setPropertyValue
public void setPropertyValue(String value)
-
useCodeFinder
public boolean useCodeFinder()
-
setUseCodeFinder
public void setUseCodeFinder(boolean value)
-
getCodeFinderRules
public String getCodeFinderRules()
-
setCodeFinderRules
public void setCodeFinderRules(String value)
-
getCollapseNewline
public boolean getCollapseNewline()
-
setCollapseNewline
public void setCollapseNewline(boolean value)
-
fromString
public void fromString(String data)
-
-