public static class ReplaceTagger.Replacement extends Object
Constructor and Description |
---|
Replacement() |
Replacement(String fromField,
String fromValue,
String toField,
String toValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
String |
getFromField() |
String |
getFromValue() |
String |
getToField() |
String |
getToValue() |
int |
hashCode() |
boolean |
isCaseSensitive()
Whether the replacement should be case sensitive or not.
|
boolean |
isRegex() |
boolean |
isReplaceAll() |
boolean |
isWholeMatch() |
void |
setCaseSensitive(boolean caseSensitive)
Sets whether to do a case sensitive replacement or not.
|
void |
setFromField(String fromField)
Sets the field with the value to replace.
|
void |
setFromValue(String fromValue)
Sets the value to replace.
|
void |
setRegex(boolean regex)
Sets whether the
fromValue is a regular expression. |
void |
setReplaceAll(boolean replaceAll)
Sets whether to replace all occurrences of the "from" value
with the "to" value.
|
void |
setToField(String toField)
Sets the field to store the replaced value.
|
void |
setToValue(String toValue)
Sets the replacement value.
|
void |
setWholeMatch(boolean wholeMatch)
Sets whether the specified "from" value should match the entire
field value or not (default is
false ). |
String |
toString() |
public String getFromField()
public String getFromValue()
public String getToField()
public String getToValue()
public boolean isRegex()
public boolean isWholeMatch()
public boolean isReplaceAll()
public boolean isCaseSensitive()
public void setFromField(String fromField)
fromField
- field with the value to replacepublic void setFromValue(String fromValue)
fromValue
- the value to replacepublic void setToField(String toField)
toField
- field to store the replaced valuepublic void setToValue(String toValue)
toValue
- the replacement valuepublic void setRegex(boolean regex)
fromValue
is a regular expression.regex
- true
if fromValue
is a
regular expressionpublic void setCaseSensitive(boolean caseSensitive)
caseSensitive
- true
if doing a case sensitive
replacementpublic void setWholeMatch(boolean wholeMatch)
false
).wholeMatch
- true for whole matchpublic void setReplaceAll(boolean replaceAll)
false
).replaceAll
- true to replace all occurrencesCopyright © 2009–2021 Norconex Inc.. All rights reserved.