Minor updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@86884 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-12-12 14:34:35 +00:00 committed by Giancarlo Panichi
parent d45cc666a4
commit 1a0db169d5
60 changed files with 406 additions and 295 deletions

View File

@ -7,7 +7,7 @@ import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent;
import org.gcube.portlets.user.tdwx.client.event.FailureEvent;
import org.gcube.portlets.user.tdwx.client.event.FailureEventHandler;
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceFactory;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceXFactory;
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
import org.gcube.portlets.user.tdwx.shared.model.TableId;
@ -17,35 +17,37 @@ import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TabularData {
public class TabularDataX {
protected static int seed = 0;
protected int tdSessionId;
protected String defaultDataSourceFactoryName;
protected EventBus eventBus;
protected TabularDataController controller;
protected TabularDataGridPanel gridPanel;
protected TabularDataXController controller;
protected TabularDataXGridPanel gridPanel;
/**
* Creates a new {@link TabularData object setting the default {@link DataSourceFactory} name.
* @param defaultDataSourceFactoryName the default {@link DataSourceFactory} name.
* Creates a new {@link TabularDataX object setting the default {@link DataSourceXFactory} name.
* @param defaultDataSourceFactoryName the default {@link DataSourceXFactory} name.
*/
public TabularData(String defaultDataSourceFactoryName)
public TabularDataX(String defaultDataSourceFactoryName)
{
this.tdSessionId = seed++;
this.defaultDataSourceFactoryName = defaultDataSourceFactoryName;
eventBus = new SimpleEventBus();
controller = new TabularDataController(tdSessionId, eventBus);
controller = new TabularDataXController(tdSessionId, eventBus);
}
/**
* Creates a new {@link TabularData} object.
* Creates a new {@link TabularDataX} object.
*/
public TabularData()
public TabularDataX()
{
this(null);
}
@ -64,10 +66,10 @@ public class TabularData {
this.defaultDataSourceFactoryName = defaultDataSourceFactoryName;
}
public TabularDataGridPanel getGridPanel()
public TabularDataXGridPanel getGridPanel()
{
if (gridPanel == null) {
gridPanel = new TabularDataGridPanel(tdSessionId, eventBus);
gridPanel = new TabularDataXGridPanel(tdSessionId, eventBus);
}
return gridPanel;
}
@ -92,7 +94,7 @@ public class TabularData {
}
/**
* Opens a new table. The default {@link DataSourceFactory} name is used.
* Opens a new table. The default {@link DataSourceXFactory} name is used.
* @param tableKey the table key.
*/
public void openTable(String tableKey)

View File

@ -9,8 +9,8 @@ import org.gcube.portlets.user.tdwx.client.event.FailureEvent;
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent;
import org.gcube.portlets.user.tdwx.client.event.OpenTableEventHandler;
import org.gcube.portlets.user.tdwx.client.event.TableReadyEvent;
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataService;
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataServiceAsync;
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataXService;
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataXServiceAsync;
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
import org.gcube.portlets.user.tdwx.shared.model.TableId;
@ -23,21 +23,21 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
*/
public class TabularDataController {
public class TabularDataXController {
protected int tdSessionId;
protected EventBus eventBus;
protected TabularDataServiceAsync service;
protected TabularDataXServiceAsync service;
protected TableDefinition currentTable;
/**
* @param eventBus
*/
protected TabularDataController(int tdSessionId, EventBus eventBus) {
protected TabularDataXController(int tdSessionId, EventBus eventBus) {
this.tdSessionId = tdSessionId;
this.eventBus = eventBus;
service = GWT.create(TabularDataService.class);
service = GWT.create(TabularDataXService.class);
bindEventBus();
}

View File

@ -58,7 +58,7 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
*/
public class TabularDataGridPanel extends ContentPanel {
public class TabularDataXGridPanel extends ContentPanel {
protected int tdSessionId;
@ -83,7 +83,7 @@ public class TabularDataGridPanel extends ContentPanel {
/**
* @param eventBus
*/
protected TabularDataGridPanel(int tdSessionId, EventBus eventBus) {
protected TabularDataXGridPanel(int tdSessionId, EventBus eventBus) {
super();
this.tdSessionId = tdSessionId;
this.eventBus = eventBus;

View File

@ -10,8 +10,10 @@ import org.gcube.portlets.user.tdwx.shared.model.ColumnKey;
import org.gcube.portlets.user.tdwx.shared.model.DataRow;
/**
* Represents a table row.
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class Row {

View File

@ -4,8 +4,10 @@
package org.gcube.portlets.user.tdwx.client.config;
/**
* The table view configuration.
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TableViewConfig {

View File

@ -14,9 +14,14 @@ import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
import com.sencha.gxt.core.client.ValueProvider;
import com.sencha.gxt.widget.core.client.grid.GridViewConfig;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
* A bridge between the GridViewConfig and the TableViewConfig.
* @author "Federico De Faveri defaveri@isti.cnr.it"
*/
public class TabularDataGridViewConfig implements GridViewConfig<DataRow> {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.client.event;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class CloseTableEvent extends GwtEvent<CloseTableEventHandler> {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.client.event;
import com.google.gwt.event.shared.EventHandler;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface CloseTableEventHandler extends EventHandler {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.client.event;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class FailureEvent extends GwtEvent<FailureEventHandler> {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.client.event;
import com.google.gwt.event.shared.EventHandler;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface FailureEventHandler extends EventHandler {

View File

@ -8,7 +8,9 @@ import org.gcube.portlets.user.tdwx.shared.model.TableId;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class OpenTableEvent extends GwtEvent<OpenTableEventHandler> {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.client.event;
import com.google.gwt.event.shared.EventHandler;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface OpenTableEventHandler extends EventHandler {

View File

@ -8,7 +8,9 @@ import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
import com.google.gwt.event.shared.GwtEvent;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TableReadyEvent extends GwtEvent<TableReadyEventHandler> {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.client.event;
import com.google.gwt.event.shared.EventHandler;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface TableReadyEventHandler extends EventHandler {

View File

@ -9,8 +9,11 @@ import org.gcube.portlets.user.tdwx.shared.model.DataRow;
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
* @param <N>
*/
public class DataRowColumnConfig<N> extends ColumnConfig<DataRow, N> {

View File

@ -9,7 +9,9 @@ import org.gcube.portlets.user.tdwx.shared.model.DataRow;
import com.sencha.gxt.data.shared.ModelKeyProvider;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DataRowModelKeyProvider implements ModelKeyProvider<DataRow> {

View File

@ -16,7 +16,9 @@ import com.sencha.gxt.data.shared.loader.PagingLoadResult;
import com.sencha.gxt.data.shared.loader.PagingLoadResultBean;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DataRowPagingReader implements DataReader<PagingLoadResult<DataRow>, String> {

View File

@ -16,7 +16,9 @@ import com.sencha.gxt.data.shared.loader.ListLoadResult;
import com.sencha.gxt.data.shared.loader.ListLoadResultBean;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DataRowReader implements DataReader<ListLoadResult<DataRow>, String> {

View File

@ -9,8 +9,11 @@ import org.gcube.portlets.user.tdwx.shared.model.DataRow;
import com.sencha.gxt.core.client.ValueProvider;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
* @param <V>
*/
public class DataRowValueProvider<V> implements ValueProvider<DataRow, V> {

View File

@ -16,7 +16,9 @@ import org.gcube.portlets.user.tdwx.shared.model.ValueType;
import com.google.gwt.core.client.JsArray;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class JSonValueConverter {

View File

@ -10,7 +10,9 @@ import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public final class JSonTable extends JavaScriptObject {

View File

@ -7,8 +7,11 @@ import java.util.Date;
import com.google.gwt.core.client.JavaScriptObject;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public final class JSonValue extends JavaScriptObject {

View File

@ -18,7 +18,9 @@ import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
import com.sencha.gxt.widget.core.client.grid.editing.AbstractGridEditing;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ColumnConfigGenerator {

View File

@ -1,27 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.tdwx.client.rpc;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
*/
public class TabularDataServiceException extends Exception {
private static final long serialVersionUID = 3591608412845539801L;
/**
*
*/
public TabularDataServiceException() {
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public TabularDataServiceException(String message) {
super(message);
}
}

View File

@ -3,6 +3,7 @@
*/
package org.gcube.portlets.user.tdwx.client.rpc;
import org.gcube.portlets.user.tdwx.shared.Constants;
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
import org.gcube.portlets.user.tdwx.shared.model.TableId;
@ -10,18 +11,20 @@ import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
@RemoteServiceRelativePath("tdw")
public interface TabularDataService extends RemoteService {
@RemoteServiceRelativePath(Constants.REMOTE_SERVICE_RELATIVE_PATH)
public interface TabularDataXService extends RemoteService {
public TableDefinition openTable(int tdSessionId, TableId tableId) throws TabularDataServiceException;
public TableDefinition openTable(int tdSessionId, TableId tableId) throws TabularDataXServiceException;
public TableDefinition getCurrentTableDefinition(int tdSessionId) throws TabularDataServiceException;
public TableDefinition getCurrentTableDefinition(int tdSessionId) throws TabularDataXServiceException;
public TableDefinition getTableDefinition(TableId id) throws TabularDataServiceException;
public TableDefinition getTableDefinition(TableId id) throws TabularDataXServiceException;
public void closeTable(int tdSessionId) throws TabularDataServiceException;
public void closeTable(int tdSessionId) throws TabularDataXServiceException;
}

View File

@ -9,10 +9,12 @@ import org.gcube.portlets.user.tdwx.shared.model.TableId;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface TabularDataServiceAsync {
public interface TabularDataXServiceAsync {
void getCurrentTableDefinition(int id, AsyncCallback<TableDefinition> callback);

View File

@ -0,0 +1,29 @@
/**
*
*/
package org.gcube.portlets.user.tdwx.client.rpc;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TabularDataXServiceException extends Exception {
private static final long serialVersionUID = 3591608412845539801L;
/**
*
*/
public TabularDataXServiceException() {
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public TabularDataXServiceException(String message) {
super(message);
}
}

View File

@ -7,10 +7,12 @@ import java.util.Comparator;
import org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition;
/**
* Compares the {@link ColumnDefinition} by position field.
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* Compares the {@link ColumnDefinition} by position field.
*/
public class ColumnPositionComparator implements Comparator<ColumnDefinition> {

View File

@ -16,8 +16,11 @@ import com.sencha.gxt.data.shared.loader.PagingLoader;
import com.sencha.gxt.widget.core.client.grid.RowNumberer;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
* @param <M>
*/
public class LiveRowNumberer<M> extends RowNumberer<M> {

View File

@ -10,7 +10,9 @@ import com.sencha.gxt.data.shared.loader.PagingLoadConfig;
import com.sencha.gxt.data.shared.writer.DataWriter;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class PagingLoadUrlEncoder implements DataWriter<PagingLoadConfig, String> {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.client.util;
import com.google.gwt.http.client.URL;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class UrlBuilder {

View File

@ -7,10 +7,10 @@ import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataService;
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataServiceException;
import org.gcube.portlets.user.tdwx.server.datasource.DataSource;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceException;
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataXService;
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataXServiceException;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceX;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException;
import org.gcube.portlets.user.tdwx.server.util.SessionUtil;
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
import org.gcube.portlets.user.tdwx.shared.model.TableId;
@ -19,16 +19,18 @@ import org.gcube.portlets.user.tdwx.shared.model.TableId;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TabularDataServiceImpl extends RemoteServiceServlet implements TabularDataService {
public class TabularDataXServiceImpl extends RemoteServiceServlet implements TabularDataXService {
private static final long serialVersionUID = 193560783723693864L;
protected static Logger logger = LoggerFactory.getLogger(TabularDataServiceImpl.class);
protected static Logger logger = LoggerFactory.getLogger(TabularDataXServiceImpl.class);
protected DataSource getDataSource(int tdSessionId)
protected DataSourceX getDataSource(int tdSessionId)
{
HttpSession httpSession = this.getThreadLocalRequest().getSession();
return SessionUtil.getDataSource(httpSession, tdSessionId);
@ -38,19 +40,19 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu
* {@inheritDoc}
*/
@Override
public TableDefinition openTable(int tdSessionId, TableId tableId) throws TabularDataServiceException {
public TableDefinition openTable(int tdSessionId, TableId tableId) throws TabularDataXServiceException {
logger.debug("openTable tdSessionId: "+tdSessionId+" tableId: "+tableId);
try{
closeCurrentTable(tdSessionId, true);
HttpSession httpSession = this.getThreadLocalRequest().getSession();
DataSource dataSource = SessionUtil.openDataSource(httpSession, tableId);
DataSourceX dataSource = SessionUtil.openDataSource(httpSession, tableId);
SessionUtil.setDataSource(httpSession, tdSessionId, dataSource);
return dataSource.getTableDefinition();
}catch (Exception e) {
logger.error("An error occurred opening the specified table "+tableId+" in session "+tdSessionId, e);
throw new TabularDataServiceException("An error occurred opening the specified table: "+e.getMessage());
throw new TabularDataXServiceException("An error occurred opening the specified table: "+e.getMessage());
}
}
@ -58,15 +60,15 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu
* {@inheritDoc}
*/
@Override
public TableDefinition getCurrentTableDefinition(int tdSessionId) throws TabularDataServiceException {
public TableDefinition getCurrentTableDefinition(int tdSessionId) throws TabularDataXServiceException {
logger.debug("getCurrentTableDefinition tdSessionId: "+tdSessionId);
try{
DataSource dataSource = getDataSource(tdSessionId);
DataSourceX dataSource = getDataSource(tdSessionId);
return dataSource.getTableDefinition();
}catch (Exception e) {
logger.error("An error occurred retrieving the table definition", e);
throw new TabularDataServiceException("An error occurred retrieving the table definition: "+e.getMessage());
throw new TabularDataXServiceException("An error occurred retrieving the table definition: "+e.getMessage());
}
}
@ -74,16 +76,16 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu
* {@inheritDoc}
*/
@Override
public TableDefinition getTableDefinition(TableId id) throws TabularDataServiceException {
public TableDefinition getTableDefinition(TableId id) throws TabularDataXServiceException {
logger.debug("getTableDefinition TableId: "+id);
try{
HttpSession httpSession = this.getThreadLocalRequest().getSession();
DataSource dataSource = SessionUtil.openDataSource(httpSession,id);
DataSourceX dataSource = SessionUtil.openDataSource(httpSession,id);
return dataSource.getTableDefinition();
}catch (Exception e) {
logger.error("An error occurred getting the table definition", e);
throw new TabularDataServiceException("An error occurred getting the table definition: "+e.getMessage());
throw new TabularDataXServiceException("An error occurred getting the table definition: "+e.getMessage());
}
}
@ -91,21 +93,21 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu
* {@inheritDoc}
*/
@Override
public void closeTable(int tdSessionId) throws TabularDataServiceException {
public void closeTable(int tdSessionId) throws TabularDataXServiceException {
try {
closeCurrentTable(tdSessionId, false);
} catch (DataSourceException e) {
} catch (DataSourceXException e) {
logger.error("An error occurred closing the current table", e);
throw new TabularDataServiceException("An error occurred closing the current table: "+e.getMessage());
throw new TabularDataXServiceException("An error occurred closing the current table: "+e.getMessage());
}
}
protected void closeCurrentTable(int tdSessionId, boolean silent) throws DataSourceException {
protected void closeCurrentTable(int tdSessionId, boolean silent) throws DataSourceXException {
try {
HttpSession httpSession = this.getThreadLocalRequest().getSession();
SessionUtil.closeDataSource(httpSession, tdSessionId);
} catch (DataSourceException e)
} catch (DataSourceXException e)
{
if (!silent) throw e;
}

View File

@ -1,6 +1,3 @@
/**
*
*/
package org.gcube.portlets.user.tdwx.server;
import java.io.IOException;
@ -10,7 +7,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.gcube.portlets.user.tdwx.server.datasource.DataSource;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceX;
import org.gcube.portlets.user.tdwx.server.datasource.Direction;
import org.gcube.portlets.user.tdwx.server.util.SessionUtil;
import org.gcube.portlets.user.tdwx.shared.ServletParameters;
@ -18,14 +15,16 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TabularDataServlet extends HttpServlet {
public class TabularDataXServlet extends HttpServlet {
private static final long serialVersionUID = 3995054634540860599L;
protected Logger log = LoggerFactory.getLogger(TabularDataServlet.class);
protected Logger log = LoggerFactory.getLogger(TabularDataXServlet.class);
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
@ -72,7 +71,7 @@ public class TabularDataServlet extends HttpServlet {
log.trace("limitParameter: " + limitParameter);
int limit = Integer.parseInt(limitParameter);
DataSource dataSource = SessionUtil.getDataSource(
DataSourceX dataSource = SessionUtil.getDataSource(
request.getSession(), tdSessionId);
String json = dataSource.getDataAsJSon(start, limit, sortColumn,
direction);

View File

@ -1,37 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.tdwx.server.datasource;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.portlets.user.tdwx.shared.model.TableId;
/**
* Generator of {@link DataSource}
* @author "Federico De Faveri defaveri@isti.cnr.it"
*/
public interface DataSourceFactory {
/**
* The DataSourceFactory unique id.
* @return
*/
public String getId();
/**
* Open the specified datasource {@link DataSource}.
* @param id the datasource id.
* @return the retrieved datasource.
* @throws DataSourceException if an error occurs retrieving the datasource.
*/
public DataSource openDataSource(ASLSession session, TableId id) throws DataSourceException;
/**
* Close the specified DataSource releasing allocated resources.
* @param session
* @param dataSource
* @throws DataSourceException
*/
public void closeDataSource(ASLSession session, DataSource dataSource) throws DataSourceException;
}

View File

@ -1,83 +0,0 @@
/**
*
*/
package org.gcube.portlets.user.tdwx.server.datasource;
import java.util.HashMap;
import java.util.Map;
import java.util.ServiceLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DataSourceFactoryRegistry {
protected static DataSourceFactoryRegistry instance;
public static DataSourceFactoryRegistry getInstance()
{
if (instance == null) instance = new DataSourceFactoryRegistry();
return instance;
}
private static final Logger log = LoggerFactory.getLogger(DataSourceFactoryRegistry.class);
protected Map<String, DataSourceFactory> instancesRegistry = new HashMap<String, DataSourceFactory>();
protected DataSourceFactoryRegistry()
{
addInstancesInEnv();
}
protected void addInstancesInEnv()
{
ServiceLoader<DataSourceFactory> loader = ServiceLoader.load(DataSourceFactory.class);
for (DataSourceFactory factory:loader) add(factory);
}
/**
* Adds a new {@link DataSourceFactory} to the registry.
* @param factory the {@link DataSourceFactory} to add.
*/
public void add(DataSourceFactory factory)
{
log.trace("add factory: "+factory.getId());
DataSourceFactory old = instancesRegistry.put(factory.getId(), factory);
if (old!=null) log.warn("A DataSourceFactory instance with id "+old.getId()+" and class "+old.getClass().getCanonicalName()+" was already registered. The old one has been replaced by the new one with class "+factory.getClass().getCanonicalName()+".");
}
/**
* Retrieves the specified {@link DataSourceFactory}.
* @param factoryId the {@link DataSourceFactory} id.
* @return the {@link DataSourceFactory} if found, <code>null</code> otherwise.
*/
public DataSourceFactory get(String factoryId)
{
return instancesRegistry.get(factoryId);
}
public boolean exists(String factoryId)
{
return instancesRegistry.containsKey(factoryId);
}
/**
* Removes the specified {@link DataSourceFactory}.
* @param factoryId the {@link DataSourceFactory} id.
*/
public void remove(String factoryId)
{
log.trace("remove factoryId: "+factoryId);
instancesRegistry.remove(factoryId);
}
}

View File

@ -1,28 +1,27 @@
/**
*
*/
package org.gcube.portlets.user.tdwx.server.datasource;
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
/**
* A TDW datasource.
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface DataSource {
public interface DataSourceX {
/**
* Returns the id of the {@link DataSourceFactory} that have generated it.
* @return the {@link DataSourceFactory} id.
* Returns the id of the {@link DataSourceXFactory} that have generated it.
* @return the {@link DataSourceXFactory} id.
*/
public String getDataSourceFactoryId();
/**
* Returns the table definition.
* @return a table definition.
* @throws DataSourceException if an error occurred retrieving the table definition.
* @throws DataSourceXException if an error occurred retrieving the table definition.
*/
public TableDefinition getTableDefinition() throws DataSourceException;
public TableDefinition getTableDefinition() throws DataSourceXException;
/**
* Retrieves the table data as JSON object.
@ -31,8 +30,8 @@ public interface DataSource {
* @param sortingColumn the column used for sorting.
* @param direction the sorting direction.
* @return the JSON object as String.
* @throws DataSourceException if an error occurred retrieving the table data.
* @throws DataSourceXException if an error occurred retrieving the table data.
*/
public String getDataAsJSon(int start, int limit, String sortingColumn, Direction direction) throws DataSourceException;
public String getDataAsJSon(int start, int limit, String sortingColumn, Direction direction) throws DataSourceXException;
}

View File

@ -4,10 +4,12 @@
package org.gcube.portlets.user.tdwx.server.datasource;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DataSourceException extends Exception {
public class DataSourceXException extends Exception {
private static final long serialVersionUID = 3478740829309767716L;
@ -15,14 +17,14 @@ public class DataSourceException extends Exception {
* @param message
* @param cause
*/
public DataSourceException(String message, Throwable cause) {
public DataSourceXException(String message, Throwable cause) {
super(message, cause);
}
/**
* @param message
*/
public DataSourceException(String message) {
public DataSourceXException(String message) {
super(message);
}

View File

@ -0,0 +1,41 @@
package org.gcube.portlets.user.tdwx.server.datasource;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.portlets.user.tdwx.shared.model.TableId;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*
* Generator of {@link DataSourceX}
*
*/
public interface DataSourceXFactory {
/**
* The DataSourceFactory unique id.
* @return
*/
public String getId();
/**
* Open the specified datasource {@link DataSourceX}.
* @param id the datasource id.
* @return the retrieved datasource.
* @throws DataSourceXException if an error occurs retrieving the datasource.
*/
public DataSourceX openDataSource(ASLSession session, TableId id) throws DataSourceXException;
/**
* Close the specified DataSource releasing allocated resources.
* @param session
* @param dataSource
* @throws DataSourceXException
*/
public void closeDataSource(ASLSession session, DataSourceX dataSource) throws DataSourceXException;
}

View File

@ -0,0 +1,83 @@
/**
*
*/
package org.gcube.portlets.user.tdwx.server.datasource;
import java.util.HashMap;
import java.util.Map;
import java.util.ServiceLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DataSourceXFactoryRegistry {
protected static DataSourceXFactoryRegistry instance;
public static DataSourceXFactoryRegistry getInstance()
{
if (instance == null) instance = new DataSourceXFactoryRegistry();
return instance;
}
private static final Logger log = LoggerFactory.getLogger(DataSourceXFactoryRegistry.class);
protected Map<String, DataSourceXFactory> instancesRegistry = new HashMap<String, DataSourceXFactory>();
protected DataSourceXFactoryRegistry()
{
addInstancesInEnv();
}
protected void addInstancesInEnv()
{
ServiceLoader<DataSourceXFactory> loader = ServiceLoader.load(DataSourceXFactory.class);
for (DataSourceXFactory factory:loader) add(factory);
}
/**
* Adds a new {@link DataSourceXFactory} to the registry.
* @param factory the {@link DataSourceXFactory} to add.
*/
public void add(DataSourceXFactory factory)
{
log.trace("add factory: "+factory.getId());
DataSourceXFactory old = instancesRegistry.put(factory.getId(), factory);
if (old!=null) log.warn("A DataSourceFactory instance with id "+old.getId()+" and class "+old.getClass().getCanonicalName()+" was already registered. The old one has been replaced by the new one with class "+factory.getClass().getCanonicalName()+".");
}
/**
* Retrieves the specified {@link DataSourceXFactory}.
* @param factoryId the {@link DataSourceXFactory} id.
* @return the {@link DataSourceXFactory} if found, <code>null</code> otherwise.
*/
public DataSourceXFactory get(String factoryId)
{
return instancesRegistry.get(factoryId);
}
public boolean exists(String factoryId)
{
return instancesRegistry.containsKey(factoryId);
}
/**
* Removes the specified {@link DataSourceXFactory}.
* @param factoryId the {@link DataSourceXFactory} id.
*/
public void remove(String factoryId)
{
log.trace("remove factoryId: "+factoryId);
instancesRegistry.remove(factoryId);
}
}

View File

@ -8,7 +8,9 @@ import java.sql.Date;
import org.gcube.portlets.user.tdwx.server.util.JSONConstants;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class GridJSonBuilder {

View File

@ -10,7 +10,9 @@ import java.sql.Date;
import org.gcube.portlets.user.tdwx.server.util.JSONConstants;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class GridJSonWriter {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.server.datasource.util;
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TableJSonBuilder extends GridJSonBuilder {

View File

@ -9,7 +9,9 @@ import java.io.Writer;
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TableJSonWriter extends GridJSonWriter {

View File

@ -3,16 +3,18 @@
*/
package org.gcube.portlets.user.tdwx.server.session;
import org.gcube.portlets.user.tdwx.server.datasource.DataSource;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceX;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TDSession {
protected int id;
protected DataSource dataSource;
protected DataSourceX dataSource;
/**
* @param id
@ -31,7 +33,7 @@ public class TDSession {
/**
* @return the dataSource
*/
public DataSource getDataSource() {
public DataSourceX getDataSource() {
return dataSource;
}
@ -45,7 +47,7 @@ public class TDSession {
/**
* @param dataSource the dataSource to set
*/
public void setDataSource(DataSource dataSource) {
public void setDataSource(DataSourceX dataSource) {
this.dataSource = dataSource;
}

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.server.session;
import java.util.Arrays;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TDSessionList {

View File

@ -4,7 +4,9 @@
package org.gcube.portlets.user.tdwx.server.util;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class JSONConstants {

View File

@ -8,10 +8,10 @@ import javax.servlet.http.HttpSession;
import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portlets.user.tdwx.server.datasource.DataSource;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceException;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceFactory;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceFactoryRegistry;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceX;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceXFactory;
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceXFactoryRegistry;
import org.gcube.portlets.user.tdwx.server.session.TDSession;
import org.gcube.portlets.user.tdwx.server.session.TDSessionList;
import org.gcube.portlets.user.tdwx.shared.Constants;
@ -20,7 +20,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class SessionUtil {
@ -54,14 +56,14 @@ public class SessionUtil {
return session;
}
public static DataSource getDataSource(HttpSession httpSession, int tdSessionId)
public static DataSourceX getDataSource(HttpSession httpSession, int tdSessionId)
{
ASLSession session = getSession(httpSession);
TDSession tdSession = getSession(session, tdSessionId);
return tdSession.getDataSource();
}
public static void setDataSource(HttpSession httpSession, int tdSessionId, DataSource datasource)
public static void setDataSource(HttpSession httpSession, int tdSessionId, DataSourceX datasource)
{
ASLSession session = getSession(httpSession);
TDSession tdSession = getSession(session, tdSessionId);
@ -85,21 +87,21 @@ public class SessionUtil {
return sessions.get(tdSessionId);
}
public static DataSource openDataSource(HttpSession httpSession, TableId tableId) throws DataSourceException
public static DataSourceX openDataSource(HttpSession httpSession, TableId tableId) throws DataSourceXException
{
DataSourceFactoryRegistry dataSourceFactoryRegistry = DataSourceFactoryRegistry.getInstance();
DataSourceFactory factory = dataSourceFactoryRegistry.get(tableId.getDataSourceFactoryId());
if (factory==null) throw new DataSourceException("DataSourceFactory with id "+tableId.getDataSourceFactoryId()+" don't exists");
DataSourceXFactoryRegistry dataSourceFactoryRegistry = DataSourceXFactoryRegistry.getInstance();
DataSourceXFactory factory = dataSourceFactoryRegistry.get(tableId.getDataSourceFactoryId());
if (factory==null) throw new DataSourceXException("DataSourceFactory with id "+tableId.getDataSourceFactoryId()+" don't exists");
ASLSession session = getSession(httpSession);
return factory.openDataSource(session, tableId);
}
public static void closeDataSource(HttpSession httpSession, int tdSessionId) throws DataSourceException
public static void closeDataSource(HttpSession httpSession, int tdSessionId) throws DataSourceXException
{
DataSource currentDataSource = getDataSource(httpSession, tdSessionId);
DataSourceX currentDataSource = getDataSource(httpSession, tdSessionId);
if (currentDataSource != null) {
DataSourceFactoryRegistry dataSourceFactoryRegistry = DataSourceFactoryRegistry.getInstance();
DataSourceFactory factory = dataSourceFactoryRegistry.get(currentDataSource.getDataSourceFactoryId());
DataSourceXFactoryRegistry dataSourceFactoryRegistry = DataSourceXFactoryRegistry.getInstance();
DataSourceXFactory factory = dataSourceFactoryRegistry.get(currentDataSource.getDataSourceFactoryId());
ASLSession session = getSession(httpSession);
factory.closeDataSource(session, currentDataSource);
}

View File

@ -4,6 +4,7 @@
package org.gcube.portlets.user.tdwx.shared;
/**
*
* @author "Giancarlo Panichi"
@ -15,6 +16,7 @@ public class Constants {
public final static String VERSION = "1.0.0";
public final static String DEFAULT_USER = "giancarlo.panichi";
public final static String DEFAULT_SCOPE = "/gcube/devsec";
public final static String REMOTE_SERVICE_RELATIVE_PATH= "tdwx";
}

View File

@ -4,7 +4,9 @@
package org.gcube.portlets.user.tdwx.shared;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ServletParameters {

View File

@ -7,8 +7,10 @@ import java.io.Serializable;
/**
* Describes a column in the widget model.
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ColumnDefinition implements Serializable {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.shared.model;
import java.io.Serializable;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ColumnKey implements Serializable {

View File

@ -4,7 +4,9 @@
package org.gcube.portlets.user.tdwx.shared.model;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public enum ColumnType {

View File

@ -4,7 +4,9 @@
package org.gcube.portlets.user.tdwx.shared.model;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class DataRow {

View File

@ -10,8 +10,9 @@ import java.util.List;
import java.util.Map;
/**
* Describes a table in the widget model.
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TableDefinition implements Serializable {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.shared.model;
import java.io.Serializable;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TableId implements Serializable {

View File

@ -6,7 +6,9 @@ package org.gcube.portlets.user.tdwx.shared.model;
import java.io.Serializable;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public enum ValueType implements Serializable {

View File

@ -9,7 +9,9 @@ import org.gcube.portlets.user.tdwx.server.datasource.util.GridJSonBuilder;
import org.junit.Test;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TestGridJSonBuilder {

View File

@ -18,7 +18,9 @@ import org.junit.Assert;
import org.junit.Test;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TestSpeed {

View File

@ -14,7 +14,9 @@ import org.gcube.portlets.user.tdwx.shared.model.ValueType;
import org.junit.Test;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TestTableJSonBuilder {

View File

@ -17,7 +17,9 @@ import org.junit.Assert;
import org.junit.Test;
/**
* @author "Federico De Faveri defaveri@isti.cnr.it"
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class TestTableJSonWriter {