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) {
WebMapTileServer webMapTileServer = expandedStore.getWebMapTileServer(null); WMTSCapabilities capabilities = webMapTileServer.getCapabilities(); List<WMTSLayer> layers = capabilities.getLayerList(); for (Layer l : layers) { if (l.getName() == null) {