org.geoserver.ows.Request.setServiceDescriptor()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(188)

本文整理了Java中org.geoserver.ows.Request.setServiceDescriptor方法的一些代码示例,展示了Request.setServiceDescriptor的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setServiceDescriptor方法的具体详情如下:
包路径:org.geoserver.ows.Request
类名称:Request
方法名:setServiceDescriptor

Request.setServiceDescriptor介绍

[英]Allows callbacks to override the service descriptor (id, name and version).
[中]允许回调重写服务描述符(id、名称和版本)。

代码示例

代码示例来源:origin: geoserver/geoserver

req.setServiceDescriptor(serviceDescriptor);
return fireServiceDispatchedCallback(req, serviceDescriptor);

代码示例来源:origin: org.geoserver.community/gs-wfs3

@Override
public Service serviceDispatched(Request request, Service service) throws ServiceException {
  Service wfs3 =
      this.wfs3.getOrCompute(() -> (Service) GeoServerExtensions.bean("wfsService-3.0"));
  Service fallback =
      this.fallback.getOrCompute(
          () -> (Service) GeoServerExtensions.bean("wfsService-2.0"));
  if (wfs3.equals(service) && "GetCapabilities".equals(request.getRequest())) {
    request.setServiceDescriptor(fallback);
    return fallback;
  }
  return service;
}

相关文章