Package org.geoserver.catalog

Examples of org.geoserver.catalog.LayerInfo.prefixedName()


                                        add(new Label("layer.name", new Model(text)));
                                    }
                                    @Override
                                    public void onClick(AjaxRequestTarget target) {
                                        PageParameters params = new PageParameters();
                                        params.put("layer", layer.prefixedName());
                                        WorkspaceInfo workspace= demo.getStyleInfo().getWorkspace();
                                        if (workspace == null) {
                                            params.put("style", demo.getStyleInfo().getName());
                                        } else {
                                            params.put("style", workspace.getName() + ":" + demo.getStyleInfo().getName());
View Full Code Here


            if (layer != null && layer.getType() == LayerInfo.Type.RASTER) {
                if(ret == null) {
                    ret = layer;
                } else {
                    LOGGER.warning("Multiple coverages found for NSName '" + encodedCoverageId + "': "
                            + ret.prefixedName() + " is selected, "
                            + layer.prefixedName() + " will be ignored");
                }
            }
        }
View Full Code Here

            NamespaceInfo nsInfo = catalog.getNamespaceByPrefix(namespace);
            if(nsInfo != null) {
                LOGGER.info(" - Namespace found " + namespace);
                LayerInfo layer = catalog.getLayerByName(fullName);
                if(layer != null) {
                    LOGGER.info(" - Collecting layer " + layer.prefixedName());
                    ret.add(layer);
                } else {
                    LOGGER.info(" - Ignoring layer " + fullName);
                }
            } else {
View Full Code Here

            }

            catalog.add(typeInfo);
            catalog.add(layerInfo);

            return layerInfo.prefixedName();
          } catch (Exception e) {
            throw new ProcessException(
                "Failed to complete the import inside the GeoServer catalog", e);
          }
        }
View Full Code Here

                    }

                    layerInfo.setEnabled(valid);
                    catalog.add(layerInfo);
                   
                    return layerInfo.prefixedName();
                }
                else {
                    catalog.save( cinfo );
                   
                    LayerInfo layerInfo = catalog.getLayerByName(cinfo.getName());
View Full Code Here

                    LayerInfo layerInfo = catalog.getLayerByName(cinfo.getName());
                    if ( styleName != null && targetStyle != null ) {
                      layerInfo.setDefaultStyle( targetStyle );
                    }
                   
                    return layerInfo.prefixedName();
                }
               
            } catch (MalformedURLException e) {
                throw new ProcessException( "URL Error", e );
            } catch (IOException e) {
View Full Code Here

    @Test
    public void testGlobalCapabilities() throws Exception {
        LayerInfo layer = layer(catalog, MockData.PRIMITIVEGEOFEATURE);
        Document doc = getAsDOM("/wms?service=WMS&request=getCapabilities&version=1.1.1", true);
        assertXpathExists("//Layer[Name='" + layer.prefixedName() + "']", doc);
    }
   
    @Test
    public void testGlobalDescribeLayer() throws Exception {
        LayerInfo layer = layer(catalog, MockData.PRIMITIVEGEOFEATURE);
View Full Code Here

    @Test
    public void testGlobalDescribeLayer() throws Exception {
        LayerInfo layer = layer(catalog, MockData.PRIMITIVEGEOFEATURE);
        Document doc = getAsDOM("/wms?service=WMS&request=describeLayer&version=1.1.1&LAYERS="
                + layer.getName(), true);
        assertXpathExists("//LayerDescription[@name='" + layer.prefixedName() + "']", doc);
    }

    @Test
    public void testWorkspaceCapabilities() throws Exception {
        Document doc = getAsDOM("/sf/wms?service=WMS&request=getCapabilities&version=1.1.1", true);
View Full Code Here

    @Test
    public void testGlobalCapabilities() throws Exception {
        LayerInfo layer = layer(catalog, MockData.PRIMITIVEGEOFEATURE);
        Document doc = getAsDOM("/wms?service=WMS&request=getCapabilities&version=1.3.0", true);
        assertXpathExists("//wms:Layer[wms:Name='" + layer.prefixedName() + "']", doc);
    }

    @Test
    public void testWorkspaceCapabilities() throws Exception {
        Document doc = getAsDOM("/sf/wms?service=WMS&request=getCapabilities&version=1.3.0", true);
View Full Code Here

        getCatalog().add(singleGroup);
          
        try {
            PreviewLayerProvider provider = new PreviewLayerProvider();
            assertNotNull(getPreviewLayer(provider, singleGroup.prefixedName()));
            assertNotNull(getPreviewLayer(provider, layer.prefixedName()));
        } finally {
            getCatalog().remove(singleGroup);
            getCatalog().remove(containerGroup);
        }       
    }   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.