Fixed Split and Merge operations
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@97165 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e84c33a352
commit
eabe4b479e
|
@ -4437,7 +4437,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
ColumnData columnData=splitColumnSession.getColumnData();
|
||||
|
||||
ColumnTypeCode type = ColumnTypeMap.getColumnTypeCode(columnData.getTypeCode());
|
||||
ColumnDataType dataType =ColumnTypeMap.getColumnDataType(columnData.getDataTypeName());
|
||||
//ColumnDataType dataType =ColumnTypeMap.getColumnDataType(columnData.getDataTypeName());
|
||||
ArrayList<Expression> expressions=splitColumnSession.getExpressions();
|
||||
|
||||
if(expressions==null || expressions.size()<=1){
|
||||
|
@ -4447,7 +4447,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
switch (type) {
|
||||
case ANNOTATION:
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4457,7 +4457,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
invocations.add(new OperationExecution(
|
||||
operationDefinition.getOperationId(), map1));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4470,9 +4470,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case ATTRIBUTE:
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(dataType));
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
new ImmutableLocalizedText(splitColumnSession.getLabel1()));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
||||
|
@ -4480,9 +4480,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
invocations.add(new OperationExecution(
|
||||
operationDefinition.getOperationId(), map1));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(dataType));
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
new ImmutableLocalizedText(splitColumnSession.getLabel2()));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
||||
|
@ -4492,7 +4492,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case CODE:
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4502,7 +4502,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
invocations.add(new OperationExecution(
|
||||
operationDefinition.getOperationId(), map1));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4514,7 +4514,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case CODEDESCRIPTION:
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4524,7 +4524,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
invocations.add(new OperationExecution(
|
||||
operationDefinition.getOperationId(), map1));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4536,7 +4536,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case CODENAME:
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4546,7 +4546,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
invocations.add(new OperationExecution(
|
||||
operationDefinition.getOperationId(), map1));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4560,9 +4560,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case MEASURE:
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(dataType));
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
new ImmutableLocalizedText(splitColumnSession.getLabel1()));
|
||||
map1.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
||||
|
@ -4570,9 +4570,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
invocations.add(new OperationExecution(
|
||||
operationDefinition.getOperationId(), map1));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(dataType));
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
new ImmutableLocalizedText(splitColumnSession.getLabel2()));
|
||||
map2.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
||||
|
@ -4613,7 +4613,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
ColumnData columnData=mergeColumnSession.getColumnData();
|
||||
|
||||
ColumnTypeCode type = ColumnTypeMap.getColumnTypeCode(columnData.getTypeCode());
|
||||
ColumnDataType dataType =ColumnTypeMap.getColumnDataType(columnData.getDataTypeName());
|
||||
//ColumnDataType dataType =ColumnTypeMap.getColumnDataType(columnData.getDataTypeName());
|
||||
|
||||
Expression expression =mergeColumnSession.getExpression();
|
||||
if(expression==null){
|
||||
|
@ -4623,7 +4623,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
switch (type) {
|
||||
case ANNOTATION:
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4635,9 +4635,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case ATTRIBUTE:
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(dataType));
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
new ImmutableLocalizedText(mergeColumnSession.getLabel()));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
||||
|
@ -4647,7 +4647,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case CODE:
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4659,7 +4659,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case CODEDESCRIPTION:
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4671,7 +4671,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case CODENAME:
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
|
@ -4685,9 +4685,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
break;
|
||||
case MEASURE:
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_COLUMN_TYPE,
|
||||
ColumnTypeCodeMap.getColumnType(type));
|
||||
ColumnTypeCodeMap.getColumnType(ColumnTypeCode.ATTRIBUTE));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_DATA_TYPE,
|
||||
ColumnDataTypeMap.map(dataType));
|
||||
ColumnDataTypeMap.map(ColumnDataType.Text));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_LABEL,
|
||||
new ImmutableLocalizedText(mergeColumnSession.getLabel()));
|
||||
map.put(Constants.PARAMETER_ADD_COLUMN_VALUE,
|
||||
|
|
Loading…
Reference in New Issue