diff --git a/.classpath b/.classpath
index 677869a..5745bbf 100644
--- a/.classpath
+++ b/.classpath
@@ -26,6 +26,7 @@
+
diff --git a/.project b/.project
index 63d3b0e..8af9f55 100644
--- a/.project
+++ b/.project
@@ -5,6 +5,11 @@
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
org.eclipse.jdt.core.javabuilder
@@ -15,9 +20,17 @@
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
org.eclipse.m2e.core.maven2Nature
org.eclipse.jdt.core.javanature
+ org.eclipse.wst.common.project.facet.core.nature
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index ec4300d..443e085 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -1,5 +1,8 @@
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..4cf75d4
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..1b22d70
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/DataMinerService.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/DataMinerService.java
index 97e2418..08c72cf 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/DataMinerService.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/server/DataMinerService.java
@@ -3,10 +3,7 @@ package org.gcube.data.analysis.dataminermanagercl.server;
import static org.gcube.common.authorization.client.Constants.authorizationService;
import org.gcube.common.authorization.library.AuthorizationEntry;
-import org.gcube.common.authorization.library.provider.AuthorizationProvider;
-import org.gcube.common.authorization.library.provider.ClientInfo;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
-import org.gcube.common.authorization.library.provider.UserInfo;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClient4WPSBuilder;
import org.gcube.data.analysis.dataminermanagercl.server.dmservice.SClientBuilder;
@@ -25,8 +22,9 @@ import org.slf4j.LoggerFactory;
*/
public class DataMinerService {
- private static Logger logger = LoggerFactory
- .getLogger(DataMinerService.class);
+ // private HashMap cachedSClients;
+
+ private Logger logger = LoggerFactory.getLogger(DataMinerService.class);
/**
*
@@ -36,22 +34,35 @@ public class DataMinerService {
* @return
* @throws Exception
*/
- public static SClient getClient()
- throws Exception {
+
+ public DataMinerService() {
+ // cachedSClients= new HashMap<>();
+ }
+
+ public SClient getClient() throws Exception {
ServiceCredential serviceCredential = getServiceCredential();
+
+ /*
+ * if (cachedSClients.isEmpty() ||
+ * !cachedSClients.containsKey(serviceCredential.getScope())) {
+ */
+
SClientBuilder sBuilder = new SClient4WPSBuilder(serviceCredential);
SClientDirector director = new SClientDirector();
director.setSClientBuilder(sBuilder);
director.constructSClient();
SClient sClient = director.getSClient();
logger.debug("" + sClient);
+ // cachedSClients.put(serviceCredential.getScope(), sClient);
return sClient;
+ /*
+ * } else { return cachedSClients.get(serviceCredential.getScope()); }
+ */
}
- private static ServiceCredential getServiceCredential()
- throws ServiceException {
+ private ServiceCredential getServiceCredential() throws ServiceException {
String userName = null;
String token = null;
String scope = null;
@@ -66,11 +77,13 @@ public class DataMinerService {
try {
logger.debug("Retrieving token credentials");
// get username from SmartGears
- ClientInfo tokenInfo = (UserInfo) AuthorizationProvider.instance
- .get().getClient();
- userName = tokenInfo.getId();
+ // ClientInfo tokenInfo = (UserInfo)
+ // AuthorizationProvider.instance
+ // .get().getClient();
+ // userName = tokenInfo.getId();
token = SecurityTokenProvider.instance.get();
AuthorizationEntry entry = authorizationService().get(token);
+ userName = entry.getClientInfo().getId();
scope = entry.getContext();
} catch (Exception e) {
logger.error("Error Retrieving token credentials: "
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ColumnListParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ColumnListParameter.java
index 822c643..0c6020f 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ColumnListParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ColumnListParameter.java
@@ -3,8 +3,6 @@
*/
package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
-
-
/**
*
* @author Giancarlo Panichi email: columnNames = new ArrayList();
- private String value;
private String separator;
public ColumnListParameter() {
@@ -47,18 +43,6 @@ public class ColumnListParameter extends Parameter {
return referredTabularParameterName;
}
- /**
- * @return the value
- */
- public String getValue() {
- return value;
- }
-
- @Override
- public void setValue(String value) {
- this.value = value;
- }
-
/**
* @return the separator
*/
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ColumnParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ColumnParameter.java
index 423e0bb..4f75c48 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ColumnParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ColumnParameter.java
@@ -3,7 +3,6 @@
*/
package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
-
/**
*
* @author Giancarlo Panichi email: g.panichi@isti.cnr.it
+ * @author Giancarlo Panichi email: g.panichi@isti.cnr.it
*
*/
public class EnumParameter extends Parameter {
@@ -17,8 +17,6 @@ public class EnumParameter extends Parameter {
private static final long serialVersionUID = 1673874854501249519L;
private List values = new ArrayList();
private String defaultValue;
- private String value;
-
/**
*
@@ -27,66 +25,52 @@ public class EnumParameter extends Parameter {
super();
this.typology = ParameterType.ENUM;
}
-
+
/**
* @param type
* @param defaultValue
* @param value
*/
- public EnumParameter(String name, String description, List values, String defaultValue) {
+ public EnumParameter(String name, String description, List values,
+ String defaultValue) {
super(name, ParameterType.ENUM, description);
this.values = values;
this.defaultValue = defaultValue;
}
-
/**
* @return the defaultValue
*/
public String getDefaultValue() {
return defaultValue;
}
-
+
/**
- * @param defaultValue the defaultValue to set
+ * @param defaultValue
+ * the defaultValue to set
*/
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
-
+
/**
- * @param values the values to set
+ * @param values
+ * the values to set
*/
public void setValues(List values) {
this.values = values;
}
-
+
/**
* @return the values
*/
public List getValues() {
return values;
}
-
+
public void addValue(String value) {
this.values.add(value);
}
-
-
-
- /**
- * @return the value
- */
- @Override
- public String getValue() {
- return value;
- }
-
-
- @Override
- public void setValue(String value) {
- this.value = value;
- }
@Override
public String toString() {
@@ -95,8 +79,5 @@ public class EnumParameter extends Parameter {
+ ", description=" + description + ", typology=" + typology
+ "]";
}
-
-
-
}
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/FileParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/FileParameter.java
index 93bc6b5..f43f496 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/FileParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/FileParameter.java
@@ -5,19 +5,18 @@ package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
import java.util.ArrayList;
-
/**
*
- * @author Giancarlo Panichi
- * email: g.panichi@isti.cnr.it
+ * @author Giancarlo Panichi email: g.panichi@isti.cnr.it
*
*/
public class FileParameter extends Parameter {
private static final long serialVersionUID = -2967577990287112937L;
- private String value;
private String defaultMimeType;
private ArrayList supportedMimeTypes;
+
/**
*
*/
@@ -25,7 +24,7 @@ public class FileParameter extends Parameter {
super();
this.typology = ParameterType.FILE;
}
-
+
/**
*
* @param name
@@ -33,7 +32,8 @@ public class FileParameter extends Parameter {
* @param fileName
* @param mimeType
*/
- public FileParameter(String name, String description, String defaultMimeType, ArrayList supportedMimeTypes) {
+ public FileParameter(String name, String description,
+ String defaultMimeType, ArrayList supportedMimeTypes) {
super(name, ParameterType.FILE, description);
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
@@ -55,23 +55,6 @@ public class FileParameter extends Parameter {
this.supportedMimeTypes = supportedMimeTypes;
}
- /**
- *
- */
- public String getValue() {
- return value;
- }
-
- /**
- *
- */
- @Override
- public void setValue(String value) {
- this.value=value;
- }
-
-
-
@Override
public String toString() {
return "FileParameter [value=" + value + ", defaultMimeType="
@@ -80,7 +63,4 @@ public class FileParameter extends Parameter {
+ description + ", typology=" + typology + "]";
}
-
-
-
}
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ListParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ListParameter.java
index dec7c43..d5334c1 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ListParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ListParameter.java
@@ -14,7 +14,6 @@ public class ListParameter extends Parameter {
private static final long serialVersionUID = 5405965026753332225L;
private String type;
- private String value;
private String separator;
/**
@@ -51,15 +50,6 @@ public class ListParameter extends Parameter {
this.type = type;
}
- @Override
- public void setValue(String value) {
- this.value = value;
- }
-
- @Override
- public String getValue() {
- return value;
- }
/**
* @return the separator
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ObjectParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ObjectParameter.java
index 5e2a12f..62553b6 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ObjectParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/ObjectParameter.java
@@ -1,21 +1,17 @@
-
package org.gcube.data.analysis.dataminermanagercl.shared.parameters;
-
/**
*
- * @author Giancarlo Panichi
- * email: g.panichi@isti.cnr.it
+ * @author Giancarlo Panichi email: g.panichi@isti.cnr.it
*
*/
public class ObjectParameter extends Parameter {
-
+
private static final long serialVersionUID = 1058462575242430851L;
private String type;
private String defaultValue;
- private String value;
-
-
+
/**
*
*/
@@ -23,55 +19,50 @@ public class ObjectParameter extends Parameter {
super();
this.typology = ParameterType.OBJECT;
}
-
-
- public ObjectParameter(String name, String description, String type, String defaultValue) {
+
+ /**
+ *
+ * @param name
+ * @param description
+ * @param type
+ * @param defaultValue
+ */
+ public ObjectParameter(String name, String description, String type,
+ String defaultValue) {
super(name, ParameterType.OBJECT, description);
this.type = type;
this.defaultValue = defaultValue;
}
-
+
/**
* @return the type
*/
public String getType() {
return type;
}
-
+
/**
- * @param type the type to set
+ * @param type
+ * the type to set
*/
public void setType(String type) {
this.type = type;
}
-
+
/**
* @return the defaultValue
*/
public String getDefaultValue() {
return defaultValue;
}
-
+
/**
- * @param defaultValue the defaultValue to set
+ * @param defaultValue
+ * the defaultValue to set
*/
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
-
- /**
- * @return the value
- */
- public String getValue() {
- return value;
- }
-
-
- @Override
- public void setValue(String value) {
- this.value = value;
- }
-
@Override
public String toString() {
@@ -81,10 +72,4 @@ public class ObjectParameter extends Parameter {
+ "]";
}
-
-
-
-
-
-
}
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/Parameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/Parameter.java
index 055e151..f53d3e6 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/Parameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/Parameter.java
@@ -21,6 +21,7 @@ public abstract class Parameter implements Serializable {
protected String name;
protected String description;
protected ParameterType typology;
+ protected String value;
/**
*
@@ -29,6 +30,7 @@ public abstract class Parameter implements Serializable {
super();
}
+
/**
* @param name
* @param type
@@ -43,9 +45,13 @@ public abstract class Parameter implements Serializable {
this.description = description;
}
- public abstract void setValue(String value);
+ public void setValue(String value){
+ this.value=value;
+ }
- public abstract String getValue();
+ public String getValue(){
+ return value;
+ }
public String getName() {
return name;
@@ -88,7 +94,9 @@ public abstract class Parameter implements Serializable {
@Override
public String toString() {
return "Parameter [name=" + name + ", description=" + description
- + ", typology=" + typology + "]";
+ + ", typology=" + typology + ", value=" + value + "]";
}
+
+
}
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TabularListParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TabularListParameter.java
index 219b1ad..fec76a8 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TabularListParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TabularListParameter.java
@@ -7,14 +7,13 @@ import java.util.ArrayList;
/**
*
- * @author Giancarlo Panichi
- * email: g.panichi@isti.cnr.it
+ * @author Giancarlo Panichi email: g.panichi@isti.cnr.it
*
*/
public class TabularListParameter extends Parameter {
private static final long serialVersionUID = -1786477950530892502L;
- private String value;
private String separator;
private ArrayList templates = new ArrayList();
private String defaultMimeType;
@@ -40,16 +39,6 @@ public class TabularListParameter extends Parameter {
this.supportedMimeTypes = supportedMimeTypes;
}
- @Override
- public void setValue(String value) {
- this.value = value;
- }
-
- @Override
- public String getValue() {
- return value;
- }
-
/**
* @return the separator
*/
@@ -105,6 +94,4 @@ public class TabularListParameter extends Parameter {
+ description + ", typology=" + typology + "]";
}
-
-
}
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TabularParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TabularParameter.java
index 9d57ccc..63c49c9 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TabularParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TabularParameter.java
@@ -14,7 +14,6 @@ import java.util.ArrayList;
public class TabularParameter extends Parameter {
private static final long serialVersionUID = 8038591467145151553L;
- private String tableName;
private ArrayList templates = new ArrayList();
private String defaultMimeType;
private ArrayList supportedMimeTypes;
@@ -36,7 +35,7 @@ public class TabularParameter extends Parameter {
public TabularParameter(String name, String description, String tableName,
String defaultMimeType, ArrayList supportedMimeTypes) {
super(name, ParameterType.TABULAR, description);
- this.tableName = tableName;
+ this.value = tableName;
this.templates = null;
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
@@ -53,18 +52,18 @@ public class TabularParameter extends Parameter {
ArrayList templates, String defaultMimeType,
ArrayList supportedMimeTypes) {
super(name, ParameterType.TABULAR, description);
- this.tableName = tableName;
+ this.value = tableName;
this.templates = templates;
this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes;
}
public String getTableName() {
- return tableName;
+ return value;
}
public void setTableName(String tableName) {
- this.tableName = tableName;
+ this.value = tableName;
}
public ArrayList getTemplates() {
@@ -75,16 +74,6 @@ public class TabularParameter extends Parameter {
this.templates = templates;
}
- @Override
- public String getValue() {
- return getTableName();
- }
-
- @Override
- public void setValue(String value) {
- this.setTableName(value);
- }
-
public String getDefaultMimeType() {
return defaultMimeType;
}
@@ -103,7 +92,7 @@ public class TabularParameter extends Parameter {
@Override
public String toString() {
- return "TabularParameter [tableName=" + tableName + ", templates="
+ return "TabularParameter [tableName=" + value + ", templates="
+ templates + ", defaultMimeType=" + defaultMimeType
+ ", supportedMimeTypes=" + supportedMimeTypes + ", name="
+ name + ", description=" + description + ", typology="
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TimeParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TimeParameter.java
index f160ae5..b4d7eeb 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TimeParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/TimeParameter.java
@@ -13,7 +13,6 @@ public class TimeParameter extends Parameter {
private static final long serialVersionUID = 1673874854501249519L;
private String defaultValue;
- private String value;
/**
*
@@ -48,19 +47,6 @@ public class TimeParameter extends Parameter {
this.defaultValue = defaultValue;
}
- /**
- * @return the value
- */
- @Override
- public String getValue() {
- return value;
- }
-
- @Override
- public void setValue(String value) {
- this.value = value;
- }
-
@Override
public String toString() {
return "TimeParameter [defaultValue=" + defaultValue + ", value="
diff --git a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/WKTParameter.java b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/WKTParameter.java
index 6c35bcf..d1cc8f0 100644
--- a/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/WKTParameter.java
+++ b/src/main/java/org/gcube/data/analysis/dataminermanagercl/shared/parameters/WKTParameter.java
@@ -15,7 +15,6 @@ public class WKTParameter extends Parameter {
private static final long serialVersionUID = 1673874854501249519L;
private WKTGeometryType wktGeometryType;
private String defaultValue;
- private String value;
/**
*
@@ -69,19 +68,6 @@ public class WKTParameter extends Parameter {
this.wktGeometryType = wktGeometryType;
}
- /**
- * @return the value
- */
- @Override
- public String getValue() {
- return value;
- }
-
- @Override
- public void setValue(String value) {
- this.value = value;
- }
-
@Override
public String toString() {
return "WKTParameter [wktGeometryType=" + wktGeometryType
diff --git a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/DBScanTest.java b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/DBScanTest.java
index 2955d51..c73214e 100644
--- a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/DBScanTest.java
+++ b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/DBScanTest.java
@@ -1,7 +1,6 @@
package org.gcube.data.analysis.dataminermanagercl.test;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import junit.framework.TestCase;
@@ -37,7 +36,8 @@ public class DBScanTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test Dbscan");
try {
- SClient sClient = DataMinerService.getClient();
+ DataMinerService dataMinerService = new DataMinerService();
+ SClient sClient = dataMinerService.getClient();
Operator dBScanOperator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.clusterers.DBSCAN");
@@ -90,8 +90,7 @@ public class DBScanTest extends TestCase {
@Override
public void failed(String message, Exception exception) {
logger.error("Operation Failed");
- logger.error(message);
- logger.error(exception.getStackTrace().toString());
+ logger.error(message, exception);
}
@@ -126,11 +125,12 @@ public class DBScanTest extends TestCase {
OutputData output = sClient
.getOutputDataByComputationId(computationId);
logger.debug("Output: " + output);
- Resource resource=output.getResource();
- if(resource.isMap()){
- MapResource mapResource=(MapResource) resource;
- for(String key: mapResource.getMap().keySet()){
- logger.debug("Entry: "+key+" = "+mapResource.getMap().get(key));
+ Resource resource = output.getResource();
+ if (resource.isMap()) {
+ MapResource mapResource = (MapResource) resource;
+ for (String key : mapResource.getMap().keySet()) {
+ logger.debug("Entry: " + key + " = "
+ + mapResource.getMap().get(key));
}
}
@@ -158,32 +158,21 @@ public class DBScanTest extends TestCase {
occurencePointsTable.setName("OccurrencePointsTable");
occurencePointsTable
.setValue("http://data-d.d4science.org/SnBPSHJQOEI4UHQ0QkhnM2p3L2JGQytNTmtSb1FpUTFHbWJQNStIS0N6Yz0");
- occurencePointsTable.setDefaultMimeType("text/csv");
- ArrayList supportedMimeTypes = new ArrayList<>(
- Arrays.asList(new String[] { "text/xml", "text/csv",
- "text/plain" }));
- occurencePointsTable.setSupportedMimeTypes(supportedMimeTypes);
ColumnListParameter columnListParameter = new ColumnListParameter();
columnListParameter.setName("FeaturesColumnNames");
- columnListParameter
- .setReferredTabularParameterName("OccurrencePointsTable");
- columnListParameter.setSeparator("|");
columnListParameter.setValue("depthmean|sstmnmax|salinitymin");
ObjectParameter occurencePointsClusterLabel = new ObjectParameter();
occurencePointsClusterLabel.setName("OccurrencePointsClusterLabel");
- occurencePointsClusterLabel.setType("java.lang.String");
occurencePointsClusterLabel.setValue("Test");
ObjectParameter epsilon = new ObjectParameter();
epsilon.setName("epsilon");
- epsilon.setType("java.lang.Integer");
epsilon.setValue("10");
ObjectParameter minPoints = new ObjectParameter();
minPoints.setName("min_points");
- minPoints.setType("java.lang.Integer");
minPoints.setValue("1");
List parameters = new ArrayList<>();
diff --git a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/DataMinerServiceTest.java b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/DataMinerServiceTest.java
index 54a331a..afa3e5c 100644
--- a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/DataMinerServiceTest.java
+++ b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/DataMinerServiceTest.java
@@ -28,7 +28,7 @@ public class DataMinerServiceTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test Operators");
try {
- SClient sClient = DataMinerService.getClient();
+ SClient sClient = new DataMinerService().getClient();
List operatorsClassifications = sClient
.getOperatorsClassifications();
logger.debug("OperatorsClassifications: " + operatorsClassifications);
@@ -69,7 +69,8 @@ public class DataMinerServiceTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test DBScan");
try {
- SClient sClient = DataMinerService.getClient();
+ DataMinerService dataMinerService=new DataMinerService();
+ SClient sClient = dataMinerService.getClient();
List operatorsClassifications = sClient
.getOperatorsClassifications();
logger.debug("OperatorsClassifications rerieved");
diff --git a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBInfoTest.java b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBInfoTest.java
index 39042c4..b2dfbd5 100644
--- a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBInfoTest.java
+++ b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBInfoTest.java
@@ -34,7 +34,8 @@ public class ListDBInfoTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test ListDBInfo");
try {
- SClient sClient = DataMinerService.getClient();
+ DataMinerService dataMinerService=new DataMinerService();
+ SClient sClient = dataMinerService.getClient();
Operator operator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBINFO");
@@ -147,15 +148,13 @@ public class ListDBInfoTest extends TestCase {
*/
private void createRequest(Operator operator) {
logger.debug("Create Request");
-
+
ObjectParameter resourceName = new ObjectParameter();
resourceName.setName("ResourceName");
- resourceName.setType("java.lang.String");
- //MaxNumber.setValue("CKanDatabase");
resourceName.setValue("FishBase");
-
- List parameters = new ArrayList<>();
+ //MaxNumber.setValue("CKanDatabase");
+ List parameters = new ArrayList<>();
parameters.add(resourceName);
logger.debug("Parameters set: " + parameters);
diff --git a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBNameTest.java b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBNameTest.java
index abb20a7..917e8cf 100644
--- a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBNameTest.java
+++ b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBNameTest.java
@@ -34,7 +34,8 @@ public class ListDBNameTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test ListDBName");
try {
- SClient sClient = DataMinerService.getClient();
+ DataMinerService dataMinerService=new DataMinerService();
+ SClient sClient = dataMinerService.getClient();
Operator operator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBNAMES");
@@ -150,7 +151,6 @@ public class ListDBNameTest extends TestCase {
ObjectParameter maxNumber = new ObjectParameter();
maxNumber.setName("MaxNumber");
- maxNumber.setType("java.lang.String");
maxNumber.setValue("-1");
List parameters = new ArrayList<>();
diff --git a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBSchemaTest.java b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBSchemaTest.java
index a1f6039..f59548b 100644
--- a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBSchemaTest.java
+++ b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListDBSchemaTest.java
@@ -35,7 +35,8 @@ public class ListDBSchemaTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test ListDBSchema");
try {
- SClient sClient = DataMinerService.getClient();
+ DataMinerService dataMinerService=new DataMinerService();
+ SClient sClient = dataMinerService.getClient();
Operator operator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTDBSCHEMA");
@@ -162,12 +163,10 @@ public class ListDBSchemaTest extends TestCase {
ObjectParameter resourceName = new ObjectParameter();
resourceName.setName("ResourceName");
- resourceName.setType("java.lang.String");
resourceName.setValue("FishBase");
ObjectParameter databaseName = new ObjectParameter();
databaseName.setName("DatabaseName");
- databaseName.setType("java.lang.String");
databaseName.setValue("fishbase");
List parameters = new ArrayList<>();
diff --git a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListTablesTest.java b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListTablesTest.java
index 5ba5eb0..612f608 100644
--- a/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListTablesTest.java
+++ b/src/test/java/org/gcube/data/analysis/dataminermanagercl/test/ListTablesTest.java
@@ -35,7 +35,8 @@ public class ListTablesTest extends TestCase {
if (Constants.TEST_ENABLE) {
logger.debug("Test ListTables");
try {
- SClient sClient = DataMinerService.getClient();
+ DataMinerService dataMinerService=new DataMinerService();
+ SClient sClient = dataMinerService.getClient();
Operator operator = sClient
.getOperatorById("org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mappedclasses.transducerers.LISTTABLES");
@@ -162,17 +163,14 @@ public class ListTablesTest extends TestCase {
ObjectParameter resourceName = new ObjectParameter();
resourceName.setName("ResourceName");
- resourceName.setType("java.lang.String");
resourceName.setValue("FishBase");
ObjectParameter databaseName = new ObjectParameter();
databaseName.setName("DatabaseName");
- databaseName.setType("java.lang.String");
databaseName.setValue("fishbase");
ObjectParameter schemaName = new ObjectParameter();
schemaName.setName("SchemaName");
- schemaName.setType("java.lang.String");
schemaName.setValue("public");
List parameters = new ArrayList<>();