Updated PeriodDataType
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@111678 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
086ae47577
commit
408e40c2e0
|
@ -334,7 +334,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
List<TimeFormat> listTimeFormat = period.getAcceptedFormats();
|
List<TimeFormat> listTimeFormat = period.getAcceptedFormats();
|
||||||
for (TimeFormat timeF : listTimeFormat) {
|
for (TimeFormat timeF : listTimeFormat) {
|
||||||
TimeDataFormat timeDataFormat = new TimeDataFormat(
|
TimeDataFormat timeDataFormat = new TimeDataFormat(
|
||||||
timeF.getExample(), timeF.getRegExpr());
|
timeF.getId(), timeF.getExample(), timeF.getRegExpr());
|
||||||
timeDataFormats.add(timeDataFormat);
|
timeDataFormats.add(timeDataFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
periodDataTypes.add(periodDataType);
|
periodDataTypes.add(periodDataType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
logger.debug("PeriodDataTypes: "+periodDataTypes);
|
||||||
return periodDataTypes;
|
return periodDataTypes;
|
||||||
|
|
||||||
} catch (TDGWTServiceException e) {
|
} catch (TDGWTServiceException e) {
|
||||||
|
@ -382,14 +382,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
List<TimeFormat> listTimeFormat = period.getAcceptedFormats();
|
List<TimeFormat> listTimeFormat = period.getAcceptedFormats();
|
||||||
for (TimeFormat timeF : listTimeFormat) {
|
for (TimeFormat timeF : listTimeFormat) {
|
||||||
TimeDataFormat timeDataFormat = new TimeDataFormat(
|
TimeDataFormat timeDataFormat = new TimeDataFormat(
|
||||||
timeF.getExample(), timeF.getRegExpr());
|
timeF.getId(), timeF.getExample(), timeF.getRegExpr());
|
||||||
timeDataFormats.add(timeDataFormat);
|
timeDataFormats.add(timeDataFormat);
|
||||||
}
|
}
|
||||||
PeriodDataType periodDT = new PeriodDataType(
|
PeriodDataType periodDT = new PeriodDataType(
|
||||||
period.name(), period.getName(), timeDataFormats);
|
period.name(), period.getName(), timeDataFormats);
|
||||||
hierarchicalPeriodDataTypes.add(periodDT);
|
hierarchicalPeriodDataTypes.add(periodDT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("hierarchicalPeriodDataTypes: "+hierarchicalPeriodDataTypes);
|
||||||
return hierarchicalPeriodDataTypes;
|
return hierarchicalPeriodDataTypes;
|
||||||
|
|
||||||
} catch (TDGWTServiceException e) {
|
} catch (TDGWTServiceException e) {
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class OpExecution4ChangeColumnType extends OpExecutionBuilder {
|
||||||
TRId trId = col.getTrId();
|
TRId trId = col.getTrId();
|
||||||
logger.debug("trID: " + trId);
|
logger.debug("trID: " + trId);
|
||||||
long tabId;
|
long tabId;
|
||||||
if(trId.isViewTable()){
|
if (trId.isViewTable()) {
|
||||||
tabId = new Long(trId.getReferenceTargetTableId());
|
tabId = new Long(trId.getReferenceTargetTableId());
|
||||||
} else {
|
} else {
|
||||||
tabId = new Long(trId.getTableId());
|
tabId = new Long(trId.getTableId());
|
||||||
|
@ -160,9 +160,11 @@ public class OpExecution4ChangeColumnType extends OpExecutionBuilder {
|
||||||
operationDefinition = OperationDefinitionMap.map(
|
operationDefinition = OperationDefinitionMap.map(
|
||||||
OperationsId.ChangeToTimeDimensionColumn.toString(),
|
OperationsId.ChangeToTimeDimensionColumn.toString(),
|
||||||
service);
|
service);
|
||||||
|
|
||||||
map.put(Constants.PARAMETER_PERIOD_FORMAT, changeColumnTypeSession
|
map.put(Constants.PARAMETER_PERIOD_FORMAT, changeColumnTypeSession
|
||||||
.getTimeDimensionType().toString());
|
.getPeriodDataType().getLabel());
|
||||||
|
map.put(Constants.PARAMETER_PERIOD_INPUT_FORMAT_ID, changeColumnTypeSession
|
||||||
|
.getTimeDataFormat().getId());
|
||||||
|
|
||||||
invocation = new OperationExecution(changeColumnTypeSession
|
invocation = new OperationExecution(changeColumnTypeSession
|
||||||
.getColumnData().getColumnId(),
|
.getColumnData().getColumnId(),
|
||||||
operationDefinition.getOperationId(), map);
|
operationDefinition.getOperationId(), map);
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class PeriodTypeMap {
|
||||||
List<TimeFormat> listTimeFormat = periodType.getAcceptedFormats();
|
List<TimeFormat> listTimeFormat = periodType.getAcceptedFormats();
|
||||||
for (TimeFormat timeF : listTimeFormat) {
|
for (TimeFormat timeF : listTimeFormat) {
|
||||||
TimeDataFormat timeDataFormat = new TimeDataFormat(
|
TimeDataFormat timeDataFormat = new TimeDataFormat(
|
||||||
timeF.getExample(), timeF.getRegExpr());
|
null, timeF.getExample(), timeF.getRegExpr());
|
||||||
timeDataFormats.add(timeDataFormat);
|
timeDataFormats.add(timeDataFormat);
|
||||||
}
|
}
|
||||||
PeriodDataType periodDataType = new PeriodDataType(
|
PeriodDataType periodDataType = new PeriodDataType(
|
||||||
|
|
|
@ -76,6 +76,8 @@ public class Constants {
|
||||||
public static final String PARAMETER_COLUMN_MAPPING = "mapping";
|
public static final String PARAMETER_COLUMN_MAPPING = "mapping";
|
||||||
|
|
||||||
public static final String PARAMETER_PERIOD_FORMAT = "periodFormat";
|
public static final String PARAMETER_PERIOD_FORMAT = "periodFormat";
|
||||||
|
public static final String PARAMETER_PERIOD_INPUT_FORMAT_ID = "inputFormatId";
|
||||||
|
|
||||||
public static final String PARAMETER_EXPRESSION = "expression";
|
public static final String PARAMETER_EXPRESSION = "expression";
|
||||||
|
|
||||||
public static final String PARAMETER_TABLE_TYPE = "tableType";
|
public static final String PARAMETER_TABLE_TYPE = "tableType";
|
||||||
|
|
|
@ -4,30 +4,36 @@ import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author giancarlo email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TimeDataFormat implements Serializable {
|
public class TimeDataFormat implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 6790236931169590842L;
|
private static final long serialVersionUID = 6790236931169590842L;
|
||||||
|
|
||||||
|
private String id;
|
||||||
private String example;
|
private String example;
|
||||||
private String regexp;
|
private String regexp;
|
||||||
|
|
||||||
public TimeDataFormat(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public TimeDataFormat(String example, String regexp) {
|
public TimeDataFormat() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeDataFormat(String id, String example, String regexp) {
|
||||||
super();
|
super();
|
||||||
|
this.id=id;
|
||||||
this.example = example;
|
this.example = example;
|
||||||
this.regexp = regexp;
|
this.regexp = regexp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
public String getExample() {
|
public String getExample() {
|
||||||
return example;
|
return example;
|
||||||
|
@ -47,12 +53,8 @@ public class TimeDataFormat implements Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "TimeDataFormat [example=" + example + ", regexp=" + regexp
|
return "TimeDataFormat [id=" + id + ", example=" + example
|
||||||
+ "]";
|
+ ", regexp=" + regexp + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.PeriodDataType;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.PeriodDataType;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TimeDataFormat;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMappingList;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.column.mapping.ColumnMappingList;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnDataType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
|
||||||
|
@ -13,17 +14,18 @@ public class ChangeColumnTypeSession implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 7154832921853261421L;
|
private static final long serialVersionUID = 7154832921853261421L;
|
||||||
|
|
||||||
protected ColumnData columnData;
|
private ColumnData columnData;
|
||||||
protected ColumnTypeCode columnTypeCode;
|
private ColumnTypeCode columnTypeCode;
|
||||||
protected ColumnDataType columnDataType;
|
private ColumnDataType columnDataType;
|
||||||
protected ColumnTypeCode columnTypeCodeTarget;
|
private ColumnTypeCode columnTypeCodeTarget;
|
||||||
protected ColumnDataType columnDataTypeTarget;
|
private ColumnDataType columnDataTypeTarget;
|
||||||
protected String locale;
|
private String locale;
|
||||||
|
|
||||||
protected PeriodDataType timeDimensionType;
|
private PeriodDataType timeDimensionType;
|
||||||
protected ColumnData codelistColumnReference;
|
private TimeDataFormat timeDataFormat;
|
||||||
|
private ColumnData codelistColumnReference;
|
||||||
|
|
||||||
protected ColumnMappingList columnMappingList;
|
private ColumnMappingList columnMappingList;
|
||||||
|
|
||||||
public ChangeColumnTypeSession() {
|
public ChangeColumnTypeSession() {
|
||||||
|
|
||||||
|
@ -112,13 +114,21 @@ public class ChangeColumnTypeSession implements Serializable {
|
||||||
this.codelistColumnReference = codelistColumnReference;
|
this.codelistColumnReference = codelistColumnReference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PeriodDataType getTimeDimensionType() {
|
public PeriodDataType getPeriodDataType() {
|
||||||
return timeDimensionType;
|
return timeDimensionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTimeDimensionType(PeriodDataType timeDimensionType) {
|
public void setPeriodDataType(PeriodDataType timeDimensionType) {
|
||||||
this.timeDimensionType = timeDimensionType;
|
this.timeDimensionType = timeDimensionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TimeDataFormat getTimeDataFormat() {
|
||||||
|
return timeDataFormat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimeDataFormat(TimeDataFormat timeDataFormat) {
|
||||||
|
this.timeDataFormat = timeDataFormat;
|
||||||
|
}
|
||||||
|
|
||||||
public String getLocale() {
|
public String getLocale() {
|
||||||
return locale;
|
return locale;
|
||||||
|
@ -144,8 +154,11 @@ public class ChangeColumnTypeSession implements Serializable {
|
||||||
+ columnTypeCodeTarget + ", columnDataTypeTarget="
|
+ columnTypeCodeTarget + ", columnDataTypeTarget="
|
||||||
+ columnDataTypeTarget + ", locale=" + locale
|
+ columnDataTypeTarget + ", locale=" + locale
|
||||||
+ ", timeDimensionType=" + timeDimensionType
|
+ ", timeDimensionType=" + timeDimensionType
|
||||||
|
+ ", timeDataFormat=" + timeDataFormat
|
||||||
+ ", codelistColumnReference=" + codelistColumnReference
|
+ ", codelistColumnReference=" + codelistColumnReference
|
||||||
+ ", columnMappingList=" + columnMappingList + "]";
|
+ ", columnMappingList=" + columnMappingList + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue