public static String joinFeatureCollection(List<Feature> collection) { StringBuilder sb = new StringBuilder(); if (collection != null && !collection.isEmpty()) { Iterator<Feature> iterator = collection.iterator(); while (iterator.hasNext()) { Feature field = iterator.next(); String ranges = StringUtils.join(field.getRanges(), ","); sb.append(joinAttributes(field.getFeatureType(), ranges, field.getText())); if (iterator.hasNext()) { sb.append(FIELD_DELIMITER); } } } else { sb.append('-'); } return sb.toString(); }