@Override public WebMapTileServer getWebMapTileServer(ProgressListener listener) throws IOException { return delegate.getWebMapTileServer(listener); }
/** * Locates and returns a WTMS {@link Layer} based on the configuration stored in WMTSLayerInfo * * @param info * @throws IOException */ public Layer getWMTSLayer(WMTSLayerInfo info) throws IOException { String name = info.getName(); if (info.getNativeName() != null) { name = info.getNativeName(); } WMTSCapabilities caps = null; caps = info.getStore().getWebMapTileServer(null).getCapabilities(); for (Layer layer : caps.getLayerList()) { if (name.equals(layer.getName())) { return layer; } } throw new IOException( "Could not find layer " + info.getName() + " in the server capabilitiles document"); }
List<String> getAvailableLayersInternal( String workspaceName, String storeName, boolean quietOnNotFound) { NamespaceInfo ns = getNamespaceInternal(workspaceName); Collection<WMTSStoreInfo> stores = getStoresInternal(ns, storeName, quietOnNotFound); return stores.stream() .flatMap( store -> { WebMapTileServer ds; try { ds = store.getWebMapTileServer(null); } catch (IOException e) { throw new RestException( "Could not load wmts store: " + storeName, HttpStatus.INTERNAL_SERVER_ERROR, e); } final List<WMTSLayer> layerList = ds.getCapabilities().getLayerList(); return layerList .stream() .map(Layer::getName) .filter(Objects::nonNull) .filter(name -> !name.isEmpty()) .filter(name -> !layerConfigured(store, name)); }) .collect(Collectors.toList()); }
builder.setStore(store); List<WMTSLayer> layers = wmtsInfo.getWebMapTileServer(null).getCapabilities().getLayerList(); for (Layer l : layers) { if (l.getName() == null) {
if (store instanceof WMTSStoreInfo) { try { WebMapTileServer wmts = ((WMTSStoreInfo) store).getWebMapTileServer(null); createWMTSLayerImportContainer.setVisible(wmts != null); } catch (IOException e) {
WebMapTileServer wmts = wmtsLayer.getStore().getWebMapTileServer(null); Layer gt2Layer = wmtsLayer.getWMTSLayer(null);
WebMapTileServer webMapTileServer = expandedStore.getWebMapTileServer(null); WMTSCapabilities capabilities = webMapTileServer.getCapabilities(); List<WMTSLayer> layers = capabilities.getLayerList();