/**
 * Copyright 2008-2009 DRIVER PROJECT (Bielefeld University)
 * Original author: Marek Imialek <marek.imialek at uni-bielefeld.de>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package eu.dnetlib.data.utility.download.dataprov;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;


/**
 * Basic bulk data DTO.
 * 
 * @author <a href="mailto:marek.imialek at uni-bielefeld.de">Marek Imialek</a>
 * @version
 */
public class CreateBasicBulkDataDTO {

	/** The st id. */
	private String processId;

	/** The object types. */
	private List<String> objectTypes;

	/** The cache. */
	private ArrayList<String> cache;

	/** The total number of results. */
	private int totalNumberOfResults;

	/** The return xmls. */
	private boolean  returnXmls = false;
	
	public CreateBasicBulkDataDTO() {
		this.processId = generateBulkDataId();
	}
	
	/**
	 * Generate bulk data id.
	 * 
	 * @return the string
	 */
	public static String generateBulkDataId() {
		return "driver-ds-bk-id" + UUID.randomUUID().toString();
	}

	/**
	 * Gets the cache.
	 * 
	 * @return the cache
	 */
	public ArrayList<String> getCache() {
		return this.cache;
	}

	/**
	 * Sets the cache.
	 * 
	 * @param cache the new cache
	 */
	public void setCache(ArrayList<String> cache) {
		this.cache = cache;
	}

	/**
	 * Gets the id.
	 * 
	 * @return the id
	 */
	public String getId() {
		return this.processId;
	}

	/**
	 * Sets the id.
	 * 
	 * @param stId the new id
	 */
	public void setId(String processId) {
		this.processId = processId;
	}

	/**
	 * Gets the object types.
	 * 
	 * @return the object types
	 */
	public List<String> getObjectTypes() {
		return this.objectTypes;
	}

	/**
	 * Sets the object types.
	 * 
	 * @param objectTypes the new object types
	 */
	public void setObjectTypes(List<String> objectTypes) {
		this.objectTypes = objectTypes;
	}

	/**
	 * Sets the total number of results.
	 * 
	 * @param totalNumberOfResults the new total number of results
	 */
	public void setTotalNumberOfResults(Integer totalNumberOfResults) {
		this.totalNumberOfResults = totalNumberOfResults;

	}

	/**
	 * Gets the total number of results.
	 * 
	 * @return the total number of results
	 */
	public int getTotalNumberOfResults() {
		return this.totalNumberOfResults;
	}

	/**
	 * Sets the return xmls.
	 * 
	 * @param b the new return xmls
	 */
	public void setReturnXmls(boolean b) {
		this.returnXmls = b;
		
	}
	
	/**
	 * Return xmls.
	 * 
	 * @return true, if successful
	 */
	public boolean returnXmls() {
		return this.returnXmls;
	}

}
