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

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

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

Request.getOutputFormat介绍

[英]The output format
[中]输出格式

代码示例

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

if ((req.getOutputFormat() != null)
    && (!outputFormats.isEmpty())
    && !outputFormats.contains(req.getOutputFormat())) {
    if (req.getOutputFormat().equalsIgnoreCase(outputFormat)) {
      continue O;
if (req.getOutputFormat() != null) {
  throw new ServiceException(
      "Failed to find response for output format " + req.getOutputFormat(),
      ServiceException.INVALID_PARAMETER_VALUE,
      "outputFormat");
  String msg = "No response: ( object = " + result.getClass();
  if (req.getOutputFormat() != null) {
    msg += (", outputFormat = " + req.getOutputFormat());

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

if (req.getOutputFormat() == null) {
  req.setOutputFormat(
      lookupRequestBeanProperty(requestBean, "outputFormat", true));

代码示例来源:origin: org.geoserver/xslt

@Override
public boolean canHandle(Operation operation) {
  // if we don't have formats configured, we cannot respond
  if(formats.isEmpty()) {
    System.out.println("Empty formats");
    return false;
  }
  
  if(!super.canHandle(operation)) {
    return false;
  }
  
  // check the format matches, the Dispatcher just does a case insensitive match,
  // but WFS is supposed to be case sensitive and so is the XSLT code
  Request request = Dispatcher.REQUEST.get();
  if(request != null && (request.getOutputFormat() == null || !formats.containsKey(request.getOutputFormat()))) {
    System.out.println("Formats are: " + formats);
    return false;
  } else {
    return true;
  }
}

代码示例来源:origin: org.geoserver.extension/control-flow

@Override
boolean matchesRequest(Request request) {
  if (!service.equalsIgnoreCase(request.getService()))
    return false;
  if (method == null)
    return true;
  else if (!method.equalsIgnoreCase(request.getRequest()))
    return false;
  if (outputFormat == null)
    return true;
  else if (!outputFormat.equalsIgnoreCase(request.getOutputFormat()))
    return false;
  return true;
}

相关文章