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

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

本文整理了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

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

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

  1. @Override
  2. public Service serviceDispatched(Request request, Service service) throws ServiceException {
  3. Service wfs3 =
  4. this.wfs3.getOrCompute(() -> (Service) GeoServerExtensions.bean("wfsService-3.0"));
  5. Service fallback =
  6. this.fallback.getOrCompute(
  7. () -> (Service) GeoServerExtensions.bean("wfsService-2.0"));
  8. if (wfs3.equals(service) && "GetCapabilities".equals(request.getRequest())) {
  9. request.setServiceDescriptor(fallback);
  10. return fallback;
  11. }
  12. return service;
  13. }

相关文章