package org.coderepos.nori090.sen;

import java.io.IOException;
import java.util.Properties;

public class GosenConfig {
    private static final String path = "/net/java/sen/sen.properties";

    private static GosenConfig config;

    private Properties p;

    private GosenConfig() {
        p = new Properties();
        try {
            p.load( GosenConfig.class.getResourceAsStream( path ) );
        }
        catch ( IOException e ) {
            e.printStackTrace();
        }
    }

    public static GosenConfig getInstance() {
        if ( config == null ) {
            config = new GosenConfig();
        }
        return config;
    }

    public String getDictionaryPath() {
        return (String) p.get( "dictionary" );
    }
}
