Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@111867 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a516dff10c
commit
94c414838f
|
@ -36,7 +36,8 @@ public class OpExecution4GeospatialCreateCoordinates extends OpExecutionBuilder
|
|||
private ASLSession aslSession;
|
||||
|
||||
public OpExecution4GeospatialCreateCoordinates(
|
||||
ASLSession aslSession, TabularDataService service,
|
||||
ASLSession aslSession,
|
||||
TabularDataService service,
|
||||
GeospatialCreateCoordinatesSession geospatialCreateCoordinatesSession) {
|
||||
this.service = service;
|
||||
this.geospatialCreateCoordinatesSession = geospatialCreateCoordinatesSession;
|
||||
|
@ -51,7 +52,6 @@ public class OpExecution4GeospatialCreateCoordinates extends OpExecutionBuilder
|
|||
OperationDefinition operationDefinition;
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
|
||||
TRId trId = geospatialCreateCoordinatesSession.getTrId();
|
||||
logger.debug("trID: " + trId);
|
||||
if (trId == null) {
|
||||
|
@ -68,35 +68,44 @@ public class OpExecution4GeospatialCreateCoordinates extends OpExecutionBuilder
|
|||
}
|
||||
TableId tId = new TableId(tabId);
|
||||
|
||||
ColumnData latitudeColumn=geospatialCreateCoordinatesSession.getLatitude();
|
||||
ColumnData latitudeColumn = geospatialCreateCoordinatesSession
|
||||
.getLatitude();
|
||||
logger.debug("Latitude Column: " + latitudeColumn);
|
||||
if (latitudeColumn == null) {
|
||||
logger.error("Error Creating Geospatial Coordinates: Latitude Column is null");
|
||||
throw new TDGWTServiceException("No latitude column set");
|
||||
}
|
||||
ColumnLocalId latitudeId = new ColumnLocalId(latitudeColumn.getColumnId());
|
||||
ColumnReference latitudeColumnReference = new ColumnReference(tId, latitudeId);
|
||||
ColumnLocalId latitudeId = new ColumnLocalId(
|
||||
latitudeColumn.getColumnId());
|
||||
ColumnReference latitudeColumnReference = new ColumnReference(tId,
|
||||
latitudeId);
|
||||
|
||||
ColumnData longitudeColumn=geospatialCreateCoordinatesSession.getLatitude();
|
||||
ColumnData longitudeColumn = geospatialCreateCoordinatesSession
|
||||
.getLatitude();
|
||||
logger.debug("Longitude Column: " + longitudeColumn);
|
||||
if (longitudeColumn == null) {
|
||||
logger.error("Error Creating Geospatial Coordinates: Longitude Column is null");
|
||||
throw new TDGWTServiceException("No longitude column set");
|
||||
}
|
||||
ColumnLocalId longitudeId = new ColumnLocalId(longitudeColumn.getColumnId());
|
||||
ColumnReference longitudeColumnReference = new ColumnReference(tId, longitudeId);
|
||||
ColumnLocalId longitudeId = new ColumnLocalId(
|
||||
longitudeColumn.getColumnId());
|
||||
ColumnReference longitudeColumnReference = new ColumnReference(tId,
|
||||
longitudeId);
|
||||
|
||||
operationDefinition = OperationDefinitionMap.map(
|
||||
OperationsId.CoordinatesEnhancement.toString(), service);
|
||||
map.put(Constants.PARAMETER_GEOSPATIAL_CREATE_COORDINATES_LATITUDE, latitudeColumnReference);
|
||||
map.put(Constants.PARAMETER_GEOSPATIAL_CREATE_COORDINATES_LONGITUDE, longitudeColumnReference);
|
||||
map.put(Constants.PARAMETER_GEOSPATIAL_CREATE_COORDINATES_FEATURE, geospatialCreateCoordinatesSession.getType().getId());
|
||||
map.put(Constants.PARAMETER_GEOSPATIAL_CREATE_COORDINATES_USER, aslSession.getUsername());
|
||||
OperationsId.EnhanceLatLong.toString(), service);
|
||||
map.put(Constants.PARAMETER_GEOSPATIAL_CREATE_COORDINATES_LATITUDE,
|
||||
latitudeColumnReference);
|
||||
map.put(Constants.PARAMETER_GEOSPATIAL_CREATE_COORDINATES_LONGITUDE,
|
||||
longitudeColumnReference);
|
||||
map.put(Constants.PARAMETER_GEOSPATIAL_CREATE_COORDINATES_FEATURE,
|
||||
geospatialCreateCoordinatesSession.getType().getId());
|
||||
map.put(Constants.PARAMETER_GEOSPATIAL_CREATE_COORDINATES_USER,
|
||||
aslSession.getUsername());
|
||||
|
||||
invocation = new OperationExecution(
|
||||
operationDefinition.getOperationId(), map);
|
||||
|
||||
|
||||
operationExecutionSpec.setOp(invocation);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue