org.geoserver.wms.WMS.isQueryable()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(242)

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

WMS.isQueryable介绍

[英]Returns true if the layer can be queried
[中]如果可以查询图层,则返回true

代码示例

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

public boolean isQueryable(LayerGroupInfo layerGroup) {
  if (layerGroup.isQueryDisabled()) return false;
  boolean queryable = false;
  List<PublishedInfo> layers = getLayersForQueryableChecks(layerGroup);
  for (PublishedInfo published : layers) {
    if (published instanceof LayerInfo) {
      queryable |= isQueryable((LayerInfo) published);
    } else {
      queryable |= isQueryable((LayerGroupInfo) published);
    }
  }
  return queryable;
}

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

public boolean isQueryable(final GeoServerTileLayer geoServerTileLayer) {
  WMS wmsMediator = WMS.get();
  LayerInfo layerInfo = geoServerTileLayer.getLayerInfo();
  if (layerInfo != null) {
    return wmsMediator.isQueryable(layerInfo);
  }
  LayerGroupInfo lgi = geoServerTileLayer.getLayerGroupInfo();
  return wmsMediator.isQueryable(lgi);
}

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

/**
 * Determines if the {@link PublishedInfo} associated with a {@link GeoServerTileLayer} is
 * queryable via WMS
 *
 * @param geoServerTileLayer The tile layer to query
 * @return <code>true</code> if the layer is queryable
 */
public boolean isQueryable(final GeoServerTileLayer geoServerTileLayer) {
  WMS wmsMediator = WMS.get();
  LayerInfo layerInfo = geoServerTileLayer.getLayerInfo();
  if (layerInfo != null) {
    return wmsMediator.isQueryable(layerInfo);
  }
  LayerGroupInfo lgi = geoServerTileLayer.getLayerGroupInfo();
  return wmsMediator.isQueryable(lgi);
}

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

@Override
  protected boolean skipResource(Object theResource) {
    if (theResource instanceof LayerGroupInfo) {
      LayerGroupInfo groupInfo = (LayerGroupInfo) theResource;
      if (groupInfo.isQueryDisabled()) {
        return true;
      }
    } else if (theResource instanceof LayerInfo) {
      LayerInfo layerInfo = (LayerInfo) theResource;
      if (!wms.isQueryable(layerInfo)) {
        return true;
      }
    } else if (theResource instanceof MapLayerInfo) {
      LayerInfo layerInfo = ((MapLayerInfo) theResource).getLayerInfo();
      if (!wms.isQueryable(layerInfo)) {
        return true;
      }
    }
    return super.skipResource(theResource);
  }
}

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

@Override
  protected boolean skipResource(Object theResource) {
    if (theResource instanceof LayerGroupInfo) {
      LayerGroupInfo groupInfo = (LayerGroupInfo) theResource;
      if (groupInfo.isQueryDisabled()) {
        return true;
      }
    } else if (theResource instanceof LayerInfo) {
      LayerInfo layerInfo = (LayerInfo) theResource;
      if (!wms.isQueryable(layerInfo)) {
        return true;
      }
    } else if (theResource instanceof MapLayerInfo) {
      LayerInfo layerInfo = ((MapLayerInfo) theResource).getLayerInfo();
      if (!wms.isQueryable(layerInfo)) {
        return true;
      }
    }
    return super.skipResource(theResource);
  }
}

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

@Override
  public boolean isQueryable(LayerInfo layer) {
    if ("Forests".equals(layer.getName())) {
      return false;
    }
    return super.isQueryable(layer);
  }
};

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

boolean queryable = wmsConfig.isQueryable(layerGroup);
qatts.addAttribute("", "queryable", "queryable", "", queryable ? "1" : "0");

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

boolean queryable = wmsConfig.isQueryable(layerGroup);
qatts.addAttribute("", "queryable", "queryable", "", queryable ? "1" : "0");
start("Layer", qatts);

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

boolean queryable = wmsConfig.isQueryable(layer);
qatts.addAttribute("", "queryable", "queryable", "", queryable ? "1" : "0");
boolean opaque = wmsConfig.isOpaque(layer);

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

boolean queryable = wmsConfig.isQueryable(layer);
AttributesImpl qatts = attributes("queryable", queryable ? "1" : "0");
boolean opaque = wmsConfig.isOpaque(layer);

相关文章