From 25620e007b3a73da5b52907d81448c3a2e7bd393 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 11 Jun 2014 09:29:02 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@97280 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../gwtservice/server/TDGWTServiceImpl.java | 242 +----------------- 1 file changed, 2 insertions(+), 240 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 92ba56c..694728d 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 @@ -4118,7 +4118,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * @return * @throws TDGWTServiceException */ - // TODO protected OperationExecution retrieveOperationExecution( TabularDataService service, AddColumnSession addColumnSession) throws TDGWTServiceException { @@ -4433,10 +4432,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements Map map1 = new HashMap(); Map map2 = new HashMap(); - //ColumnData columnData=splitColumnSession.getColumnData(); - - //ColumnTypeCode type = ColumnTypeMap.getColumnTypeCode(columnData.getTypeCode()); - //ColumnDataType dataType =ColumnTypeMap.getColumnDataType(columnData.getDataTypeName()); ArrayList expressions=splitColumnSession.getExpressions(); if(expressions==null || expressions.size()<=1){ @@ -4464,152 +4459,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements invocations.add(new OperationExecution( operationDefinition.getOperationId(), map2)); - /* - switch (type) { - case ANNOTATION: - map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel1())); - map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(0)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map1)); - map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel2())); - map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(1)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map2)); - - break; - case ATTRIBUTE: - map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel1())); - map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(0)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map1)); - map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel2())); - map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(1)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map2)); - break; - case CODE: - map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel1())); - map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(0)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map1)); - map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel2())); - map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(1)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map2)); - break; - case CODEDESCRIPTION: - map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel1())); - map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(0)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map1)); - map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel2())); - map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(1)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map2)); - break; - case CODENAME: - map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel1())); - map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(0)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map1)); - map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel2())); - map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(1)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map2)); - break; - case DIMENSION: - break; - case MEASURE: - map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel1())); - map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(0)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map1)); - map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(splitColumnSession.getLabel2())); - map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expressions.get(1)); - invocations.add(new OperationExecution( - operationDefinition.getOperationId(), map2)); - break; - case TIMEDIMENSION: - break; - default: - break; - - } - */ - - + return invocations; } @@ -4633,10 +4483,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements Map map = new HashMap(); - //ColumnData columnData=mergeColumnSession.getColumnData(); - - //ColumnTypeCode type = ColumnTypeMap.getColumnTypeCode(columnData.getTypeCode()); - //ColumnDataType dataType =ColumnTypeMap.getColumnDataType(columnData.getDataTypeName()); Expression expression =mergeColumnSession.getExpression(); if(expression==null){ @@ -4654,90 +4500,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements invocation = new OperationExecution( operationDefinition.getOperationId(), map); - /* - switch (type) { - case ANNOTATION: - map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(mergeColumnSession.getLabel())); - map.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expression); - invocation = new OperationExecution( - operationDefinition.getOperationId(), map); - break; - case ATTRIBUTE: - map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(mergeColumnSession.getLabel())); - map.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expression); - invocation = new OperationExecution( - operationDefinition.getOperationId(), map); - break; - case CODE: - map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(mergeColumnSession.getLabel())); - map.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expression); - invocation = new OperationExecution( - operationDefinition.getOperationId(), map); - break; - case CODEDESCRIPTION: - map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(mergeColumnSession.getLabel())); - map.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expression); - invocation = new OperationExecution( - operationDefinition.getOperationId(), map); - break; - case CODENAME: - map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(mergeColumnSession.getLabel())); - map.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expression); - invocation = new OperationExecution( - operationDefinition.getOperationId(), map); - break; - case DIMENSION: - break; - case MEASURE: - map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE, - ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE)); - map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE, - ColumnDataTypeMap.map(ColumnDataType.Text)); - map.put(Constants.PARAMETER_ADD_COLUMN_LABEL, - new ImmutableLocalizedText(mergeColumnSession.getLabel())); - map.put(Constants.PARAMETER_ADD_COLUMN_VALUE, - expression); - invocation = new OperationExecution( - operationDefinition.getOperationId(), map); - break; - case TIMEDIMENSION: - break; - default: - break; - - } - */ - + return invocation; } @@ -4937,7 +4700,6 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements * * {@inheritDoc} */ - // TODO public void startAddColumn(AddColumnSession addColumnSession) throws TDGWTServiceException { try {