gpt4 book ai didi

org.geoserver.catalog.WMTSStoreInfo.getCapabilitiesURL()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 12:07:05 28 4
gpt4 key购买 nike

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

WMTSStoreInfo.getCapabilitiesURL介绍

暂无

代码示例

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

public String getCapabilitiesURL() {
  return delegate.getCapabilitiesURL();
}

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

if (wmts == null) {
  HTTPClient client = getHTTPClient(expandedStore);
  String capabilitiesURL = expandedStore.getCapabilitiesURL();
  URL serverURL = new URL(capabilitiesURL);
  wmts = new WebMapTileServer(serverURL, client, null);

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

/**
 * @param source
 * @param target
 */
private void setConnectionParameters(final WMTSStoreInfo source, WMTSStoreInfo target) {
  target.setCapabilitiesURL(source.getCapabilitiesURL());
  target.setUsername(source.getUsername());
  target.setPassword(source.getPassword());
  target.setUseConnectionPooling(source.isUseConnectionPooling());
  target.setMaxConnections(source.getMaxConnections());
  target.setConnectTimeout(source.getConnectTimeout());
  target.setReadTimeout(source.getReadTimeout());
}

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

@Test
public void testModifyWMTSStore() throws Exception {
  testAddWMTSStore();
  WMTSStoreInfo wmts = catalog.getStoreByName("acme", "demowmts", WMTSStoreInfo.class);
  assertNull(wmts.getCapabilitiesURL());
  String capsURL =
      "http://demo.opengeo.org:8080/geoserver/gwc?request=GetCapabilites&service=WMTS";
  wmts.setCapabilitiesURL(capsURL);
  catalog.save(wmts);
  File f =
      new File(testData.getDataDirectoryRoot(), "workspaces/acme/demowmts/wmtsstore.xml");
  Document dom = dom(f);
  assertXpathEvaluatesTo(capsURL, "/wmtsStore/capabilitiesURL/text()", dom);
}

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

public WMTSStoreInfo clone(final WMTSStoreInfo source, boolean allowEnvParametrization) {
  WMTSStoreInfo target;
  try {
    target = (WMTSStoreInfo) SerializationUtils.clone(source);
    if (target instanceof StoreInfoImpl && target.getCatalog() == null) {
      ((StoreInfoImpl) target).setCatalog(catalog);
    }
  } catch (Exception e) {
    target = catalog.getFactory().createWebMapTileServer();
    target.setDescription(source.getDescription());
    target.setEnabled(source.isEnabled());
    target.setName(source.getName());
    target.setType(source.getType());
    target.setWorkspace(source.getWorkspace());
  }
  setConnectionParameters(source, target);
  if (allowEnvParametrization) {
    // Resolve GeoServer Environment placeholders
    final GeoServerEnvironment gsEnvironment =
        GeoServerExtensions.bean(GeoServerEnvironment.class);
    if (gsEnvironment != null && GeoServerEnvironment.ALLOW_ENV_PARAMETRIZATION) {
      target.setCapabilitiesURL(
          (String) gsEnvironment.resolveValue(source.getCapabilitiesURL()));
      target.setUsername((String) gsEnvironment.resolveValue(source.getUsername()));
      target.setPassword((String) gsEnvironment.resolveValue(source.getPassword()));
    }
  }
  return target;
}

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

@SuppressWarnings({"rawtypes", "unchecked"})
  @Override
  protected void wrapInternal(Map properties, SimpleHash model, WMTSLayerInfo object) {
    try {
      properties.put("boundingBox", object.boundingBox());
      properties.put("capabilitiesURL", object.getStore().getCapabilitiesURL());
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
};

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

LOGGER.log(Level.INFO, "Adding the store for " + info.getCapabilitiesURL(), e);
throw new IllegalArgumentException(
    "The WMTS store could not be saved. Failure message: " + e.getMessage());
LOGGER.log(
    Level.INFO,
    "Getting list of layers for the WMTS store " + info.getCapabilitiesURL(),
    e);

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

@Test
public void testPostAsJSON() throws Exception {
  removeStore("sf", "newWMTSStore");
  String json =
      "{'wmtsStore':{"
          + "'capabilitiesURL': 'http://somehost/wmts?',"
          + "'workspace':'sf',"
          + "'name':'newWMTSStore',"
          + "}"
          + "}";
  MockHttpServletResponse response =
      postAsServletResponse(
          RestBaseController.ROOT_PATH + "/workspaces/sf/wmtsstores",
          json,
          "text/json");
  assertEquals(201, response.getStatus());
  assertNotNull(response.getHeader("Location"));
  assertTrue(
      response.getHeader("Location").endsWith("/workspaces/sf/wmtsstores/newWMTSStore"));
  WMTSStoreInfo newStore = catalog.getStoreByName("newWMTSStore", WMTSStoreInfo.class);
  assertNotNull(newStore);
  assertEquals("http://somehost/wmts?", newStore.getCapabilitiesURL());
}

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

@Test
public void testPostAsXMLNoWorkspace() throws Exception {
  String xml =
      "<wmtsStore>"
          + "<name>newWMTSStore</name>"
          + "<capabilitiesURL>http://somehost/wmts?</capabilitiesURL>"
          + "</wmtsStore>";
  MockHttpServletResponse response =
      postAsServletResponse(
          RestBaseController.ROOT_PATH + "/workspaces/sf/wmtsstores",
          xml,
          "text/xml");
  assertThat(response, hasStatus(HttpStatus.CREATED));
  assertThat(
      response,
      hasHeader("Location", endsWith("/workspaces/sf/wmtsstores/newWMTSStore")));
  WMTSStoreInfo newStore = catalog.getStoreByName("newWMTSStore", WMTSStoreInfo.class);
  assertNotNull(newStore);
  assertEquals("http://somehost/wmts?", newStore.getCapabilitiesURL());
}

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

@Test
public void testPostAsXML() throws Exception {
  String xml =
      "<wmtsStore>"
          + "<name>newWMTSStore</name>"
          + "<capabilitiesURL>http://somehost/wmts?</capabilitiesURL>"
          + "<workspace>sf</workspace>"
          + "</wmtsStore>";
  MockHttpServletResponse response =
      postAsServletResponse(
          RestBaseController.ROOT_PATH + "/workspaces/sf/wmtsstores",
          xml,
          "text/xml");
  assertThat(response, hasStatus(HttpStatus.CREATED));
  assertThat(
      response,
      hasHeader("Location", endsWith("/workspaces/sf/wmtsstores/newWMTSStore")));
  WMTSStoreInfo newStore = catalog.getStoreByName("newWMTSStore", WMTSStoreInfo.class);
  assertNotNull(newStore);
  assertEquals("http://somehost/wmts?", newStore.getCapabilitiesURL());
}

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