Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@99052 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1eb3f07073
commit
8738594d06
|
@ -59,8 +59,12 @@ public class QueryService {
|
|||
|
||||
ArrayList<Occurrences> occurences = new ArrayList<Occurrences>();
|
||||
|
||||
TableId tableId = new TableId(new Long(column.getTrId()
|
||||
.getTableId()));
|
||||
TableId tableId;
|
||||
if (column.getTrId().isViewTable()) {
|
||||
tableId= new TableId(new Long(column.getTrId().getReferenceTargetTableId()));
|
||||
} else {
|
||||
tableId = new TableId(new Long(column.getTrId().getTableId()));
|
||||
}
|
||||
ColumnLocalId columnId = new ColumnLocalId(column.getColumnId());
|
||||
QuerySelect querySelect = null;
|
||||
QueryGroup queryGroup = null;
|
||||
|
@ -105,19 +109,21 @@ public class QueryService {
|
|||
|
||||
querySelect = new QuerySelect(Arrays.asList(
|
||||
new QueryColumn(columnId), new QueryColumn(
|
||||
sourceColumnId),new QueryColumn(columnId,
|
||||
Function.COUNT)));
|
||||
sourceColumnId), new QueryColumn(
|
||||
columnId, Function.COUNT)));
|
||||
logger.debug("Occurences querySelect:"
|
||||
+ querySelect.toString());
|
||||
queryGroup = new QueryGroup(Arrays.asList(columnId, sourceColumnId));
|
||||
queryGroup = new QueryGroup(Arrays.asList(columnId,
|
||||
sourceColumnId));
|
||||
logger.debug("Occurences queryGroup:"
|
||||
+ queryGroup.toString());
|
||||
} else {
|
||||
//ColumnLocalId idColumn = retrieveColumnLocalIdOFIdColumnType(
|
||||
// column.getTrId(), service);
|
||||
// ColumnLocalId idColumn =
|
||||
// retrieveColumnLocalIdOFIdColumnType(
|
||||
// column.getTrId(), service);
|
||||
querySelect = new QuerySelect(Arrays.asList(
|
||||
new QueryColumn(columnId),new QueryColumn(columnId,
|
||||
Function.COUNT)));
|
||||
new QueryColumn(columnId), new QueryColumn(
|
||||
columnId, Function.COUNT)));
|
||||
logger.debug("Occurences querySelect:"
|
||||
+ querySelect.toString());
|
||||
queryGroup = new QueryGroup(Arrays.asList(columnId));
|
||||
|
@ -357,11 +363,12 @@ public class QueryService {
|
|||
if (column.isViewColumn()) {
|
||||
occurence = new Occurrences(
|
||||
currentRow.getString(0),
|
||||
currentRow.getString(1), currentRow.getInt(2));
|
||||
currentRow.getString(1),
|
||||
currentRow.getInt(2));
|
||||
} else {
|
||||
occurence = new Occurrences(
|
||||
currentRow.getString(0),
|
||||
"1", currentRow.getInt(1));
|
||||
currentRow.getString(0), "1",
|
||||
currentRow.getInt(1));
|
||||
}
|
||||
break;
|
||||
case CastValidation:
|
||||
|
@ -478,14 +485,13 @@ public class QueryService {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public static String retrieveColumnDimensionValue(String rowId,
|
||||
ColumnData column, TabularDataService service)
|
||||
throws TDGWTServiceException {
|
||||
try {
|
||||
logger.debug("RetriveColumnDimensionValue: [rowId=" + rowId
|
||||
+ ", column=" + column + "]");
|
||||
|
||||
|
||||
column.getColumnViewData().getSourceTableDimensionColumnId();
|
||||
|
||||
TableId tableId = new TableId(new Long(column.getTrId()
|
||||
|
@ -542,7 +548,7 @@ public class QueryService {
|
|||
logger.debug("Reading rows from json");
|
||||
String colValue = null;
|
||||
String dimensionValue = null;
|
||||
if(i < totalRows) {
|
||||
if (i < totalRows) {
|
||||
currentRow = rows.getJSONArray(i);
|
||||
colValue = currentRow.getString(0);
|
||||
dimensionValue = currentRow.getString(1);
|
||||
|
|
Loading…
Reference in New Issue