package app.PREPROCESSING;

/**
 * Created by Petr Flégl on 23.12.2016.
 */
public class PrepConf {

    String dataSource;
    String desctription;
    String datum;
    int datumMin;
    int datumMax;
    double scaleInMin;
    double scaleInMax;
    double scaleOutMin;
    double scaleOutMax;

    public PrepConf(String dataSource, String desctription, String datum, int datumMin, int datumMax, double scaleInMin, double scaleInMax, double scaleOutMin, double scaleOutMax) {
        this.scaleOutMax = scaleOutMax;
        this.scaleOutMin = scaleOutMin;
        this.scaleInMax = scaleInMax;
        this.scaleInMin = scaleInMin;
        this.datumMin = datumMin;
        this.datumMax = datumMax;
        this.datum = datum;
        this.desctription = desctription;
        setDataSource(dataSource);

    }

    public double getScaleOutMax() {
        return scaleOutMax;
    }

    public void setScaleOutMax(double scaleOutMax) {
        this.scaleOutMax = scaleOutMax;
    }

    public double getScaleOutMin() {
        return scaleOutMin;
    }

    public void setScaleOutMin(double scaleOutMin) {
        this.scaleOutMin = scaleOutMin;
    }

    public double getScaleInMax() {
        return scaleInMax;
    }

    public void setScaleInMax(double scaleInMax) {
        this.scaleInMax = scaleInMax;
    }

    public double getScaleInMin() {
        return scaleInMin;
    }

    public void setScaleInMin(double scaleInMin) {
        this.scaleInMin = scaleInMin;
    }





    public String getDesctription() {
        return desctription;
    }

    public void setDesctription(String desctription) {
        this.desctription = desctription;
    }

    public String getDataSource() {
        return dataSource;
    }

    public void setDataSource(String dataSource) {
       String x = dataSource.toLowerCase();
        if (x.contains(":"))
        this.dataSource = x;

        else {
            x=x.replaceAll("\\W+",":");
            this.dataSource=x;
        }
    }

    public String getColumnName(){
        return dataSource.split(":")[1];

    }

    public String getTableName(){
        return dataSource.split(":")[0];

    }
    public String getDatum() {
        return datum;
    }

    public void setDatum(String datum) {
        this.datum = datum;
    }

    public int getDatumMin() {
        return datumMin;
    }

    public void setDatumMin(int datumMin) {
        this.datumMin = datumMin;
    }

    public int getDatumMax() {
        return datumMax;
    }

    public void setDatumMax(int datumMax) {
        this.datumMax = datumMax;
    }


}
