package eu.dnetlib.openaire.community.selectioncriteria;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.google.gson.Gson;

@JsonAutoDetect
public class SelectionCriteria implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 4303936216579280542L;

	private List<Constraints> criteria;

	public SelectionCriteria() {}

	public List<Constraints> getCriteria() {
		return criteria;
	}

	public void setCriteria(final List<Constraints> criteria) {
		this.criteria = criteria;
	}

	public static SelectionCriteria fromJson(final String json) {
		return new Gson().fromJson(json, SelectionCriteria.class);

	}
}
