package eu.dnetlib.domain.data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class RepositoryInterface implements Serializable {

	private static final long serialVersionUID = 8013272950607614479L;

	// FOR VALIDATOR
	private String desiredCompatibilityLevel;
	private String upgradeToV3;
	private boolean deleteApi; 
	private String accessSet;
	private String accessFormat;

	// FOR DATASOURCE MANAGER SERVICE
	private String id;
	private String typology;
	private String compliance;
	private String contentDescription;
	private String accessProtocol;
	private String baseUrl;
	private boolean active = false;
	private boolean removable = false;
	private Map<String, String> accessParams = new HashMap<String, String>();
	private Map<String, String> extraFields = new HashMap<String, String>();

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTypology() {
		return typology;
	}

	public void setTypology(String typology) {
		this.typology = typology;
	}

	public String getCompliance() {
		return compliance;
	}

	public void setCompliance(String compliance) {
		this.compliance = compliance;
	}

	public String getContentDescription() {
		return contentDescription;
	}

	public void setContentDescription(String contentDescription) {
		this.contentDescription = contentDescription;
	}

	public String getAccessProtocol() {
		return accessProtocol;
	}

	public void setAccessProtocol(String accessProtocol) {
		this.accessProtocol = accessProtocol;
	}

	public String getBaseUrl() {
		return baseUrl;
	}

	public void setBaseUrl(String baseUrl) {
		this.baseUrl = baseUrl;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public boolean isRemovable() {
		return removable;
	}

	public void setRemovable(boolean removable) {
		this.removable = removable;
	}

	public Map<String, String> getAccessParams() {
		return accessParams;
	}

	public void setAccessParams(Map<String, String> accessParams) {
		this.accessParams = accessParams;
	}

	public Map<String, String> getExtraFields() {
		return extraFields;
	}

	public void setExtraFields(Map<String, String> extraFields) {
		this.extraFields = extraFields;
	}

	public String getAccessSet() {
		this.accessSet = accessParams.get("SET");
		return accessSet;
	}

	public void setAccessSet(String accessSet) {
		this.accessSet = accessSet;
		this.accessParams.put("SET", accessSet);
	}

	public String getAccessFormat() {
		this.accessFormat = accessParams.get("FORMAT");
		return accessFormat;
	}

	public void setAccessFormat(String accessFormat) {
		this.accessFormat = accessFormat;
		this.accessParams.put("FORMAT", accessFormat);
	}

	public String getUpgradeToV3() {
		return upgradeToV3;
	}

	public void setUpgradeToV3(String upgradeToV3) {
		this.upgradeToV3 = upgradeToV3;
	}

	public boolean isDeleteApi() {
		return deleteApi;
	}

	public void setDeleteApi(boolean deleteApi) {
		this.deleteApi = deleteApi;
	}

	public String getDesiredCompatibilityLevel() {
		return desiredCompatibilityLevel;
	}

	public void setDesiredCompatibilityLevel(String desiredCompatibilityLevel) {
		this.desiredCompatibilityLevel = desiredCompatibilityLevel;
	}

}
