// Path: src/com/database/DatabaseConnector.java
// public class DatabaseConnector {
// 	private static Connection connection = null;
// 	private static Logger log = Logger.getLogger(DatabaseConnector.class);
// 	/*
// 	 * make connection as soon as the class is loaded
// 	 */
// 	static {
// 		makeConnection();
// 	}
// 	
// 	/*
// 	 * method to make the connection with the database
// 	 */
// 	public static void makeConnection() {
// 
// 		try {
// 			PropertiesReader.load();
// 			// get the connection with the database
// 			Class.forName("com.mysql.jdbc.Driver");
// 			connection = DriverManager.getConnection(PropertiesReader.getUrl(),
// 					PropertiesReader.getUser(), PropertiesReader.getPassword());
// 			System.out.println("MySQL JDBC Driver Registered!");
// 			log.debug("MySQL JDBC Driver Registered!");
// 		} catch (SQLException e) {
// 			System.out.println("Connection Failed! Check output console");
// 			e.printStackTrace();
// 			log.fatal(e);
// 			return;
// 		} catch (ClassNotFoundException e) {
// 			e.printStackTrace();
// 			log.fatal(e);
// 		}
// 	}
// 
// 	/*
// 	 * method to check if database is connected
// 	 */
// 	public static boolean isConnected() {
// 		if (connection != null) {
// 			try {
// 				return !connection.isClosed();
// 			} catch (SQLException e) {
// 				e.printStackTrace();
// 			}
// 			return true;
// 		}
// 		return false;
// 	}
// 
// 	/*
// 	 * method the close the connection with database.
// 	 */
// 	public static void closeConnection() {
// 		try {
// 			connection.close();
// 		} catch (SQLException e) {
// 			// TODO Auto-generated catch block
// 			e.printStackTrace();
// 			log.error(e);
// 		}
// 	}
// 
// 	public static Connection getConnection() {
// 		if(connection == null) {
// 			makeConnection();
// 		}
// 		return connection;
// 	}
// }
// 
// Path: src/com/learningmodule/association/conceptdrug/model/ConceptWordModel.java
// public class ConceptWordModel {
// 	private String conceptId;
// 	private String conceptWord;
// 
// 	public ConceptWordModel(String conceptId, String conceptWord) {
// 		super();
// 		this.conceptId = conceptId;
// 		this.conceptWord = conceptWord;
// 	}
// 
// 	public String getConceptId() {
// 		return conceptId;
// 	}
// 
// 	public String getConceptWord() {
// 		return conceptWord;
// 	}
// }


import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.LinkedList;
import com.database.DatabaseConnector;
import com.learningmodule.association.conceptdrug.model.ConceptWordModel;
package com.learningmodule.association.conceptdrug.search;



/*
 * Class that implements the method to get the all the concept words and respective conceptId's from database
 */

public class DatabaseConceptDictionaryCollector {
	public static LinkedList<ConceptWordModel> getConceptWords() {
// Path: src/com/database/DatabaseConnector.java
// public class DatabaseConnector {
// 	private static Connection connection = null;
// 	private static Logger log = Logger.getLogger(DatabaseConnector.class);
// 	/*
// 	 * make connection as soon as the class is loaded
// 	 */
// 	static {
// 		makeConnection();
// 	}
// 	
// 	/*
// 	 * method to make the connection with the database
// 	 */
// 	public static void makeConnection() {
// 
// 		try {
// 			PropertiesReader.load();
// 			// get the connection with the database
// 			Class.forName("com.mysql.jdbc.Driver");
// 			connection = DriverManager.getConnection(PropertiesReader.getUrl(),
// 					PropertiesReader.getUser(), PropertiesReader.getPassword());
// 			System.out.println("MySQL JDBC Driver Registered!");
// 			log.debug("MySQL JDBC Driver Registered!");
// 		} catch (SQLException e) {
// 			System.out.println("Connection Failed! Check output console");
// 			e.printStackTrace();
// 			log.fatal(e);
// 			return;
// 		} catch (ClassNotFoundException e) {
// 			e.printStackTrace();
// 			log.fatal(e);
// 		}
// 	}
// 
// 	/*
// 	 * method to check if database is connected
// 	 */
// 	public static boolean isConnected() {
// 		if (connection != null) {
// 			try {
// 				return !connection.isClosed();
// 			} catch (SQLException e) {
// 				e.printStackTrace();
// 			}
// 			return true;
// 		}
// 		return false;
// 	}
// 
// 	/*
// 	 * method the close the connection with database.
// 	 */
// 	public static void closeConnection() {
// 		try {
// 			connection.close();
// 		} catch (SQLException e) {
// 			// TODO Auto-generated catch block
// 			e.printStackTrace();
// 			log.error(e);
// 		}
// 	}
// 
// 	public static Connection getConnection() {
// 		if(connection == null) {
// 			makeConnection();
// 		}
// 		return connection;
// 	}
// }
// 
// Path: src/com/learningmodule/association/conceptdrug/model/ConceptWordModel.java
// public class ConceptWordModel {
// 	private String conceptId;
// 	private String conceptWord;
// 
// 	public ConceptWordModel(String conceptId, String conceptWord) {
// 		super();
// 		this.conceptId = conceptId;
// 		this.conceptWord = conceptWord;
// 	}
// 
// 	public String getConceptId() {
// 		return conceptId;
// 	}
// 
// 	public String getConceptWord() {
// 		return conceptWord;
// 	}
// }


// Path: src/com/learningmodule/association/conceptdrug/search/DatabaseConceptDictionaryCollector.java
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.LinkedList;
import com.database.DatabaseConnector;
import com.learningmodule.association.conceptdrug.model.ConceptWordModel;

package com.learningmodule.association.conceptdrug.search;



/*
 * Class that implements the method to get the all the concept words and respective conceptId's from database
 */

public class DatabaseConceptDictionaryCollector {
	public static LinkedList<ConceptWordModel> getConceptWords() {
		if (DatabaseConnector.getConnection() != null) {