public AutoSPARQLSession(
      Dataset dataset,
      String cacheDir,
      String servletContextPath,
      QuestionProcessor questionPreprocessor) {
    this.dataset = dataset;
    this.servletContextPath = servletContextPath;
    this.questionPreprocessor = questionPreprocessor;

    endpoint = dataset.getEndpoint();

    search = dataset.getSearchIndex();
    search.setQuestionPreprocessor(questionPreprocessor);

    constructCache =
        new ExtractionDBCache(cacheDir + "/" + endpoint.getPrefix() + "/construct-cache");
    selectCache = new ExtractionDBCache(cacheDir + "/" + endpoint.getPrefix() + "/select-cache");

    exampleFinder =
        new ExampleFinder(endpoint, selectCache, constructCache, search, questionPreprocessor);

    property2LabelMap = new TreeMap<String, String>();
    property2DatatypeMap = new HashMap<String, Class>();
    propertiesCache = new TreeMap<String, Map<String, Object>>();
    examplesCache = new HashMap<String, Example>();
  }
  public AutoSPARQLSession(String cacheDir, String servletContextPath, String solrURL) {
    this.servletContextPath = servletContextPath;

    constructCache =
        new ExtractionDBCache(cacheDir + "/" + endpoint.getPrefix() + "/construct-cache");
    selectCache = new ExtractionDBCache(cacheDir + "/" + endpoint.getPrefix() + "/select-cache");
    search = new SolrSearch(solrURL);
    exampleFinder =
        new ExampleFinder(endpoint, selectCache, constructCache, search, questionPreprocessor);
  }