// Path: src/main/java/com/feedzai/fos/impl/weka/utils/pool/GenericObjectPoolConfig.java
// public class GenericObjectPoolConfig extends GenericObjectPool.Config {
//     public void setMinIdle(int minIdle) {
//         super.minIdle = minIdle;
//     }
// 
//     public void setLifo(boolean lifo) {
//         super.lifo = lifo;
//     }
// 
//     public void setMaxActive(int maxActive) {
//         super.maxActive = maxActive;
//     }
// 
//     public void setMaxIdle(int maxIdle) {
//         super.maxIdle = maxIdle;
//     }
// 
//     public void setMaxWait(long maxWait) {
//         super.maxWait = maxWait;
//     }
// 
//     public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) {
//         super.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
//     }
// 
//     public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
//         super.numTestsPerEvictionRun = numTestsPerEvictionRun;
//     }
// 
//     public void setSoftMinEvictableIdleTimeMillis(long softMinEvictableIdleTimeMillis) {
//         super.softMinEvictableIdleTimeMillis = softMinEvictableIdleTimeMillis;
//     }
// 
//     public void setTestOnBorrow(boolean testOnBorrow) {
//         super.testOnBorrow = testOnBorrow;
//     }
// 
//     public void setTestOnReturn(boolean testOnReturn) {
//         super.testOnReturn = testOnReturn;
//     }
// 
//     public void setTestWhileIdle(boolean testWhileIdle) {
//         super.testWhileIdle = testWhileIdle;
//     }
// 
//     public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) {
//         super.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
//     }
// 
//     public void setWhenExhaustedAction(byte whenExhaustedAction) {
//         super.whenExhaustedAction = whenExhaustedAction;
//     }
// }


import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import static com.google.common.base.Preconditions.checkNotNull;
import com.feedzai.fos.api.*;
import com.feedzai.fos.common.validation.NotNull;
import com.feedzai.fos.impl.weka.utils.pool.GenericObjectPoolConfig;
import com.google.common.collect.ImmutableList;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationConverter;
import org.apache.commons.configuration.MapConfiguration;
import java.io.File;
/*
 * $#
 * FOS Weka
 *  
 * Copyright (C) 2013 Feedzai SA
 *  
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public 
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/gpl-3.0.html>.
 * #$
 */
package com.feedzai.fos.impl.weka.config;




/**
 * Represents header that defines the schema of the machine learning model.
 *
 * @author Marco Jorge (marco.jorge@gmail.com)
 */
public class WekaModelConfig {
    /**
     * The property name of the classIndex.
     * <p/> The classIndex is an integer that indicates the position of the classified instance fields (0 based).
     */
    public static final String CLASS_INDEX = "classIndex";

    /**
     * The property name of the model file.
     * <p/> The model file is the serialized Classifier that will be used for classification.
     */
    public static final String MODEL_FILE = "model";


    /**
     * The property name of a boolean that indicates if the classifier is thread safe..
     * <p/> If the model is thread safe then @{WekaThreadSafeScorerPassthrough} will be used, else @{WekaThreadSafeScorerPool} will be used.
     */
    public static final String IS_CLASSIFIER_THREAD_SAFE = "isClassifierThreadSafe";

    /**
     * The property name that defines the weka classifier class (FQCN).
     */
    public static final String CLASSIFIER_IMPL = "classifierimpl";

    /**
     * The property name of the ID of the model.
     */
    public static final String ID = "id";

    /**
     * The property name of the model configuration.
     */
    public static final String CLASSIFIER_CONFIG = "config";

    /**
     * The property name of the format the classifier is in (e.g. PMML, binary, etc).
     */
    public static final String CLASSIFIER_FORMAT = "format";


    private ModelConfig modelConfig;
    private WekaManagerConfig wekaManagerConfig;
    private int classIndex;
    private File model;
    private UUID id;
    private transient File header;
    private transient boolean dirty = true;
    private boolean classifierThreadSafe;
// Path: src/main/java/com/feedzai/fos/impl/weka/utils/pool/GenericObjectPoolConfig.java
// public class GenericObjectPoolConfig extends GenericObjectPool.Config {
//     public void setMinIdle(int minIdle) {
//         super.minIdle = minIdle;
//     }
// 
//     public void setLifo(boolean lifo) {
//         super.lifo = lifo;
//     }
// 
//     public void setMaxActive(int maxActive) {
//         super.maxActive = maxActive;
//     }
// 
//     public void setMaxIdle(int maxIdle) {
//         super.maxIdle = maxIdle;
//     }
// 
//     public void setMaxWait(long maxWait) {
//         super.maxWait = maxWait;
//     }
// 
//     public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) {
//         super.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
//     }
// 
//     public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) {
//         super.numTestsPerEvictionRun = numTestsPerEvictionRun;
//     }
// 
//     public void setSoftMinEvictableIdleTimeMillis(long softMinEvictableIdleTimeMillis) {
//         super.softMinEvictableIdleTimeMillis = softMinEvictableIdleTimeMillis;
//     }
// 
//     public void setTestOnBorrow(boolean testOnBorrow) {
//         super.testOnBorrow = testOnBorrow;
//     }
// 
//     public void setTestOnReturn(boolean testOnReturn) {
//         super.testOnReturn = testOnReturn;
//     }
// 
//     public void setTestWhileIdle(boolean testWhileIdle) {
//         super.testWhileIdle = testWhileIdle;
//     }
// 
//     public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) {
//         super.timeBetweenEvictionRunsMillis = timeBetweenEvictionRunsMillis;
//     }
// 
//     public void setWhenExhaustedAction(byte whenExhaustedAction) {
//         super.whenExhaustedAction = whenExhaustedAction;
//     }
// }


// Path: src/main/java/com/feedzai/fos/impl/weka/config/WekaModelConfig.java
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import static com.google.common.base.Preconditions.checkNotNull;
import com.feedzai.fos.api.*;
import com.feedzai.fos.common.validation.NotNull;
import com.feedzai.fos.impl.weka.utils.pool.GenericObjectPoolConfig;
import com.google.common.collect.ImmutableList;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationConverter;
import org.apache.commons.configuration.MapConfiguration;
import java.io.File;

/*
 * $#
 * FOS Weka
 *  
 * Copyright (C) 2013 Feedzai SA
 *  
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public 
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/gpl-3.0.html>.
 * #$
 */
package com.feedzai.fos.impl.weka.config;




/**
 * Represents header that defines the schema of the machine learning model.
 *
 * @author Marco Jorge (marco.jorge@gmail.com)
 */
public class WekaModelConfig {
    /**
     * The property name of the classIndex.
     * <p/> The classIndex is an integer that indicates the position of the classified instance fields (0 based).
     */
    public static final String CLASS_INDEX = "classIndex";

    /**
     * The property name of the model file.
     * <p/> The model file is the serialized Classifier that will be used for classification.
     */
    public static final String MODEL_FILE = "model";


    /**
     * The property name of a boolean that indicates if the classifier is thread safe..
     * <p/> If the model is thread safe then @{WekaThreadSafeScorerPassthrough} will be used, else @{WekaThreadSafeScorerPool} will be used.
     */
    public static final String IS_CLASSIFIER_THREAD_SAFE = "isClassifierThreadSafe";

    /**
     * The property name that defines the weka classifier class (FQCN).
     */
    public static final String CLASSIFIER_IMPL = "classifierimpl";

    /**
     * The property name of the ID of the model.
     */
    public static final String ID = "id";

    /**
     * The property name of the model configuration.
     */
    public static final String CLASSIFIER_CONFIG = "config";

    /**
     * The property name of the format the classifier is in (e.g. PMML, binary, etc).
     */
    public static final String CLASSIFIER_FORMAT = "format";


    private ModelConfig modelConfig;
    private WekaManagerConfig wekaManagerConfig;
    private int classIndex;
    private File model;
    private UUID id;
    private transient File header;
    private transient boolean dirty = true;
    private boolean classifierThreadSafe;
    private Configuration configuration;