package org.aksw.es.bsbmloader.connectionbuilder;



import org.apache.commons.cli.CommandLine;
import org.apache.metamodel.UpdateableDataContext;


public class ConnectionCreator {
	
	public UpdateableDataContext createConnection(CommandLine commandLine, String type) throws Exception {
		ConnectionDatabase connection = null;
		if (type.equals("mysql")) {
			connection = new ConnectionBuilder().createConnectionProperties("mysql");
			connection.setConnectionProperties(commandLine.getOptionValue("urlMysql"), commandLine.getOptionValue("u"),
					commandLine.getOptionValue("p"));
			return connection.getDB();
		}
		
		if (commandLine.hasOption("materializeMongo") || commandLine.hasOption("parseToMongo")) {
			connection = new ConnectionBuilder().createConnectionProperties("mongodb");
			connection.setConnectionProperties(commandLine.getOptionValue("hostNosql"),
					commandLine.getOptionValue("portNosql"));
			return connection.getDB();
		}

		return null;

	}
	 
}

@@ -331,16 +331,32 @@
 if (type
+ != null && type
 .equals(

Fix error