org.gcube.portlets.user.tdw.datasource.td
Class TDDataSource
java.lang.Object
org.gcube.portlets.user.tdw.datasource.td.TDDataSource
- All Implemented Interfaces:
- org.gcube.portlets.user.tdw.server.datasource.DataSource
public class TDDataSource
- extends Object
- implements org.gcube.portlets.user.tdw.server.datasource.DataSource
- Author:
- "Giancarlo Panichi" g.panichi@isti.cnr.it
|
Constructor Summary |
TDDataSource(String dataSourceFactoryId,
org.gcube.application.framework.core.session.ASLSession aslSession,
String tableName)
|
|
Method Summary |
void |
close()
|
protected org.gcube.portlets.user.tdw.shared.model.ColumnDefinition |
createPrimaryKeyColumn(List<org.gcube.portlets.user.tdw.shared.model.ColumnDefinition> columns)
|
static TDDataSource |
createTDDataSource(String dataSourceFactoryId,
org.gcube.application.framework.core.session.ASLSession aslSession,
String tableName)
|
protected org.gcube.portlets.user.tdw.shared.model.TableDefinition |
extractTableDefinition()
|
protected org.gcube.portlets.user.tdw.server.datasource.util.TableJSonBuilder |
getBuilder()
|
protected org.gcube.portlets.user.tdw.shared.model.ColumnDefinition |
getColumnDefinition(org.gcube.data.analysis.tabulardata.model.column.Column serviceColumn,
int ordinalPosition)
|
protected List<org.gcube.portlets.user.tdw.shared.model.ColumnDefinition> |
getColumnDefinitions()
|
String |
getDataAsJSon(int start,
int limit,
String sortingColumn,
org.gcube.portlets.user.tdw.server.datasource.Direction direction)
|
String |
getDataSourceFactoryId()
|
protected String |
getJSon(int start,
org.gcube.data.analysis.tabulardata.query.parameters.QueryOrder queryOrder)
|
org.gcube.portlets.user.tdw.shared.model.TableDefinition |
getTableDefinition()
|
protected int |
getTableSize()
|
protected ArrayList<org.gcube.portlets.user.tdw.shared.model.ColumnDefinition> |
sort(Collection<org.gcube.portlets.user.tdw.shared.model.ColumnDefinition> columns)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSON_ROWS_FIELD
public static final String JSON_ROWS_FIELD
- See Also:
- Constant Field Values
JSON_TOTAL_LENGTH_FIELD
public static final String JSON_TOTAL_LENGTH_FIELD
- See Also:
- Constant Field Values
JSON_OFFSET_FIELD
public static final String JSON_OFFSET_FIELD
- See Also:
- Constant Field Values
logger
protected org.slf4j.Logger logger
dataSourceFactoryId
protected String dataSourceFactoryId
tableName
protected String tableName
tableDefinition
protected org.gcube.portlets.user.tdw.shared.model.TableDefinition tableDefinition
tableSize
protected int tableSize
autogeneratePrimaryColumn
protected org.gcube.portlets.user.tdw.shared.model.ColumnDefinition autogeneratePrimaryColumn
jsonBuilder
protected org.gcube.portlets.user.tdw.server.datasource.util.TableJSonBuilder jsonBuilder
service
protected org.gcube.data.analysis.tabulardata.service.TabularDataService service
serviceTableId
protected org.gcube.data.analysis.tabulardata.model.table.TableId serviceTableId
serviceTable
protected org.gcube.data.analysis.tabulardata.model.table.Table serviceTable
TDDataSource
public TDDataSource(String dataSourceFactoryId,
org.gcube.application.framework.core.session.ASLSession aslSession,
String tableName)
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Parameters:
dataSourceFactoryId - tableName -
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
createTDDataSource
public static TDDataSource createTDDataSource(String dataSourceFactoryId,
org.gcube.application.framework.core.session.ASLSession aslSession,
String tableName)
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Parameters:
dataSourceFactoryId - tableName -
- Returns:
-
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
getDataSourceFactoryId
public String getDataSourceFactoryId()
- Specified by:
getDataSourceFactoryId in interface org.gcube.portlets.user.tdw.server.datasource.DataSource
getTableDefinition
public org.gcube.portlets.user.tdw.shared.model.TableDefinition getTableDefinition()
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Specified by:
getTableDefinition in interface org.gcube.portlets.user.tdw.server.datasource.DataSource
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
extractTableDefinition
protected org.gcube.portlets.user.tdw.shared.model.TableDefinition extractTableDefinition()
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Returns:
-
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
getColumnDefinitions
protected List<org.gcube.portlets.user.tdw.shared.model.ColumnDefinition> getColumnDefinitions()
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
getColumnDefinition
protected org.gcube.portlets.user.tdw.shared.model.ColumnDefinition getColumnDefinition(org.gcube.data.analysis.tabulardata.model.column.Column serviceColumn,
int ordinalPosition)
createPrimaryKeyColumn
protected org.gcube.portlets.user.tdw.shared.model.ColumnDefinition createPrimaryKeyColumn(List<org.gcube.portlets.user.tdw.shared.model.ColumnDefinition> columns)
getDataAsJSon
public String getDataAsJSon(int start,
int limit,
String sortingColumn,
org.gcube.portlets.user.tdw.server.datasource.Direction direction)
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Specified by:
getDataAsJSon in interface org.gcube.portlets.user.tdw.server.datasource.DataSource
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
sort
protected ArrayList<org.gcube.portlets.user.tdw.shared.model.ColumnDefinition> sort(Collection<org.gcube.portlets.user.tdw.shared.model.ColumnDefinition> columns)
getJSon
protected String getJSon(int start,
org.gcube.data.analysis.tabulardata.query.parameters.QueryOrder queryOrder)
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
getBuilder
protected org.gcube.portlets.user.tdw.server.datasource.util.TableJSonBuilder getBuilder()
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
getTableSize
protected int getTableSize()
throws org.gcube.portlets.user.tdw.server.datasource.DataSourceException
- Throws:
org.gcube.portlets.user.tdw.server.datasource.DataSourceException
close
public void close()
Copyright © 2014. All Rights Reserved.