package org.opencb.opencga.core.models.study.configuration;

import java.util.List;

public class InterpretationVariantCallerConfiguration {

    private String id;
    private List<String> columns;
    private List<DataFilter> dataFilters;

    public InterpretationVariantCallerConfiguration() {
    }

    public InterpretationVariantCallerConfiguration(String id, List<String> columns, List<DataFilter> dataFilters) {
        this.id = id;
        this.columns = columns;
        this.dataFilters = dataFilters;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("InterpretationVariantCallerConfiguration{");
        sb.append("id='").append(id).append('\'');
        sb.append(", columns=").append(columns);
        sb.append(", dataFilters=").append(dataFilters);
        sb.append('}');
        return sb.toString();
    }

    public String getId() {
        return id;
    }

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

    public List<String> getColumns() {
        return columns;
    }

    public InterpretationVariantCallerConfiguration setColumns(List<String> columns) {
        this.columns = columns;
        return this;
    }

    public List<DataFilter> getDataFilters() {
        return dataFilters;
    }

    public InterpretationVariantCallerConfiguration setDataFilters(List<DataFilter> dataFilters) {
        this.dataFilters = dataFilters;
        return this;
    }

    public static class DataFilter {

        private String id;
        private String name;
        private Source source;
        private DataType type;
        private String defaultValue;
        private List<String> allowedValues;

        public enum Source {
            FILE,
            SAMPLE
        }

        public DataFilter() {
        }

        public DataFilter(String id, String name, Source source, DataType type) {
            this.name = name;
            this.id = id;
            this.source = source;
            this.type = type;
        }

        public DataFilter(String id, String name, Source source, DataType type, String defaultValue) {
            this.name = name;
            this.id = id;
            this.type = type;
            this.source = source;
            this.defaultValue = defaultValue;
        }

        public DataFilter(String id, String name, Source source, DataType type, String defaultValue, List<String> allowedValues) {
            this.name = name;
            this.id = id;
            this.type = type;
            this.source = source;
            this.defaultValue = defaultValue;
            this.allowedValues = allowedValues;
        }

        @Override
        public String toString() {
            final StringBuilder sb = new StringBuilder("DataFilter{");
            sb.append("id='").append(id).append('\'');
            sb.append(", name='").append(name).append('\'');
            sb.append(", source=").append(source);
            sb.append(", type=").append(type);
            sb.append(", defaultValue='").append(defaultValue).append('\'');
            sb.append(", allowedValues=").append(allowedValues);
            sb.append('}');
            return sb.toString();
        }

        public String getName() {
            return name;
        }

        public DataFilter setName(String name) {
            this.name = name;
            return this;
        }

        public String getId() {
            return id;
        }

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

        public Source getSource() {
            return source;
        }

        public DataFilter setSource(Source source) {
            this.source = source;
            return this;
        }

        public DataType getType() {
            return type;
        }

        public DataFilter setType(DataType type) {
            this.type = type;
            return this;
        }

        public DataFilter setDefaultValue(String defaultValue) {
            this.defaultValue = defaultValue;
            return this;
        }

        public String getDefaultValue() {
            return defaultValue;
        }

        public List<String> getAllowedValues() {
            return allowedValues;
        }

        public DataFilter setAllowedValues(List<String> allowedValues) {
            this.allowedValues = allowedValues;
            return this;
        }
    }

    public enum DataType {
        BOOLEAN,
        STRING,
        NUMERIC,
        CATEGORICAL
    }

}

@@ -54,16 +54,76 @@
 ation;%0A%0A
+import org.opencb.biodata.models.variant.avro.VariantType;%0A%0A
 import j
@@ -214,24 +214,90 @@
  String id;%0A
+    private boolean somatic;%0A    private List%3CVariantType%3E types;%0A
     private 
@@ -491,82 +491,236 @@
 id, 
-List%3CString%3E columns, List%3CDataFilter%3E dataFilters) %7B%0A        this.id = id
+boolean somatic, List%3CVariantType%3E types, List%3CString%3E columns,%0A                                                    List%3CDataFilter%3E dataFilters) %7B%0A        this.id = id;%0A        this.somatic = somatic;%0A        this.types = types
 ;%0A  
@@ -981,32 +981,126 @@
 ).append('%5C'');%0A
+        sb.append(%22, somatic=%22).append(somatic);%0A        sb.append(%22, types=%22).append(types);%0A
         sb.appen
@@ -1417,32 +1417,453 @@
 rn this;%0A    %7D%0A%0A
+    public boolean isSomatic() %7B%0A        return somatic;%0A    %7D%0A%0A    public InterpretationVariantCallerConfiguration setSomatic(boolean somatic) %7B%0A        this.somatic = somatic;%0A        return this;%0A    %7D%0A%0A    public List%3CVariantType%3E getTypes() %7B%0A        return types;%0A    %7D%0A%0A    public InterpretationVariantCallerConfiguration setTypes(List%3CVariantType%3E types) %7B%0A        this.types = types;%0A        return this;%0A    %7D%0A%0A
     public List%3C

add new fields to VariantCallerConfiguration class