/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.csu.sdmx.web.model;

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

/**
 *
 * @author themi
 */
public class ConditionImportResult {
    private String expression;
    private List<String> errors;
    private String json;

    public ConditionImportResult() {
        errors = new ArrayList<>();
    }
    
    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public List<String> getErrors() {
        return errors;
    }

    public void setErrors(List<String> errors) {
        this.errors = errors;
    }

    public String getJson() {
        return json;
    }

    public void setJson(String json) {
        System.out.println("--*" + json);
        this.json = json;
    }
    
    public void addError(String error){
        errors.add(error);
    }
    
    public boolean hasErrors(){
        return !errors.isEmpty();
    }
    
    public int getErrorCount(){
        return errors.size();
    }
    
}
