Fixed Downscale
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@113531 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
40b4474b83
commit
c1d8e6507e
|
@ -27,7 +27,8 @@ import org.slf4j.LoggerFactory;
|
|||
*/
|
||||
public class TDRStudioServlet extends HttpServlet {
|
||||
private static final String TAB_RESOURCE_ID_PARAMETER="TabResourceId";
|
||||
|
||||
//private static final String SECURITY_EXCEPTION_RIGHTS = "Security exception, you don't have the required rights!";
|
||||
|
||||
private static final long serialVersionUID = -1649268678733476057L;
|
||||
private static Logger logger = LoggerFactory
|
||||
.getLogger(TDRStudioServlet.class);
|
||||
|
@ -83,7 +84,9 @@ public class TDRStudioServlet extends HttpServlet {
|
|||
|
||||
logger.trace("Response in "
|
||||
+ (System.currentTimeMillis() - startTime)+"ms");
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.error("Error TDRStudio: "
|
||||
+ e.getLocalizedMessage());
|
||||
|
|
|
@ -28,9 +28,8 @@ public class OpExecution4GeospatialDownscaleCSquare extends OpExecutionBuilder {
|
|||
|
||||
private TabularDataService service;
|
||||
private GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession;
|
||||
|
||||
public OpExecution4GeospatialDownscaleCSquare(
|
||||
TabularDataService service,
|
||||
|
||||
public OpExecution4GeospatialDownscaleCSquare(TabularDataService service,
|
||||
GeospatialDownscaleCSquareSession geospatialDownscaleCSquareSession) {
|
||||
this.service = service;
|
||||
this.geospatialDownscaleCSquareSession = geospatialDownscaleCSquareSession;
|
||||
|
@ -40,22 +39,29 @@ public class OpExecution4GeospatialDownscaleCSquare extends OpExecutionBuilder {
|
|||
public void buildOpEx() throws TDGWTServiceException {
|
||||
OperationExecution invocation = null;
|
||||
|
||||
logger.debug("Downscale CSquare: "+ geospatialDownscaleCSquareSession);
|
||||
logger.debug("Downscale CSquare: " + geospatialDownscaleCSquareSession);
|
||||
OperationDefinition operationDefinition;
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
ColumnData col=geospatialDownscaleCSquareSession.getCsquareColumn();
|
||||
|
||||
if(col==null|| col.getColumnId()==null|| col.getColumnId().isEmpty()){
|
||||
ColumnData col = geospatialDownscaleCSquareSession.getCsquareColumn();
|
||||
|
||||
if (col == null || col.getColumnId() == null
|
||||
|| col.getColumnId().isEmpty()) {
|
||||
logger.error("Error in downscale c-square: no valid column set");
|
||||
throw new TDGWTServiceException("No valid column set");
|
||||
}
|
||||
|
||||
|
||||
if (geospatialDownscaleCSquareSession.getResolution() == null
|
||||
|| geospatialDownscaleCSquareSession.getResolution().isEmpty()) {
|
||||
logger.error("Error in downscale c-square: no valid resolution set");
|
||||
throw new TDGWTServiceException("No valid resolution set");
|
||||
}
|
||||
|
||||
operationDefinition = OperationDefinitionMap.map(
|
||||
OperationsId.DownscaleCSquare.toString(), service);
|
||||
map.put(Constants.PARAMETER_DOWNSCALE_CSQUARE_RESOLUTION,
|
||||
geospatialDownscaleCSquareSession.getType().getId());
|
||||
|
||||
geospatialDownscaleCSquareSession.getResolution());
|
||||
|
||||
invocation = new OperationExecution(col.getColumnId(),
|
||||
operationDefinition.getOperationId(), map);
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.io.Serializable;
|
|||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.geospatial.CSquareDownscaleResolution;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -17,7 +16,7 @@ public class GeospatialDownscaleCSquareSession implements Serializable {
|
|||
private static final long serialVersionUID = -7790774506217649775L;
|
||||
private TRId trId;
|
||||
private ColumnData csquareColumn;
|
||||
private CSquareDownscaleResolution type;
|
||||
private String resolution;
|
||||
|
||||
public GeospatialDownscaleCSquareSession() {
|
||||
}
|
||||
|
@ -30,11 +29,11 @@ public class GeospatialDownscaleCSquareSession implements Serializable {
|
|||
* @param type
|
||||
*/
|
||||
public GeospatialDownscaleCSquareSession(TRId trId,
|
||||
ColumnData csquareColumn, CSquareDownscaleResolution type) {
|
||||
ColumnData csquareColumn, String resolution) {
|
||||
super();
|
||||
this.trId = trId;
|
||||
this.csquareColumn = csquareColumn;
|
||||
this.type = type;
|
||||
this.resolution = resolution;
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,20 +54,25 @@ public class GeospatialDownscaleCSquareSession implements Serializable {
|
|||
this.csquareColumn = csquareColumn;
|
||||
}
|
||||
|
||||
public CSquareDownscaleResolution getType() {
|
||||
return type;
|
||||
|
||||
public String getResolution() {
|
||||
return resolution;
|
||||
}
|
||||
|
||||
public void setType(CSquareDownscaleResolution type) {
|
||||
this.type = type;
|
||||
|
||||
public void setResolution(String resolution) {
|
||||
this.resolution = resolution;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GeospatialDownscaleCSquareSession [trId=" + trId
|
||||
+ ", csquareColumn=" + csquareColumn + ", type=" + type + "]";
|
||||
+ ", csquareColumn=" + csquareColumn + ", resolution="
|
||||
+ resolution + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue