Class MultipleTextReplacement
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.MultipleTextReplacement
Replace multiple texts at once.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMultipleTextReplacement
(List<Map.Entry<String, String>> replacements) Initializes this object with a list of replacements.MultipleTextReplacement
(List<Map.Entry<String, String>> replacements, boolean wholeWordsOnly) Initializes this object with a list of replacements.MultipleTextReplacement
(Map<String, String> replacements) Initializes this object with a replacement map.MultipleTextReplacement
(Map<String, String> replacements, boolean wholeWordsOnly) Initializes this object with a replacement map. -
Method Summary
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
pattern
-
replacementLookup
-
-
Constructor Details
-
MultipleTextReplacement
Initializes this object with a list of replacements. The order is important. If the keys share the same prefix the one which comes first is used for replacement. E.g. aa -> x and aaa -> y and input will be aaa, it will return aax- Parameters:
replacements
- map where key is the text to search for and value is the replacement text.wholeWordsOnly
- if true, matches only whole words. if false, then also text within a word can be matched
-
MultipleTextReplacement
Initializes this object with a list of replacements. The order is important. If the keys share the same prefix the one which comes first is used for replacement. E.g. aa -> x and aaa -> y and input will be aaa, it will return aax- Parameters:
replacements
- map where key is the text to search for and value is the replacement text.
-
MultipleTextReplacement
Initializes this object with a replacement map.- Parameters:
replacements
- map where key is the text to search for and value is the replacement text.wholeWordsOnly
- if true, matches only whole words. if false, then also text within a word can be matched
-
MultipleTextReplacement
Initializes this object with a replacement map.- Parameters:
replacements
- map where key is the text to search for and value is the replacement text.
-
-
Method Details
-
replace
-