From bf9f8450049872614dc95e8663a32519d834f845 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Tue, 13 May 2014 12:36:14 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@95624 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../td/gwtservice/server/TDGWTServiceImpl.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java index 9d052f5..013ff2e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java @@ -39,6 +39,7 @@ import org.gcube.data.analysis.tabulardata.commons.webservice.types.TaskStatus; import org.gcube.data.analysis.tabulardata.commons.webservice.types.TemplateDescription; import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.OperationDefinition; import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.OperationExecution; +import org.gcube.data.analysis.tabulardata.commons.webservice.types.tasks.ValidationDescriptor; import org.gcube.data.analysis.tabulardata.expression.Expression; import org.gcube.data.analysis.tabulardata.metadata.NoSuchMetadataException; import org.gcube.data.analysis.tabulardata.model.column.Column; @@ -186,8 +187,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.gwt.user.server.rpc.RemoteServiceServlet; -//import java.io.IOException; -//import net.sf.csv4j.ParseException; + /** * @@ -2518,7 +2518,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements fileUploadSession.getCsvFile()); logger.debug("File Url On Storage:" + fileUrlOnStorage); fileUploadSession.getCsvFile().delete(); - + + if(fileUrlOnStorage==null || fileUrlOnStorage.isEmpty()){ + throw new TDGWTServiceException( + "Tabular Data Service error loading file on storage"); + } + + Map parameterInstance = csvImportFileParameter( fileUrlOnStorage, fileUploadSession, csvImportSession); @@ -6211,7 +6217,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements for (Job job : task.getTaskJobs()) { int i = 1; ArrayList validations = new ArrayList(); - for (Validation val : job.getValidations()) { + for (ValidationDescriptor val : job.getValidations()) { Validations validation = new Validations(String.valueOf(i), val.getDescription(), val.isValid()); validations.add(validation);