/*
 * Knowage, Open Source Business Intelligence suite
 * Copyright (C) 2016 Engineering Ingegneria Informatica S.p.A.
 *
 * Knowage is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Knowage is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package it.eng.knowage.document.export.cockpit.converter;

import org.json.JSONObject;

/**
 * @author Dragan Pirkovic
 *
 */
public class JsonConfigurationBuilder {

	private final JsonConfigurationImpl dataStoreConfigurationImpl;

	/**
	 *
	 */
	public JsonConfigurationBuilder() {
		dataStoreConfigurationImpl = new JsonConfigurationImpl();
	}

	/**
	 * @param dataset
	 *            the dataset to set
	 */
	public JsonConfigurationBuilder setDataset(String datasetLabel) {
		dataStoreConfigurationImpl.setDataset(datasetLabel);
		return this;
	}

	public JsonConfigurationBuilder setParameter(JSONObject parameters) {
		dataStoreConfigurationImpl.setParameters(parameters);
		return this;
	}

	public JsonConfigurationBuilder setSelections(JSONObject selections) {
		dataStoreConfigurationImpl.setSelections(selections);
		return this;
	}

	public JsonConfigurationBuilder setLikeSelections(JSONObject likeSelections) {
		dataStoreConfigurationImpl.setLikeSelections(likeSelections);
		return this;
	}

	public JsonConfigurationBuilder setAggregations(JSONObject aggregations) {
		dataStoreConfigurationImpl.setAggregations(aggregations);
		return this;
	}

	public JsonConfigurationBuilder setSummaryRow(JSONObject summaryRow) {
		dataStoreConfigurationImpl.setSummaryRow(summaryRow);
		return this;
	}

	public JsonConfigurationBuilder setOptions(JSONObject options) {
		dataStoreConfigurationImpl.setOptions(options);
		return this;
	}

	public JsonConfigurationImpl build() {
		return dataStoreConfigurationImpl;

	}

}
