
org.geomajas.rest.server.mvc.StringToStringArrayConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geomajas-face-rest Show documentation
Show all versions of geomajas-face-rest Show documentation
Geomajas server: REST - Implementation
The newest version!
/*
* This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
*
* Copyright 2008-2016 Geosparc nv, http://www.geosparc.com/, Belgium.
*
* The program is available in open source according to the GNU Affero
* General Public License. All contributions in this program are covered
* by the Geomajas Contributors License Agreement. For full licensing
* details, see LICENSE.txt in the project root.
*/
package org.geomajas.rest.server.mvc;
import org.springframework.core.convert.converter.Converter;
/**
* Converts a comma-separated string to an array of strings.
*
* @author Jan De Moerloose
*
*/
public class StringToStringArrayConverter implements Converter {
private String regexSplitter = "[\\s,]+";
public String[] convert(String source) {
return source.trim().split(regexSplitter);
}
public String getRegexSplitter() {
return regexSplitter;
}
public void setRegexSplitter(String regexSplitter) {
this.regexSplitter = regexSplitter;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy