本文整理了Java中org.geoserver.config.GeoServer.getServices()
方法的一些代码示例,展示了GeoServer.getServices()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeoServer.getServices()
方法的具体详情如下:
包路径:org.geoserver.config.GeoServer
类名称:GeoServer
方法名:getServices
[英]GeoServer services in the local workspace, or global services if there's no local workspace.
[中]本地工作区中的GeoServer服务,或者如果没有本地工作区,则为全局服务。
代码示例来源:origin: geoserver/geoserver
private List<String> servicesList() {
return geoServer
.getServices()
.stream()
.map(si -> si.getName())
.collect(Collectors.toList());
}
代码示例来源:origin: geoserver/geoserver
@Test
public void testLoadGibberish() throws Exception {
// we should get a log message, but the startup should continue
File service =
new File(getDataDirectory().getResourceLoader().getBaseDirectory(), "service.xml");
FileUtils.writeStringToFile(service, "duDaDa");
getGeoServer().reload();
assertEquals(0, geoServer.getServices().size());
}
代码示例来源:origin: org.geoserver.community/gs-wfs3
private boolean isWMSAvailable(GeoServer geoServer) {
ServiceInfo si =
geoServer
.getServices()
.stream()
.filter(s -> "WMS".equals(s.getName()))
.findFirst()
.orElse(null);
return si != null;
}
代码示例来源:origin: org.geoserver.web/web-core
/**
*
* @see org.geoserver.web.CapabilitiesHomePageLinkProvider#getCapabilitiesComponent
*/
public Component getCapabilitiesComponent(final String id) {
List<CapsInfo> serviceInfoLinks = new ArrayList<CapabilitiesHomePagePanel.CapsInfo>();
GeoServerApplication app = GeoServerApplication.get();
for (ServiceInfo si : app.getGeoServer().getServices()) {
for (Version v : si.getVersions()) {
String serviceId = si.getId();
String capsLink = "../ows?service=" + serviceId + "&version=" + v.toString()
+ "&request=GetCapabilities";
CapsInfo ci = new CapsInfo(serviceId, v, capsLink);
serviceInfoLinks.add(ci);
}
}
return new CapabilitiesHomePagePanel(id, serviceInfoLinks);
}
}
代码示例来源:origin: org.geoserver.community/gs-jms-geoserver
/**
* Get all services info objects of a GeoServer instance, including the global service and
* workspace services.
*/
private static List<ServiceInfo> getAllServices(GeoServer geoServer) {
List<ServiceInfo> allServices = new ArrayList<>();
// get global services
allServices.addAll(geoServer.getServices());
// get services per workspace
List<WorkspaceInfo> workspaces = geoServer.getCatalog().getWorkspaces();
for (WorkspaceInfo workspace : workspaces) {
// get the services of this workspace
allServices.addAll(geoServer.getFacade().getServices(workspace));
}
return allServices;
}
代码示例来源:origin: org.geoserver.community/gs-jms-geoserver
@After
public void clean() {
// remove test workspace
getCatalog().remove(getCatalog().getWorkspace("jms-test-workspace"));
// remove any created service
Collection<? extends ServiceInfo> services = getGeoServer().getServices();
for (ServiceInfo service : services) {
ServiceInfo finalService = ModificationProxy.unwrap(service);
if (finalService instanceof JmsTestServiceInfoImpl) {
getGeoServer().remove(finalService);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!