org.geoserver.config.GeoServer.getService()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(127)

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

GeoServer.getService介绍

[英]GeoServer services filtered by class. In the local workspace, or global services if there's no local workspace.
[中]按类筛选的GeoServer服务。在本地工作区中,如果没有本地工作区,则在全局服务中。

代码示例

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

if (workspace != null) {
  ws = catalog.getWorkspaceByName(workspace);
  old = geoServer.getService(ws, serviceClass);
} else {
  old = geoServer.getService(serviceClass);
  geoServer.save(old);
} else {

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

private void setupESRIFormatByDefault(GeoServer geoServer, Boolean value) throws IOException {
  WFSInfo wfsInfo = geoServer.getService(WFSInfo.class);
  MetadataMap metadata = wfsInfo.getMetadata();
  metadata.put(ShapeZipOutputFormat.SHAPE_ZIP_DEFAULT_PRJ_IS_ESRI, value);
  geoServer.save(wfsInfo);
}

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

protected void setOutputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxOutputMemory(kbytes);
  gs.save(info);
}

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

protected void setInputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxInputMemory(kbytes);
  gs.save(info);
}

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

private void setOutputLimit(int kbytes) {
    GeoServer gs = getGeoServer();
    WCSInfo info = gs.getService(WCSInfo.class);
    info.setMaxOutputMemory(kbytes);
    gs.save(info);
  }
}

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

protected void setInputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxInputMemory(kbytes);
  gs.save(info);
}

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

protected void setInputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxInputMemory(kbytes);
  gs.save(info);
}

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

protected void setOutputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxOutputMemory(kbytes);
  gs.save(info);
}

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

protected void setOutputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxOutputMemory(kbytes);
  gs.save(info);
}

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

private void setOutputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxOutputMemory(kbytes);
  gs.save(info);
}

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

private void setInputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxInputMemory(kbytes);
  gs.save(info);
}

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

private void setInputLimit(int kbytes) {
  GeoServer gs = getGeoServer();
  WCSInfo info = gs.getService(WCSInfo.class);
  info.setMaxInputMemory(kbytes);
  gs.save(info);
}

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

@Override
protected void onSetUp(SystemTestData testData) throws Exception {
  super.onSetUp(testData);
  GeoServer geoServer = getGeoServer();
  WFSInfo service = geoServer.getService(WFSInfo.class);
  service.getSRS().add("4326");
  service.getSRS().add("3395");
  geoServer.save(service);
}

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

public void setTimeout(int timeout) {
  GeoServer gs = getGeoServer();
  WFSInfo wfs = gs.getService(WFSInfo.class);
  wfs.getMetadata().put(TimeoutCallback.TIMEOUT_CONFIG_KEY, timeout);
  gs.save(wfs);
}

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

@Before
public void cleanupLimitedSRS() {
  WCSInfo service = getGeoServer().getService(WCSInfo.class);
  service.getSRS().clear();
  getGeoServer().save(service);
}

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

/**
 * Helper method that just sets the GML 3.2 MIME type to force. If NULL is provided then GML
 * MIME type overriding will be deactivated. This changes will be applied to WFS global
 * configuration.
 */
protected void setGmlMimeTypeOverride(String mimeTypeToForce) {
  WFSInfo info = getGeoServer().getService(WFSInfo.class);
  GMLInfo gmlInfo = info.getGML().get(WFSInfo.Version.V_20);
  gmlInfo.setMimeTypeToForce(mimeTypeToForce);
  getGeoServer().save(info);
}

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

@Test
public void testDisabledServiceResponse() throws Exception {
  Logging.getLogger("org.geoserver.ows").setLevel(Level.OFF);
  WMSInfo wms = getGeoServer().getService(WMSInfo.class);
  wms.setEnabled(false);
  getGeoServer().save(wms);
  Document doc = getAsDOM("wms?service=WMS&version=1.1.1&request=getCapabilities");
  assertEquals("ows:ExceptionReport", doc.getDocumentElement().getNodeName());
}

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

@Test
  public void testEnabledServiceResponse() throws Exception {
    WCSInfo wcs = getGeoServer().getService(WCSInfo.class);
    wcs.setEnabled(true);
    getGeoServer().save(wcs);

    Document doc = getAsDOM("wcs?service=WCS&request=getCapabilities");
    assertEquals("wcs:Capabilities", doc.getDocumentElement().getNodeName());
  }
}

代码示例来源:origin: org.geoserver.extension/wps-core

@Override
protected void oneTimeSetUp() throws Exception {
  super.oneTimeSetUp();
  WPSInfo wps = getGeoServer().getService(WPSInfo.class);
  // want at least two asynchronous processes to test concurrency
  wps.setMaxAsynchronousProcesses(Math.max(2, wps.getMaxAsynchronousProcesses()));
  getGeoServer().save(wps);
}

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

@Test
  public void testEnabledServiceResponse() throws Exception {
    WMSInfo wms = getGeoServer().getService(WMSInfo.class);
    wms.setEnabled(true);
    getGeoServer().save(wms);

    Document doc = getAsDOM("wms?service=WMS&version=1.1.1&request=getCapabilities");
    assertEquals("WMT_MS_Capabilities", doc.getDocumentElement().getNodeName());
  }
}

相关文章