@Test public void normalize_sedzia_sadu_apelacyjnego() { assertEquals("Bogdan Radomski", judgeNameNormalizer.normalize("Sędzia Sądu Apelacyjnego Bogdan Radomski")); assertEquals("Urszula Wiercińska", judgeNameNormalizer.normalize("Sędzia SA– Urszula Wiercińska")); assertEquals("Hanna Nowicka De Poraj", judgeNameNormalizer.normalize("Sędzia S.A. Hanna Nowicka de Poraj")); assertEquals("Grzegorz Krężołek", judgeNameNormalizer.normalize("Ssa Grzegorz Krężołek")); }
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);  }