package dk.aau.kah.bits.helpers;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;

import com.google.gson.Gson;

import dk.aau.kah.bits.database.DatabaseConfig;

public class ConfigurationLoader {

	public static DatabaseConfig load(String JSONFile) throws FileNotFoundException {
		String path = "src/main/resources/databaseConfigurations/";
		BufferedReader configuration = new BufferedReader(new FileReader(path+JSONFile));
		Gson gson = new Gson();	
		DatabaseConfig config = gson.fromJson(configuration, DatabaseConfig.class);
		config.setTDBFileName(JSONFile);
		config.setTDBFilePath(path+JSONFile);
		return config;
		
	}
}

@@ -581,27 +581,30 @@
 %09%09config.set
-TDB
+Config
 FileName(JSO
@@ -630,30 +630,92 @@
 tTDB
-FilePath(path+JSONFile
+DatasetPath(%22src/main/resources/tdb/%22+JSONFile.substring(0, JSONFile.length()-5)+%22/%22
 );%0A%09

Update the name of some functions