Package org.geoserver.catalog

Examples of org.geoserver.catalog.StyleInfo.accept()


        buildings.getStyles().add(style);
        catalog.save(buildings);
        buildings = catalog.getLayerByName(getLayerId(MockData.BUILDINGS));
        assertTrue(buildings.getStyles().contains(style));
       
        style.accept(visitor);
       
        // test style reset
        assertEquals(style.getId(), visitor.getObjects(StyleInfo.class, ModificationType.DELETE).get(0).getId());
        String lakesId = catalog.getLayerByName(layerName).getId();
        assertEquals(lakesId, visitor.getObjects(LayerInfo.class, ModificationType.STYLE_RESET).get(0).getId());
View Full Code Here


        buildings.getStyles().add(style);
        catalog.save(buildings);
        buildings = catalog.getLayerByName(getLayerId(MockData.BUILDINGS));
        assertTrue(buildings.getStyles().contains(style));
       
        style.accept(visitor);
       
        // test style reset
        assertNull(catalog.getStyleByName(styleName));
        assertEquals(StyleInfo.DEFAULT_POLYGON, catalog.getLayerByName(layerName).getDefaultStyle().getName());
       
View Full Code Here

            @Override
            public void visit(LayerInfo layer) {
                StyleInfo style = layer.getDefaultStyle();
                if( style != null ){
                    try {
                        style.accept(this);
                    }
                    catch( Throwable t ){
                        LOG.log(Level.FINE,String.format("Trouble checking layer %s for icon use:%s", layer.getName(),t));
                    }
                }
View Full Code Here

                    style = s.getStyle();
                } catch (IOException e) {
                    LOG.log(Level.FINE,"Unable to access style "+s.getName()+":"+e,e);
                }       
                if( style != null ){
                    style.accept(new StyleAdaptor() {
                        public Object visit(OnLineResource resource, Object data) {
                            try {
                                URI uri = resource.getLinkage();
                                if (uri != null) {
                                    String path = uri.toString();
View Full Code Here

        buildings.getStyles().add(style);
        catalog.save(buildings);
        buildings = catalog.getLayerByName(getLayerId(MockData.BUILDINGS));
        assertTrue(buildings.getStyles().contains(style));
       
        style.accept(visitor);
       
        // test style reset
        assertEquals(style.getId(), visitor.getObjects(StyleInfo.class, ModificationType.DELETE).get(0).getId());
        String lakesId = catalog.getLayerByName(layerName).getId();
        assertEquals(lakesId, visitor.getObjects(LayerInfo.class, ModificationType.STYLE_RESET).get(0).getId());
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.