public OperationResult call() throws OXFException { try { return adapter.doOperation(operation, parameterContainer); } catch (ExceptionReport e) { throw new OXFException(e); } }
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(operation.getName()).append(" to ").append(adapter.getServiceType()); return sb.toString(); }
/** * @throws OXFException * @throws ExceptionReport * */ protected void initializeDownloadAndUnmarshalFeatureCollection() throws ExceptionReport, OXFException { LOGGER.info("Initializing feature collection: building operation... downloading data... unmarshalling features..."); String resourceOpName = getLayer().getResourceOperationName(); Operation resourceOperation = getLayer().getServiceDescriptor().getOperationsMetadata().getOperationByName(resourceOpName); // --- download data: OperationResult dataToUnmarshal = getLayer().getServiceAdapter().doOperation(resourceOperation, getLayer().getParameterContainer()); // --- unmarshal features: if(dataToUnmarshal != null){ OXFFeatureCollection featureCollection = getLayer().getFeatureStore().unmarshalFeatures(dataToUnmarshal); getLayer().setFeatureCollection(featureCollection); } } }
public void run() { try { Operation resourceOperation = getLayer().getServiceDescriptor().getOperationsMetadata().getOperationByName(getLayer().getResourceOperationName()); // --- download data: OperationResult opResult = getLayer().getServiceAdapter().doOperation(resourceOperation, getLayer().getParameterContainer()); // --- inform any listeners that the result was received eventSupport.fireEvent(EventName.OPERATION_RESULT_RECEIVED, opResult); // --- render data: IRasterDataRenderer renderer = getLayer().getRenderer(); IVisualization vis = renderer.renderLayer(opResult); if (vis != null) { getLayer().setLayerVisualization(vis); eventSupport.fireEvent(EventName.LAYER_VISUALIZATION_READY, vis); } else { throw new OXFException("LayerImage of the layer '" + getLayer().getIDName() + "' could not be rendered successfully."); } // this line reached --> no exception occured and the layer is not broken getLayer().setBroken(false); } catch (Throwable t) { getLayer().setBroken(true); throw new OXFRuntimeException(t); } } }