public class TDXDataSource extends Object implements org.gcube.portlets.user.tdwx.server.datasource.DataSourceX
| Modifier and Type | Field and Description |
|---|---|
protected org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition |
autogeneratePrimaryColumn |
protected String |
dataSourceFactoryId |
static String |
JSON_OFFSET_FIELD |
static String |
JSON_ROWS_FIELD |
static String |
JSON_TOTAL_LENGTH_FIELD |
protected org.gcube.portlets.user.tdwx.server.datasource.util.TableJSonBuilder |
jsonBuilder |
protected org.slf4j.Logger |
logger |
protected org.gcube.data.analysis.tabulardata.service.TabularDataService |
service |
protected org.gcube.data.analysis.tabulardata.model.table.Table |
serviceTable |
protected org.gcube.data.analysis.tabulardata.model.table.TableId |
serviceTableId |
protected org.gcube.portlets.user.tdwx.shared.model.TableDefinition |
tableDefinition |
protected String |
tableName |
protected int |
tableSize |
| Constructor and Description |
|---|
TDXDataSource(String dataSourceFactoryId,
org.gcube.application.framework.core.session.ASLSession aslSession,
String tableName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected String |
createJson(int start,
String serviceJson,
ArrayList<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> lcolumns) |
protected org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition |
createPrimaryKeyColumn(List<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> columns) |
static TDXDataSource |
createTDDataSource(String dataSourceFactoryId,
org.gcube.application.framework.core.session.ASLSession aslSession,
String tableName) |
protected org.gcube.portlets.user.tdwx.shared.model.TableDefinition |
extractTableDefinition() |
protected org.gcube.portlets.user.tdwx.server.datasource.util.TableJSonBuilder |
getBuilder() |
protected org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition |
getColumnDefinition(org.gcube.data.analysis.tabulardata.model.column.Column serviceColumn,
int ordinalPosition) |
protected List<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> |
getColumnDefinitions() |
String |
getDataAsJSon(int start,
int limit,
String sortingColumn,
org.gcube.portlets.user.tdwx.server.datasource.Direction direction,
ArrayList<org.gcube.portlets.user.tdwx.shared.FilterInformation> filters) |
String |
getDataSourceFactoryId() |
protected String |
getJSon(int start,
org.gcube.data.analysis.tabulardata.query.parameters.QueryOrder queryOrder,
org.gcube.data.analysis.tabulardata.query.parameters.QueryFilter queryFilter) |
org.gcube.portlets.user.tdwx.shared.model.TableDefinition |
getTableDefinition() |
protected int |
getTableSize() |
protected void |
retrieveTableSize(int start,
int limit,
org.gcube.data.analysis.tabulardata.query.parameters.QueryFilter queryFilter) |
protected ArrayList<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> |
sort(Collection<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> columns) |
public static final String JSON_ROWS_FIELD
public static final String JSON_TOTAL_LENGTH_FIELD
public static final String JSON_OFFSET_FIELD
protected org.slf4j.Logger logger
protected String dataSourceFactoryId
protected String tableName
protected org.gcube.portlets.user.tdwx.shared.model.TableDefinition tableDefinition
protected int tableSize
protected org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition autogeneratePrimaryColumn
protected org.gcube.portlets.user.tdwx.server.datasource.util.TableJSonBuilder jsonBuilder
protected org.gcube.data.analysis.tabulardata.service.TabularDataService service
protected org.gcube.data.analysis.tabulardata.model.table.TableId serviceTableId
protected org.gcube.data.analysis.tabulardata.model.table.Table serviceTable
public TDXDataSource(String dataSourceFactoryId, org.gcube.application.framework.core.session.ASLSession aslSession, String tableName) throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
dataSourceFactoryId - tableName - org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionpublic static TDXDataSource createTDDataSource(String dataSourceFactoryId, org.gcube.application.framework.core.session.ASLSession aslSession, String tableName) throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
dataSourceFactoryId - tableName - org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionpublic String getDataSourceFactoryId()
getDataSourceFactoryId in interface org.gcube.portlets.user.tdwx.server.datasource.DataSourceXpublic org.gcube.portlets.user.tdwx.shared.model.TableDefinition getTableDefinition()
throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
getTableDefinition in interface org.gcube.portlets.user.tdwx.server.datasource.DataSourceXorg.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionprotected org.gcube.portlets.user.tdwx.shared.model.TableDefinition extractTableDefinition()
throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionprotected List<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> getColumnDefinitions() throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionprotected org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition getColumnDefinition(org.gcube.data.analysis.tabulardata.model.column.Column serviceColumn,
int ordinalPosition)
throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionprotected org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition createPrimaryKeyColumn(List<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> columns)
protected void retrieveTableSize(int start,
int limit,
org.gcube.data.analysis.tabulardata.query.parameters.QueryFilter queryFilter)
throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionpublic String getDataAsJSon(int start, int limit, String sortingColumn, org.gcube.portlets.user.tdwx.server.datasource.Direction direction, ArrayList<org.gcube.portlets.user.tdwx.shared.FilterInformation> filters) throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
getDataAsJSon in interface org.gcube.portlets.user.tdwx.server.datasource.DataSourceXorg.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionprotected ArrayList<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> sort(Collection<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> columns)
protected String getJSon(int start, org.gcube.data.analysis.tabulardata.query.parameters.QueryOrder queryOrder, org.gcube.data.analysis.tabulardata.query.parameters.QueryFilter queryFilter) throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionprotected String createJson(int start, String serviceJson, ArrayList<org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition> lcolumns) throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionprotected org.gcube.portlets.user.tdwx.server.datasource.util.TableJSonBuilder getBuilder()
throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionprotected int getTableSize()
throws org.gcube.portlets.user.tdwx.server.datasource.DataSourceXException
org.gcube.portlets.user.tdwx.server.datasource.DataSourceXExceptionpublic void close()
Copyright © 2014. All Rights Reserved.