RandomSampleOnTable, SampleOnTable, SmartSampleOnTable and SubmitQuery algorithms modified in order to manage the file as output.
pom file version modified in 1.3.0. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManagerAlgorithms@101767 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
417291b489
commit
441aee5ecd
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
|
||||
<groupId>org.gcube.dataaccess.algorithms</groupId>
|
||||
<artifactId>database-rm-algorithms</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<name>DatabasesResourcesManagerAlgorithms</name>
|
||||
<description>Databases Resources Manager Algorithms</description>
|
||||
|
||||
|
|
|
@ -399,10 +399,10 @@ public class RandomSampleOnTable extends StandardLocalExternalAlgorithm {
|
|||
}
|
||||
|
||||
// to add the file
|
||||
// PrimitiveType fileResult = new PrimitiveType(File.class.getName(),
|
||||
// mgt.getFileSampleTableResult(), PrimitiveTypes.FILE, "File",
|
||||
// "File");
|
||||
// mapResults.put("File", fileResult);
|
||||
PrimitiveType fileResult = new PrimitiveType(File.class.getName(),
|
||||
mgt.getFile(), PrimitiveTypes.FILE, "File",
|
||||
"File");
|
||||
mapResults.put("File", fileResult);
|
||||
|
||||
return mapResults;
|
||||
|
||||
|
|
|
@ -395,11 +395,11 @@ public class SampleOnTable extends StandardLocalExternalAlgorithm {
|
|||
|
||||
}
|
||||
|
||||
// // to add the file
|
||||
// PrimitiveType fileResult = new PrimitiveType(File.class.getName(),
|
||||
// mgt.getFileSampleTableResult(), PrimitiveTypes.FILE, "File",
|
||||
// "File");
|
||||
// mapResults.put("File", fileResult);
|
||||
// to add the file
|
||||
PrimitiveType fileResult = new PrimitiveType(File.class.getName(),
|
||||
mgt.getFile(), PrimitiveTypes.FILE, "File",
|
||||
"File");
|
||||
mapResults.put("File", fileResult);
|
||||
|
||||
return mapResults;
|
||||
|
||||
|
|
|
@ -399,10 +399,10 @@ public class SmartSampleOnTable extends StandardLocalExternalAlgorithm {
|
|||
}
|
||||
|
||||
// to add the file
|
||||
// PrimitiveType fileResult = new PrimitiveType(File.class.getName(),
|
||||
// mgt.getFileSampleTableResult(), PrimitiveTypes.FILE, "File",
|
||||
// "File");
|
||||
// mapResults.put("File", fileResult);
|
||||
PrimitiveType fileResult = new PrimitiveType(File.class.getName(),
|
||||
mgt.getFile(), PrimitiveTypes.FILE, "File",
|
||||
"File");
|
||||
mapResults.put("File", fileResult);
|
||||
|
||||
return mapResults;
|
||||
}
|
||||
|
|
|
@ -611,7 +611,7 @@ public class SubmitQuery extends StandardLocalExternalAlgorithm {
|
|||
// to add the file
|
||||
PrimitiveType fileResult = new
|
||||
PrimitiveType(File.class.getName(),
|
||||
mgt.getFileQueryResult(), PrimitiveTypes.FILE, "File",
|
||||
mgt.getFile(), PrimitiveTypes.FILE, "File",
|
||||
"File");
|
||||
mapResults.put("File", fileResult);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class RegressionRandomSampleOnTable {
|
|||
// "Mysql2", "NullInputValue1", "NullInputValue2", "NullInputValue3",
|
||||
// "NullInputValue4"};
|
||||
|
||||
static AlgorithmConfiguration[] configs = { testPostgres1() };
|
||||
static AlgorithmConfiguration[] configs = { testMysql1() };
|
||||
static String[] algorithms = { "Postgres1" };
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
@ -102,16 +102,18 @@ public class RegressionRandomSampleOnTable {
|
|||
//// config.setParam("TableName", "hspec_suitable_peng_test_tbsp_1");
|
||||
// config.setParam("TableName", "hspen");
|
||||
|
||||
config.setParam("ResourceName", "Geoserver database ");
|
||||
config.setParam("DatabaseName", "aquamapsdb");
|
||||
config.setParam("SchemaName", "public");
|
||||
config.setParam("TableName", "SeaVoX_sea_areas_polygons_v14");
|
||||
// config.setParam("ResourceName", "Geoserver database ");
|
||||
// config.setParam("DatabaseName", "aquamapsdb");
|
||||
// config.setParam("SchemaName", "public");
|
||||
// config.setParam("TableName", "SeaVoX_sea_areas_polygons_v14");
|
||||
|
||||
// Obis
|
||||
// config.setParam("ResourceName", "Obis2Repository");
|
||||
// config.setParam("DatabaseName", "obis");
|
||||
config.setParam("ResourceName", "Obis2Repository");
|
||||
config.setParam("DatabaseName", "obis");
|
||||
// config.setParam("SchemaName", "calc");
|
||||
// config.setParam("TableName", "map1d");
|
||||
config.setParam("SchemaName", "newd20110525");
|
||||
config.setParam("TableName", "edc");
|
||||
|
||||
// config.setParam("Query", "select * from area limit 3");
|
||||
|
||||
|
@ -159,9 +161,10 @@ public class RegressionRandomSampleOnTable {
|
|||
// A test with a database mysql
|
||||
config.setParam("ResourceName", "CatalogOfLife2010");
|
||||
config.setParam("DatabaseName", "col2oct2010");
|
||||
config.setParam("TableName", "common_names");
|
||||
// config.setParam("TableName", "Common_names"); // mysql is not case
|
||||
// sensitive
|
||||
config.setParam("TableName", "databases");
|
||||
// config.setParam("TableName", "databases");
|
||||
// config.setParam("TableName", "simple_search");
|
||||
|
||||
config.setGcubeScope("/gcube/devsec");
|
||||
|
|
|
@ -15,7 +15,7 @@ public class RegressionSampleOnTable {
|
|||
|
||||
// static String[] algorithms = { "Postgres1", "Postgis", "Mysql1", "Mysql2", "NullInputValue1", "NullInputValue2", "NullInputValue3", "NullInputValue4"};
|
||||
|
||||
static AlgorithmConfiguration[] configs = { testPostgres1()};
|
||||
static AlgorithmConfiguration[] configs = { testMysql1()};
|
||||
|
||||
static String[] algorithms = { "Postgres1"};
|
||||
|
||||
|
@ -52,12 +52,12 @@ public class RegressionSampleOnTable {
|
|||
|
||||
config.setAgent("SAMPLEONTABLE");
|
||||
|
||||
// config.setParam("ResourceName", "Geoserver database ");
|
||||
// config.setParam("DatabaseName", "aquamapsdb");
|
||||
// config.setParam("SchemaName", "public");
|
||||
config.setParam("ResourceName", "Geoserver database ");
|
||||
config.setParam("DatabaseName", "aquamapsdb");
|
||||
config.setParam("SchemaName", "public");
|
||||
// config.setParam("TableName", "biodiversity");
|
||||
|
||||
// config.setParam("TableName", "SeaVoX_sea_areas_polygons_v14");
|
||||
config.setParam("TableName", "SeaVoX_sea_areas_polygons_v14");
|
||||
// config.setParam("TableName", "");
|
||||
|
||||
// A test with a database postgres Geoserver
|
||||
|
@ -80,10 +80,10 @@ public class RegressionSampleOnTable {
|
|||
// config.setParam("SchemaName", "public");
|
||||
// config.setParam("TableNamefcatalog", "countrylanguage"); //mysql is not case sensitive
|
||||
|
||||
config.setParam("ResourceName", "AquaMaps Service DataBase");
|
||||
config.setParam("DatabaseName", "aquamapsorgupdated");
|
||||
config.setParam("SchemaName", "public");
|
||||
config.setParam("TableName", "speciesoccursum");
|
||||
// config.setParam("ResourceName", "AquaMaps Service DataBase");
|
||||
// config.setParam("DatabaseName", "aquamapsorgupdated");
|
||||
// config.setParam("SchemaName", "public");
|
||||
// config.setParam("TableName", "speciesoccursum");
|
||||
//// config.setParam("TableName", "hspec2012_07_11_12_33_05_526");
|
||||
// config.setParam("TableName", "hspen");
|
||||
|
||||
|
@ -102,7 +102,12 @@ public class RegressionSampleOnTable {
|
|||
// config.setParam("SchemaName", "calc");
|
||||
// config.setParam("TableName", "map1d");
|
||||
|
||||
|
||||
//Obis
|
||||
// config.setParam("ResourceName", "Obis2Repository");
|
||||
// config.setParam("DatabaseName", "obis");
|
||||
// config.setParam("SchemaName", "newd20110525");
|
||||
//// config.setParam("TableName", "map1d");
|
||||
// config.setParam("TableName", "edc");
|
||||
|
||||
|
||||
config.setGcubeScope("/gcube/devsec");
|
||||
|
|
|
@ -101,10 +101,10 @@ public class RegressionSmartSampleOnTable {
|
|||
//// config.setParam("TableName", "hspec2012_07_11_12_33_05_526");
|
||||
// config.setParam("TableName", "hspen");
|
||||
|
||||
config.setParam("ResourceName", "Geoserver database ");
|
||||
config.setParam("DatabaseName", "aquamapsdb");
|
||||
config.setParam("SchemaName", "public");
|
||||
config.setParam("TableName", "SeaVoX_sea_areas_polygons_v14");
|
||||
// config.setParam("ResourceName", "Geoserver database ");
|
||||
// config.setParam("DatabaseName", "aquamapsdb");
|
||||
// config.setParam("SchemaName", "public");
|
||||
// config.setParam("TableName", "SeaVoX_sea_areas_polygons_v14");
|
||||
|
||||
|
||||
////// config.setParam("TableName", "hspec2012_07_11_12_33_05_483");
|
||||
|
@ -128,9 +128,11 @@ public class RegressionSmartSampleOnTable {
|
|||
////// config.setParam("TableName", "hspec_id_3f4c79fa_442e_42ba_9344_1b3e64dc3326");
|
||||
|
||||
//Obis
|
||||
// config.setParam("ResourceName", "Obis2Repository");
|
||||
// config.setParam("DatabaseName", "obis");
|
||||
// config.setParam("SchemaName", "calc");
|
||||
config.setParam("ResourceName", "Obis2Repository");
|
||||
config.setParam("DatabaseName", "obis");
|
||||
config.setParam("SchemaName", "newd20110525");
|
||||
// config.setParam("TableName", "map1d");
|
||||
config.setParam("TableName", "_positions1");
|
||||
// config.setParam("TableName", "map1d");
|
||||
|
||||
config.setGcubeScope("/gcube/devsec");
|
||||
|
@ -170,10 +172,10 @@ public class RegressionSmartSampleOnTable {
|
|||
// A test with a database mysql
|
||||
config.setParam("ResourceName", "CatalogOfLife2010");
|
||||
config.setParam("DatabaseName", "col2oct2010");
|
||||
// config.setParam("TableName", "Common_names"); //mysql is not case sensitive
|
||||
config.setParam("TableName", "common_names"); //mysql is not case sensitive
|
||||
// config.setParam("TableName", "databases");
|
||||
// config.setParam("TableName", "simple_search");
|
||||
config.setParam("TableName", "scientific_names");
|
||||
// config.setParam("TableName", "scientific_names");
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -55,11 +55,16 @@ public class RegressionSubmitQuery {
|
|||
|
||||
config.setAgent("LISTSUBMITQUERY");
|
||||
|
||||
// A test with a database postgres
|
||||
// // A test with a database postgres
|
||||
// config.setParam("ResourceName", "StatisticalManagerDataBase");
|
||||
// config.setParam("DatabaseName", "testdb");
|
||||
//// config.setParam("", "TRUE");
|
||||
// config.setParam("Read-Only Query", "FALSE");
|
||||
////// config.setParam("", "TRUE");
|
||||
// config.setParam("Read-Only Query", "true");
|
||||
// config.setParam("Apply Smart Correction", "FALSE");
|
||||
// config.setParam("Language", "NONE");
|
||||
//// config.setParam("Query", "DELETE from test_gsay_03217cfda4244870b4d11f9e0eca58fe");
|
||||
// config.setParam("Query", "select * from hcaf_d limit 20");
|
||||
|
||||
// config.setParam("Apply Smart Correction", "TRUE");
|
||||
// config.setParam("Language", "POSTGRES");
|
||||
|
||||
|
@ -111,14 +116,15 @@ public class RegressionSubmitQuery {
|
|||
// config.setParam("TableName", "all_world");
|
||||
// config.setParam("TableName", "biodiversity_lme");
|
||||
|
||||
//Obis
|
||||
// //Obis
|
||||
// config.setParam("ResourceName", "Obis2Repository");
|
||||
// config.setParam("DatabaseName", "obis");
|
||||
// config.setParam("Read-Only Query", "TRUE");
|
||||
// config.setParam("Read-Only Query", "trie");
|
||||
// config.setParam("Apply Smart Correction", "FALSE");
|
||||
// config.setParam("Language", "NONE");
|
||||
//// config.setParam("Query", "select id from fmap.randomdrs limit 1");
|
||||
// config.setParam("Query", "select lifestage from randomdrs");
|
||||
//// config.setParam("Query", "select lifestage from randomdrs");
|
||||
// config.setParam("Query", "select * from newd20110525."+"\""+"edc"+ "\""+" where id='76864082'");
|
||||
|
||||
|
||||
// config.setParam("ResourceName", "AquaMaps Service DataBase");
|
||||
|
@ -140,10 +146,10 @@ public class RegressionSubmitQuery {
|
|||
config.setParam("ResourceName", "Geoserver database ");
|
||||
config.setParam("DatabaseName", "aquamapsdb");
|
||||
config.setParam("SchemaName", "public");
|
||||
config.setParam("Read-Only Query", "TRUE");
|
||||
config.setParam("Read-Only Query", "true");
|
||||
config.setParam("Apply Smart Correction", "FALSE");
|
||||
config.setParam("Language", "NONE");
|
||||
config.setParam("Query", "select * from" +"\""+"SeaVoX_sea_areas_polygons_v14"+"\""+"limit 10");
|
||||
config.setParam("Query", "select st_astext(the_geom) from" +"\""+"SeaVoX_sea_areas_polygons_v14"+"\""+"limit 1");
|
||||
// config.setParam("Query", "select * from public.depthmean limit 10");
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ public class RegressionTableDetails {
|
|||
// testPostgres2(), testPostgis(), Mysql(), NullInputValue(), Postgres3()};
|
||||
|
||||
static String[] algorithms = { "Postgres1" };
|
||||
static AlgorithmConfiguration[] configs = { Mysql() };
|
||||
static AlgorithmConfiguration[] configs = { testPostgis() };
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
|
@ -84,17 +84,20 @@ public class RegressionTableDetails {
|
|||
// config.setParam("TableName",
|
||||
// "hspec_id_3f4c79fa_442e_42ba_9344_1b3e64dc3326");
|
||||
|
||||
// config.setParam("ResourceName", "AquaMaps Service DataBase");
|
||||
// config.setParam("DatabaseName", "aquamapsorgupdated");
|
||||
// config.setParam("SchemaName", "public");
|
||||
//AquaMaps
|
||||
config.setParam("ResourceName", "AquaMaps Service DataBase");
|
||||
config.setParam("DatabaseName", "aquamapsorgupdated");
|
||||
config.setParam("SchemaName", "public");
|
||||
// config.setParam("TableName", "geometry_columns");
|
||||
config.setParam("TableName", "source_generation_requests");
|
||||
// //// config.setParam("TableName", "hspec2012_07_11_12_33_05_483");
|
||||
// config.setParam("TableName", "hspec_suitable_peng_test_tbsp_1");
|
||||
|
||||
// Obis
|
||||
config.setParam("ResourceName", "Obis2Repository");
|
||||
config.setParam("DatabaseName", "obis");
|
||||
config.setParam("SchemaName", "calc");
|
||||
config.setParam("TableName", "map1d");
|
||||
// config.setParam("ResourceName", "Obis2Repository");
|
||||
// config.setParam("DatabaseName", "obis");
|
||||
// config.setParam("SchemaName", "calc");
|
||||
// config.setParam("TableName", "map1d");
|
||||
|
||||
config.setGcubeScope("/gcube/devsec");
|
||||
|
||||
|
@ -141,7 +144,8 @@ public class RegressionTableDetails {
|
|||
// config.setParam("TableName", "Divisions");
|
||||
// config.setParam("TableName", "ContinentalMargins");
|
||||
|
||||
config.setParam("TableName", "SeaVoX_sea_areas_polygons_v14");
|
||||
// config.setParam("TableName", "SeaVoX_sea_areas_polygons_v14");
|
||||
config.setParam("TableName", "laldrovandiaoleosa20130718230308233cest ");
|
||||
|
||||
config.setGcubeScope("/gcube/devsec");
|
||||
|
||||
|
|
Loading…
Reference in New Issue