All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.unterrainer.commons.httpserver.rql.RqlData Maven / Gradle / Ivy

There is a newer version: 0.3.14
Show newest version
package info.unterrainer.commons.httpserver.rql;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import lombok.Data;
import lombok.RequiredArgsConstructor;

@Data
@RequiredArgsConstructor
public class RqlData {
	private List parsedCommand = new ArrayList<>();
	private Map params = new HashMap<>();
	private Map queryString = new HashMap<>();

	public String getParsedCommandAsString() {
		return String.join("", parsedCommand.stream().map(RqlDataElement::getValue).collect(Collectors.toList()));
	}

	public String getQueryStringAsString() {
		return String.join("&",
				queryString.entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.toList()));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy