本文整理了Java中org.geoserver.ows.Request.getOperation
方法的一些代码示例,展示了Request.getOperation
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getOperation
方法的具体详情如下:
包路径:org.geoserver.ows.Request
类名称:Request
方法名:getOperation
[英]The Operation used to call the service code. Available only after dispatching is done, it provides access to the current service object, and the parsed request
[中]用于调用服务代码的操作。只有在分派完成后才可用,它提供对当前服务对象和解析请求的访问
代码示例来源:origin: geoserver/geoserver
@Override
public Object operationExecuted(
Request request, Operation operation, Object result) {
Operation op = Dispatcher.REQUEST.get().getOperation();
assertNotNull(op);
assertTrue(op.getService().getService() instanceof HelloWorld);
assertTrue(op.getParameters()[0] instanceof Message);
return result;
}
});
代码示例来源:origin: org.geoserver.community/gs-dyndimension
private GetMapRequest getGetMap(Request request) {
Operation op = request.getOperation();
Object parsedRequest = op.getParameters()[0];
GetMapRequest getMap;
if (parsedRequest instanceof GetMapRequest) {
getMap = (GetMapRequest) parsedRequest;
} else if (parsedRequest instanceof GetFeatureInfoRequest) {
getMap = ((GetFeatureInfoRequest) parsedRequest).getGetMapRequest();
} else {
throw new IllegalArgumentException(
"Could not get a GetMapRequest out of the parsed request, the parsed request object was:_"
+ parsedRequest);
}
return getMap;
}
代码示例来源:origin: org.geoserver.extension/gs-wps-core
/**
* Returns the url to fetch a output resource using the GetExecutionResult call
*
* @param executionId - optional, if you don't have it the resource manager will use its thread
* local version
* @param name
* @param baseUrl - optional, if you don't have it the resource manager will pick one from
* Dispatcher.REQUEST
* @param mimeType
*/
public String getOutputResourceUrl(
String executionId, String name, String baseUrl, String mimeType) {
// create the link
Map<String, String> kvp = new LinkedHashMap<String, String>();
kvp.put("service", "WPS");
kvp.put("version", "1.0.0");
kvp.put("request", "GetExecutionResult");
kvp.put("executionId", getExecutionId(executionId));
kvp.put("outputId", name);
kvp.put("mimetype", mimeType);
if (baseUrl == null) {
Operation op = Dispatcher.REQUEST.get().getOperation();
ExecuteType execute = (ExecuteType) op.getParameters()[0];
baseUrl = execute.getBaseUrl();
}
String url = ResponseUtils.buildURL(baseUrl, "ows", kvp, URLType.SERVICE);
return url;
}
内容来源于网络,如有侵权,请联系作者删除!