@@ -0,0 +1,2692 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage at.illecker.storm.examples.util;%0A%0Aimport java.io.File;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class Configuration %7B%0A%0A  private static final Logger LOG = LoggerFactory%0A      .getLogger(Configuration.class);%0A  private static final Configuration instance = new Configuration();%0A%0A  private static final String CONF_WORD_LIST_PATH = %22resources%22%0A      + File.separator + %22wordlists%22;%0A%0A  private String m_userDir;%0A  private String m_workingDir;%0A  private String m_classPath;%0A  private boolean m_runningFromJar;%0A%0A  private Configuration() %7B%0A    m_userDir = System.getProperty(%22user.dir%22);%0A%0A    m_classPath = Configuration.class.getResource(%22Configuration.class%22)%0A        .toString();%0A    if (m_classPath.startsWith(%22jar:%22)) %7B%0A      LOG.info(%22Running within a jar file...%22);%0A      m_runningFromJar = true;%0A    %7D else %7B%0A      LOG.info(%22Running outside of a jar file...%22);%0A      m_runningFromJar = false;%0A      m_workingDir = m_userDir;%0A    %7D%0A  %7D%0A%0A  public static Configuration getInstance() %7B%0A    return instance;%0A  %7D%0A%0A  public Map%3CString, String%3E getSlangWordlists() %7B%0A    String wordListDir = m_workingDir + File.separator + CONF_WORD_LIST_PATH%0A        + File.separator;%0A    Map%3CString, String%3E slangWordLists = new HashMap%3CString, String%3E();%0A    // Add SentStrength SlangLookupTable%0A    slangWordLists.put(wordListDir%0A        + %22SentStrength_Data_Sept2011_SlangLookupTable.txt%22, %22%5Ct%22);%0A    // Add GATE SlangLookupTable orth.en%0A    slangWordLists.put(wordListDir + %22GATE_slang.en.csv%22, %22,%22);%0A    return slangWordLists;%0A  %7D%0A%0A  @Override%0A  public String toString() %7B%0A    return %22Configuration %5BclassPath=%22 + m_classPath + %22, runningFromJar=%22%0A        + m_runningFromJar + %22, workingDir=%22 + m_workingDir + %22%5D%22;%0A  %7D%0A%0A  public static void main(String%5B%5D args) %7B%0A    System.out.println(Configuration.getInstance());%0A  %7D%0A%7D%0A

Add global Configuration class