- algorithm SubmitQuery modified in order to pass the string pathfile to the submitQuery method of class DatabaseManagement in order to generate a file and retrieve it from the statistical manager with the map as output.

- version pom file modified in 1.3.0

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManagerAlgorithms@101652 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Loredana Liccardo 2014-11-19 14:34:25 +00:00
parent 3814a3ad4c
commit 417291b489
1 changed files with 13 additions and 12 deletions

View File

@ -552,7 +552,7 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
// sf, config.getPersistencePath()); // sf, config.getPersistencePath());
result = mgt result = mgt
.submitQuery(query, dbconnection); .submitQuery(query, dbconnection, config.getPersistencePath());
} }
if (driverInfo.toLowerCase().contains("mysql")) { if (driverInfo.toLowerCase().contains("mysql")) {
@ -563,7 +563,7 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
// sf, config.getPersistencePath()); // sf, config.getPersistencePath());
result = mgt result = mgt
.submitQuery(query, dbconnection); .submitQuery(query, dbconnection, config.getPersistencePath());
} }
if (result == null) { if (result == null) {
@ -575,7 +575,8 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
HashMap<String, String> mapResult = new HashMap<String, String>(); HashMap<String, String> mapResult = new HashMap<String, String>();
mapResult = mgt.getMapQueryResult(); mapResult = mgt.getMapQueryResult();
// System.out.println("map size alg with header: " + mapResult.size());
String encoded = null; String encoded = null;
encoded = new String(mapResult.get("HEADERS").getBytes(), "UTF-8"); encoded = new String(mapResult.get("HEADERS").getBytes(), "UTF-8");
@ -594,8 +595,8 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
.getBytes(), "UTF-8"); .getBytes(), "UTF-8");
// // check the encoded value // // check the encoded value
// AnalysisLogger.getLogger().debug( // AnalysisLogger.getLogger().debug(
// "In RandomSampleOnTable->string encoded: " + encoded); // "In RandomSampleOnTable->string encoded: " + encoded);
PrimitiveType val1 = new PrimitiveType(String.class.getName(), PrimitiveType val1 = new PrimitiveType(String.class.getName(),
encoded, PrimitiveTypes.STRING, "Row", "Row"); encoded, PrimitiveTypes.STRING, "Row", "Row");
@ -603,16 +604,16 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
// //check value contained in map // //check value contained in map
// String value = (String) val1.getContent(); // String value = (String) val1.getContent();
// //
// AnalysisLogger.getLogger().debug( // AnalysisLogger.getLogger().debug(
// "In RandomSampleOnTable->value: " + value); // "In RandomSampleOnTable->value: " + value);
} }
// to add the file // to add the file
// PrimitiveType fileResult = new PrimitiveType fileResult = new
// PrimitiveType(File.class.getName(), PrimitiveType(File.class.getName(),
// mgt.getFileQueryResult(), PrimitiveTypes.FILE, "File", mgt.getFileQueryResult(), PrimitiveTypes.FILE, "File",
// "File"); "File");
// mapResults.put("File", fileResult); mapResults.put("File", fileResult);
} }
return mapResults; return mapResults;
} }