<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.aksw.limes.core.io.config;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.aksw.limes.core.io.config.reader.xml.XMLConfigurationReader;

/**
 * Contains the information necessary to access a knowledge base
 * 
 * @author <NAME> (<EMAIL>)
 * @version Jul 12, 2016
 */
public class KBInfo implements Serializable {

    private static final String DEFAULT_QUERY_TYPE = "sparql";

    private static final long serialVersionUID = 7915400434442160847L;

    protected String id;
    protected String endpoint;
    protected String graph;
    protected String var;
    protected List<String> properties;
    protected List<String> optionalProperties;
    protected ArrayList<String> restrictions;
    protected Map<String, Map<String, String>> functions;
    protected Map<String, String> prefixes;
    protected int pageSize;
    protected String type;
    protected int maxoffset;
    protected int minoffset;

    /**
     * Constructor
     */
    public KBInfo() {
        id = null;
        endpoint = null;
        graph = null;
        restrictions = new ArrayList<>();
        properties = new ArrayList<>();
        optionalProperties = new ArrayList<>();
        prefixes = new HashMap<>();
        functions = new HashMap<>();
        pageSize = -1;      //-1 means query all at once
        type = DEFAULT_QUERY_TYPE;    //default value
        maxoffset  = -1;
        minoffset = -1;
    }

    /**
     * @param var variable name
     */
    public KBInfo(String var) {
        this();
        this.var = var;
    }

    public KBInfo(String id, String endpoint, String graph, String var,
            List<String> properties, List<String> optionalProperties,
            ArrayList<String> restrictions, Map<String, Map<String, String>> functions,
            Map<String, String> prefixes, int pageSize, String type, int minoffset, int maxoffset) {
        super();
        this.id = id;
        this.endpoint = endpoint;
        this.graph = graph;
        this.var = var;
        this.properties = properties;
        this.optionalProperties = optionalProperties;
        this.restrictions = restrictions;
        this.functions = functions;
        this.prefixes = prefixes;
        this.pageSize = pageSize;
        this.type = type;
        this.maxoffset = maxoffset;
        this.minoffset = minoffset;
    }
<commit_msg>enable old KBInfo constructor<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.aksw.limes.core.io.config;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.aksw.limes.core.io.config.reader.xml.XMLConfigurationReader;

/**
 * Contains the information necessary to access a knowledge base
 * 
 * @author <NAME> (<EMAIL>)
 * @version Jul 12, 2016
 */
public class KBInfo implements Serializable {

    private static final String DEFAULT_QUERY_TYPE = "sparql";

    private static final long serialVersionUID = 7915400434442160847L;

    protected String id;
    protected String endpoint;
    protected String graph;
    protected String var;
    protected List<String> properties;
    protected List<String> optionalProperties;
    protected ArrayList<String> restrictions;
    protected Map<String, Map<String, String>> functions;
    protected Map<String, String> prefixes;
    protected int pageSize;
    protected String type;
    protected int maxoffset;
    protected int minoffset;

    /**
     * Constructor
     */
    public KBInfo() {
        id = null;
        endpoint = null;
        graph = null;
        restrictions = new ArrayList<>();
        properties = new ArrayList<>();
        optionalProperties = new ArrayList<>();
        prefixes = new HashMap<>();
        functions = new HashMap<>();
        pageSize = -1;      //-1 means query all at once
        type = DEFAULT_QUERY_TYPE;    //default value
        maxoffset  = -1;
        minoffset = -1;
    }

    /**
     * @param var variable name
     */
    public KBInfo(String var) {
        this();
        this.var = var;
    }

    public KBInfo(String id, String endpoint, String graph, String var,
            List<String> properties, List<String> optionalProperties,
            ArrayList<String> restrictions, Map<String, Map<String, String>> functions,
            Map<String, String> prefixes, int pageSize, String type) {
        super();
        this.id = id;
        this.endpoint = endpoint;
        this.graph = graph;
        this.var = var;
        this.properties = properties;
        this.optionalProperties = optionalProperties;
        this.restrictions = restrictions;
        this.functions = functions;
        this.prefixes = prefixes;
        this.pageSize = pageSize;
        this.type = type;
    }

    public KBInfo(String id, String endpoint, String graph, String var,
                  List<String> properties, List<String> optionalProperties,
                  ArrayList<String> restrictions, Map<String, Map<String, String>> functions,
                  Map<String, String> prefixes, int pageSize, String type, int minoffset, int maxoffset) {
        this(id, endpoint, graph, var, properties, optionalProperties, restrictions, functions,
                prefixes, pageSize, type);
        this.maxoffset = maxoffset;
        this.minoffset = minoffset;
    }

{'fraction_non_alphanumeric': 0.09623208915620025, 'fraction_numerical': 0.010260038917388997, 'mean_word_length': 2.6012738853503183, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '258058', 'n_tokens_mistral': 1548, 'n_tokens_neox': 1486, 'n_words': 466}