}
/**
- * Trims the string and if the string ends with a dot removes it.
- * @param string
- * @return
+ * Trims the string and if the string ends with 1 or more dots removes it.
*/
- public static String removeTrailingDot(String string){
+ public static String removeTrailingDots(String string){
if (string == null){
return null;
}
- if (string.trim().endsWith(".")){
+ while (string.trim().endsWith(".")){
return string.substring(0, string.length() -1);
}
return string;
XMLEvent next = readNoWhitespace(reader);
if (isMyEndingElement(next, parentEvent)) {
if (StringUtils.isNotBlank(text)) {
- String label = CdmUtils.removeTrailingDot(normalize(text));
+ String label = CdmUtils.removeTrailingDots(normalize(text));
TaxonDescription description = getExtractedMarkupMarkedDescription(state, taxon, sourceReference);
NamedAreaLevel level = makeNamedAreaLevel(state,classValue, next);
if (isLocality) {
facade.setLocality(text, getDefaultLanguage(state));
} else {
- text = CdmUtils.removeTrailingDot(text);
+ text = CdmUtils.removeTrailingDots(text);
NamedArea area = makeArea(state, text, areaLevel);
facade.addCollectingArea(area);
}