import java.io.*;
import java.sql.Connection;
import java.sql.SQLException;
import jp.co.areaweb.tools.database.*;

public class Demo {
	/**
	 * メイン
	 *
	 *	java -cp .:SelectBusstop.jar:hayashi_0225.jar:postgresql-9.4.1212.jar osm.jp.SelectBusstop
	 *
	 * @throws IOException
	 * @throws SQLException
	 * @throws ClassNotFoundException
	 * @throws FileNotFoundException
	 * @throws TransformerException
	 * @throws SAXException
	 * @throws ParserConfigurationException */
	public static void main(String[] args) throws FileNotFoundException, ClassNotFoundException, SQLException, IOException
	{
		File dbdir = new File("database");
		if (!dbdir.isDirectory()) {
			dbdir.mkdir();
		}

		Connection con = DatabaseTool.openDb("database");
		//Demo.initDb(con);

		try {
			System.out.println("Connection OK!");
		}
		finally {
			DatabaseTool.closeDb(con);
		}
	}

}