Package org.geoserver.catalog

Examples of org.geoserver.catalog.SLDHandler


    @Before
    public void setUpAppContext() {
        WebApplicationContext appContext = mock(WebApplicationContext.class);
        when(appContext.getBeanNamesForType(StyleHandler.class)).thenReturn(new String[]{"ysldHandler","sldHandler"});
        when(appContext.getBean("ysldHandler")).thenReturn(new YsldHandler());
        when(appContext.getBean("sldHandler")).thenReturn(new SLDHandler());

        new GeoServerExtensions().setApplicationContext(appContext);
    }
View Full Code Here


    @Before
    public void setUpAppContext() {
        WebApplicationContext appContext = mock(WebApplicationContext.class);
        when(appContext.getBeanNamesForType(StyleHandler.class)).thenReturn(new String[]{"ysldHandler","sldHandler"});
        when(appContext.getBean("ysldHandler")).thenReturn(new YsldHandler());
        when(appContext.getBean("sldHandler")).thenReturn(new SLDHandler());

        new GeoServerExtensions().setApplicationContext(appContext);
    }
View Full Code Here

            public String getObject() {
                try {
                    // if file already in css format transform to sld, otherwise load the SLD file
                    if (CssHandler.FORMAT.equals(style.getFormat())) {
                        StyledLayerDescriptor sld = Styles.sld(style.getStyle());
                        return Styles.string(sld, new SLDHandler(), SLDHandler.VERSION_10, true);
                    } else {
                        File file = findStyleFile(style);
                        if (file != null && file.isFile()) {
                            BufferedReader reader = null;
                            try {
View Full Code Here

        assertEquals( 200, response.getStatusCode() );
       
        Style s = catalog.getStyleByName( "Ponds" ).getStyle();
        ByteArrayOutputStream out = new ByteArrayOutputStream();

        new StyleFormat(SLDHandler.MIMETYPE_10, SLDHandler.VERSION_10, false, new SLDHandler(), null).write(s, out);
       
        xml = new String(out.toByteArray());
        assertTrue(xml.contains("<sld:Name>foo</sld:Name>"));
    }
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.SLDHandler

Copyright © 2018 www.massapicom. 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.