/**
 * Copyright (c) 2003-2004 System Integrator Corporation.
 *                 All Rights Reserved.
 */
package jp.co.sint.config;

import java.io.File;

import jp.co.sint.tools.SIUtil;

/**
 * Description:
 * @version $Id: SIZipConf.java,v 1.0 2004/03/15 Exp $
 * @author : Jinwang Chen
 * @history
 * Author         Date                Reason
 * ============   ==================  ===========================
 * Jinwang Chen   2004/03/15 18:55:59  Original
 */
public class SIZipConf {
  //zipdicディレクトリまでのフォルダ名
  private static String zipDicDir=SIConfig.SIZIP_DIC_DIR;

  //郵便番号辞書ライブラリ１
  public final static String SIZIP_DIC_LIB1="satoe1.dic";

  //郵便番号辞書ライブラリ2
  public final static String SIZIP_DIC_LIB2="satoe2.dic";

  public SIZipConf(){
  }
  
  public static void setZipDicDir(String lZipDicDir){
    if (SIUtil.isNull(lZipDicDir))lZipDicDir="";
    zipDicDir=lZipDicDir;
  }

  public static String getZipDicDir(){
    return zipDicDir;
  }

  public static boolean isExist(){
    try {
      Class.forName("jp.co.sint.zipdic.ZipDic");
      File lDicLib1 = new File(getZipDicDir()+"/"+SIZIP_DIC_LIB1);
      File lDicLib2 = new File(getZipDicDir()+"/"+SIZIP_DIC_LIB2);
      return (lDicLib1.exists()&&lDicLib2.exists());
    } catch (ClassNotFoundException e) {
      return false;
    }

  }
}
