gpt4 book ai didi

org.geoserver.wfs.WFSGetFeatureOutputFormat.getOutputFormats()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 18:21:05 25 4
gpt4 key购买 nike

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

WFSGetFeatureOutputFormat.getOutputFormats介绍

暂无

代码示例

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

/**
 * Subclasses can delegate to this method if they want the full list of valid output format
 * element names to be returned in the WFS 1.0 capabilities
 */
protected List<String> getAllCapabilitiesElementNames() {
  List<String> result = new ArrayList<String>();
  for (String name : getOutputFormats()) {
    if (XML_ELEMENT.matcher(name).matches()) {
      result.add(name);
    }
  }
  // have the output order be independent of the used JDK
  Collections.sort(result);
  return result;
}

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

@Override
  protected List<String> getOutputFormats() {
    List<WFSGetFeatureOutputFormat> formats =
        GeoServerExtensions.extensions(WFSGetFeatureOutputFormat.class);
    List<String> result = new ArrayList<>();
    for (WFSGetFeatureOutputFormat format : formats) {
      result.addAll(format.getOutputFormats());
    }
    return result;
  }
}

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

protected String[] getAvailableOutputFormatNames(String first) {
  List<String> oflist = new ArrayList<String>();
  Collection featureProducers =
      GeoServerExtensions.extensions(WFSGetFeatureOutputFormat.class);
  for (Iterator i = featureProducers.iterator(); i.hasNext(); ) {
    WFSGetFeatureOutputFormat format = (WFSGetFeatureOutputFormat) i.next();
    for (Iterator f = format.getOutputFormats().iterator(); f.hasNext(); ) {
      oflist.add(f.next().toString());
    }
  }
  Collections.sort(oflist);
  if (oflist.contains(first)) {
    oflist.remove(first);
    oflist.add(0, first);
  }
  return (String[]) oflist.toArray(new String[oflist.size()]);
}

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

private List<String> getAvailableWFSFormats() {
  List<String> formats = new ArrayList<String>();
  final GeoServerApplication application = getGeoServerApplication();
  for (WFSGetFeatureOutputFormat producer :
      application.getBeansOfType(WFSGetFeatureOutputFormat.class)) {
    for (String format : producer.getOutputFormats()) {
      formats.add(format);
    }
  }
  prepareFormatList(formats, new FormatComparator("format.wfs."));
  return formats;
}

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

@Test
public void testOutputFormats() throws Exception {
  Document doc = getAsDOM("wfs?service=WFS&request=getCapabilities&version=2.0.0");
  // print(doc);
  // let's look for the outputFormat parameter values inside of the GetFeature operation
  // metadata
  XpathEngine engine = XMLUnit.newXpathEngine();
  NodeList formats =
      engine.getMatchingNodes(
          "//ows:Operation[@name=\"GetFeature\"]/ows:Parameter[@name=\"outputFormat\"]/ows:AllowedValues/ows:Value",
          doc);
  Set<String> s1 = new TreeSet<String>();
  for (int i = 0; i < formats.getLength(); i++) {
    String format = formats.item(i).getFirstChild().getNodeValue();
    s1.add(format);
  }
  List<WFSGetFeatureOutputFormat> extensions =
      GeoServerExtensions.extensions(WFSGetFeatureOutputFormat.class);
  Set<String> s2 = new TreeSet<String>();
  for (Iterator e = extensions.iterator(); e.hasNext(); ) {
    WFSGetFeatureOutputFormat extension = (WFSGetFeatureOutputFormat) e.next();
    s2.addAll(extension.getOutputFormats());
  }
  assertEquals(s1, s2);
}

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

@Test
public void testOutputFormats() throws Exception {
  Document doc = getAsDOM("wfs?service=WFS&request=getCapabilities&version=1.1.0");
  // print(doc);
  // let's look for the outputFormat parameter values inside of the GetFeature operation
  // metadata
  XpathEngine engine = XMLUnit.newXpathEngine();
  NodeList formats =
      engine.getMatchingNodes(
          "//ows:Operation[@name=\"GetFeature\"]/ows:Parameter[@name=\"outputFormat\"]/ows:Value",
          doc);
  Set<String> s1 = new TreeSet<String>();
  for (int i = 0; i < formats.getLength(); i++) {
    String format = formats.item(i).getFirstChild().getNodeValue();
    s1.add(format);
  }
  List<WFSGetFeatureOutputFormat> extensions =
      GeoServerExtensions.extensions(WFSGetFeatureOutputFormat.class);
  Set<String> s2 = new TreeSet<String>();
  for (Iterator e = extensions.iterator(); e.hasNext(); ) {
    WFSGetFeatureOutputFormat extension = (WFSGetFeatureOutputFormat) e.next();
    s2.addAll(extension.getOutputFormats());
  }
  assertEquals(s1, s2);
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com