@Test public void normalize_part_withDots() { assertEquals("Jan Nowak", judgeNameNormalizer.normalize("SA. Jan Nowak ")); assertEquals("Jan Nowak", judgeNameNormalizer.normalize("SA . Jan Nowak ")); assertEquals("Jan Nowak", judgeNameNormalizer.normalize("Jan Nowak SA. ")); }
public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); }
JudgeNameNormalizer { public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); } }
JudgeNameNormalizer { public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); }  }
JudgeNameNormalizer { public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); }  String normalize(String judgeName); @PostConstruct void postConstruct(); void setPartsToRemove(String[] partsToRemove); void setRegexesToRemove(String[] regexesToRemove); }
JudgeNameNormalizer { public String normalize(String judgeName) { if (StringUtils.isBlank(judgeName)) { return ""; } judgeName = PersonNameNormalizer.normalize(judgeName); judgeName = StringTools.toRootLowerCase(judgeName); judgeName = removeDefinedParts(judgeName); judgeName = removeTrailingDashes(judgeName); judgeName = removeTrailingDots(judgeName); return PersonNameNormalizer.normalize(judgeName); }  String normalize(String judgeName); @PostConstruct void postConstruct(); void setPartsToRemove(String[] partsToRemove); void setRegexesToRemove(String[] regexesToRemove);  }