Added ColumnView

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@93362 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-20 09:41:50 +00:00
parent 7bc754d149
commit b00f5a7c43
3 changed files with 172 additions and 5 deletions

View File

@ -704,7 +704,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
protected TabResource retrieveTRMetadataFromService(
TabularDataService service, TabularResource tr, int i)
throws TDGWTServiceException {
Table table = null;
try {
table = service.getLastTable(tr.getId());
@ -731,7 +734,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
t = new TabResource();
t.setTrId(null);
} else {
trId = new TRId(String.valueOf(tr.getId().getValue()),
trId = new TRId(String.valueOf(tr.getId().getValue()),tr.getTableType(),
String.valueOf(tableId.getValue()), table.getTableType()
.getName());
t = getTabResourceInformation(trId);
@ -1206,7 +1209,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
TabularResource serviceTR = service.createTabularResource();
Table table = service.getLastTable(serviceTR.getId());
syncTRMetaData(serviceTR, tabResource);
TRId trId = new TRId(String.valueOf(serviceTR.getId().getValue()),
TRId trId = new TRId(String.valueOf(serviceTR.getId().getValue()),serviceTR.getTableType(),
String.valueOf(table.getId().getValue()), table
.getTableType().getName());
tabResource.setTrId(trId);
@ -2322,6 +2325,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
*
* {@inheritDoc}
*/
public SDMXExportMonitor getSDMXExportMonitor()
@ -2607,6 +2611,15 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
* Save export data on Workspace
*
* @param session
* @param user
* @param exportMetadata
* @param exportSession
* @throws TDGWTServiceException
*/
protected void saveInDestination(HttpSession session, String user,
ExportMetadata exportMetadata, CSVExportSession exportSession)
throws TDGWTServiceException {
@ -2751,6 +2764,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
return invocation;
}
/**
*
* @param service
* @param deleteColumnSession
* @return
* @throws TDGWTServiceException
*/
protected OperationExecution retrieveOperationExecution(
TabularDataService service, DeleteColumnSession deleteColumnSession)
throws TDGWTServiceException {
@ -2771,6 +2791,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
return invocation;
}
/**
*
* @param service
* @param duplicatesSession
* @return
* @throws TDGWTServiceException
*/
protected OperationExecution retrieveOperationExecution(
TabularDataService service, DuplicatesSession duplicatesSession)
throws TDGWTServiceException {
@ -2827,6 +2854,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
return invocation;
}
/**
*
* @param service
* @param labelColumnSession
* @return
* @throws TDGWTServiceException
*/
protected OperationExecution retrieveOperationExecution(
TabularDataService service, LabelColumnSession labelColumnSession)
throws TDGWTServiceException {
@ -2852,6 +2886,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
return invocation;
}
/**
*
* @param service
* @param changeTableTypeSession
* @return
* @throws TDGWTServiceException
*/
protected OperationExecution retrieveOperationExecution(
TabularDataService service,
ChangeTableTypeSession changeTableTypeSession)
@ -2875,6 +2916,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
return invocation;
}
/**
*
* @param service
* @param deleteRowsSession
* @return
* @throws TDGWTServiceException
*/
protected OperationExecution retrieveOperationExecution(
TabularDataService service, DeleteRowsSession deleteRowsSession)
throws TDGWTServiceException {
@ -3492,6 +3540,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
*
* @param trId
* @param aslSession
* @return
* @throws TDGWTServiceException
*/
public ArrayList<ColumnData> getColumnsForDimension(TRId trId,
ASLSession aslSession) throws TDGWTServiceException {
try {
@ -3632,6 +3687,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
}
/**
*
* {@inheritDoc}
*/
@Override
public void startDeleteRows(DeleteRowsSession deleteRowsSession)
throws TDGWTServiceException {
@ -3666,6 +3725,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
*
* {@inheritDoc}
*/
@Override
public DeleteRowsMonitor getDeleteRowsMonitor()
throws TDGWTServiceException {
@ -3768,7 +3831,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
}
/**
*
* {@inheritDoc}
*/
@Override
public TRId startCloneTabularResource(
CloneTabularResourceSession cloneTabularResourceSession)
@ -3808,6 +3877,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
*
* {@inheritDoc}
*/
@Override
public void startDuplicates(DuplicatesSession duplicatesSession)
throws TDGWTServiceException {
@ -3843,6 +3916,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
*
* {@inheritDoc}
*/
@Override
public DuplicatesMonitor getDuplicatesMonitor()
throws TDGWTServiceException {
@ -3946,6 +4023,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
}
/**
*
* {@inheritDoc}
*/
@Override
public ShareInfo getShareInfo(TRId trId) throws TDGWTServiceException {
try {
@ -3979,6 +4060,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
}
/**
*
* {@inheritDoc}
*/
@Override
public void setShare(ShareInfo shareInfo) throws TDGWTServiceException {
try {
@ -4008,6 +4093,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
}
/**
*
* {@inheritDoc}
*/
@Override
public void setTabResourceInformation(TabResource tabResource)
throws TDGWTServiceException {
@ -4058,6 +4147,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
}
/**
*
* {@inheritDoc}
*/
@Override
public ArrayList<Occurences> getOccurencesForBatchReplace(ColumnData column)
throws TDGWTServiceException {

View File

@ -22,6 +22,7 @@ public class ColumnData implements Serializable {
protected String dataTypeName;
protected String label;
protected TRId trId;
protected ColumnViewData columnView;
public String getColumnId() {
return columnId;
@ -86,15 +87,24 @@ public class ColumnData implements Serializable {
public void setLabel(String label) {
this.label = label;
}
public ColumnViewData getColumnView() {
return columnView;
}
public void setColumnView(ColumnViewData columnView) {
this.columnView = columnView;
}
@Override
public String toString() {
return "ColumnData [id=" + id + ", columnId=" + columnId + ", name="
+ name + ", typeName=" + typeName + ", typeCode=" + typeCode
+ ", dataTypeName=" + dataTypeName + ", label=" + label
+ ", trId=" + trId + "]";
+ ", trId=" + trId + ", columnView=" + columnView + "]";
}
}

View File

@ -0,0 +1,64 @@
package org.gcube.portlets.user.td.gwtservice.shared.tr;
import java.io.Serializable;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ColumnViewData implements Serializable {
private static final long serialVersionUID = 6727733264842637144L;
protected boolean viewColumn;
protected String sourceTableDimensionColumnId;
protected String targetTableColumnId;
protected long targetTableId;
public boolean isViewColumn() {
return viewColumn;
}
public void setViewColumn(boolean viewColumn) {
this.viewColumn = viewColumn;
}
public String getSourceTableDimensionColumnId() {
return sourceTableDimensionColumnId;
}
public void setSourceTableDimensionColumnId(
String sourceTableDimensionColumnId) {
this.sourceTableDimensionColumnId = sourceTableDimensionColumnId;
}
public String getTargetTableColumnId() {
return targetTableColumnId;
}
public void setTargetTableColumnId(String targetTableColumnId) {
this.targetTableColumnId = targetTableColumnId;
}
public long getTargetTableId() {
return targetTableId;
}
public void setTargetTableId(long targetTableId) {
this.targetTableId = targetTableId;
}
@Override
public String toString() {
return "ColumnViewData [viewColumn=" + viewColumn
+ ", sourceTableDimensionColumnId="
+ sourceTableDimensionColumnId + ", targetTableColumnId="
+ targetTableColumnId + ", targetTableId=" + targetTableId
+ "]";
}
}