本文整理了Java中org.geoserver.ows.Request.getContext
方法的一些代码示例,展示了Request.getContext
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getContext
方法的具体详情如下:
包路径:org.geoserver.ows.Request
类名称:Request
方法名:getContext
[英]The context of the url path of the request.
The context is anything before the part that matches an ows service. For instance in:
/foo/bar/wfs?...
The context would be "/foo/bar".
[中]请求的url路径的上下文。
上下文是匹配ows服务的部分之前的任何内容。例如:
/foo/bar/wfs?...
上下文应该是“/foo/bar”。
代码示例来源:origin: geoserver/geoserver
/**
* Returns true if the layer should be hidden, false otherwise
*
* <ol>
* <li>has a request
* <li>is a GetCapabilities request
* <li>is not for a layer-specific virtual service
* </ol>
*/
boolean checkCapabilitiesRequest(ResourceInfo resource) {
Request request = Dispatcher.REQUEST.get();
if (request != null) {
if ("GetCapabilities".equalsIgnoreCase(request.getRequest())) {
String resourceContext =
resource.getNamespace().getPrefix() + "/" + resource.getName();
return !resourceContext.equalsIgnoreCase(request.getContext());
}
}
return false;
}
代码示例来源:origin: geoserver/geoserver
if (req.getContext() != null) {
serviceDescriptor =
findService(req.getContext(), req.getVersion(), req.getNamespace());
if (serviceDescriptor != null) {
req.setRequest(req.getService());
req.setService(req.getContext());
req.setContext(null);
代码示例来源:origin: org.geoserver/gwc
@Override
public Request init(Request request) {
String context = request.getContext();
if (context == null || !context.startsWith("gwc/service")) {
return null;
}
Map<String, String> kvp = new HashMap<String, String>();
kvp.put("service", "gwc");
kvp.put("version", "1.0.0");
kvp.put("request", "dispatch");
request.setKvp(kvp);
request.setRawKvp(kvp);
return request;
}
代码示例来源:origin: org.geoserver/gs-wfs
@Override
protected void qualifyRequest(
WorkspaceInfo workspace, PublishedInfo layer, Service service, Request request) {
if (request.getContext() != null) {
代码示例来源:origin: org.geoserver/gs-gwc
@Override
public Request init(Request request) {
String context = request.getContext();
if (context == null || !isGwcServiceTargeted(context)) {
return null;
内容来源于网络,如有侵权,请联系作者删除!