Package it.geosolutions.geoserver.rest.decoder.about

Examples of it.geosolutions.geoserver.rest.decoder.about.GSVersionDecoder$GSAboutResource


        coverageEncoder.setProjectionPolicy(ProjectionPolicy.REPROJECT_TO_DECLARED);
        coverageEncoder.setSRS("EPSG:4326");
        coverageEncoder.setSUGGESTED_TILE_SIZE("256,256");
        coverageEncoder.setUSE_JAI_IMAGEREAD(true);

        GSVersionDecoder v=reader.getGeoserverVersion();
        if (v.compareTo(GSVersionDecoder.VERSION.v24)>=0){
            GSCoverageDimensionEncoder gsCoverageDimensionEncoder = new GSCoverageDimensionEncoder(
                    "GRAY_INDEX", "GridSampleDimension[-Infinity,Infinity]", "-inf", "inf",
                    "dobson unitsĀ³", "REAL_32BITS");
            coverageEncoder.addCoverageDimensionInfo(gsCoverageDimensionEncoder);           
        }
View Full Code Here


     */
    public GSVersionDecoder getGeoserverVersion() {
        final String url = "/rest/about/version.xml";
        String xml = load(url);
        if (xml == null) {
            GSVersionDecoder v = new GSVersionDecoder();
            v.getGeoServer().setVersion(GSVersionDecoder.VERSION.UNRECOGNIZED.toString());
            return v;
        } else {
            return GSVersionDecoder.build(load(url));
        }
    }
View Full Code Here

            + "<Git-Revision>32db076555e57cc5f826b0361d1af4efe6d3f01b</Git-Revision><Version>2.2-ENTERPRISE-SNAPSHOT</Version></resource></about>";

    @Test
    public void testVersionDecoder() {
       
        GSVersionDecoder dec=new GSVersionDecoder(version);
        Assert.assertEquals(GSVersionDecoder.VERSION.v22, dec.getVersion());
        Assert.assertEquals("GeoServer", dec.getGeoServer().getName());
       
        GSVersionDecoder.GSAboutResource geoserver=dec.getGeoServer();
        geoserver.setVersion("2.3-SNAPSHOT");
        geoserver.setName("_CustomGeoServerName_");
        Assert.assertEquals(GSVersionDecoder.VERSION.v23, dec.getVersion());
        Assert.assertEquals("_CustomGeoServerName_", dec.getGeoServer().getName());
       
        dec=new GSVersionDecoder(null);
        Assert.assertEquals(GSVersionDecoder.VERSION.UNRECOGNIZED, dec.getVersion());
        Assert.assertEquals(null, dec.getGeoServer().getName());
       
        //print(dec.getRoot());
    }
View Full Code Here

   
    @Test
    public void testIntegrationVersionDecoder() {
        if (!enabled())
            return;
        GSVersionDecoder geoserver = reader.getGeoserverVersion();
        if (GSVersionDecoder.VERSION.v22.equals(GSVersionDecoder.VERSION.getVersion(GS_VERSION))) {
            Assert.assertEquals(geoserver.getVersion(), GSVersionDecoder.VERSION.v22);
        } else if (GSVersionDecoder.VERSION.UNRECOGNIZED.equals(GSVersionDecoder.VERSION
                .getVersion(GS_VERSION))) {
            Assert.assertEquals(geoserver.getVersion(), GSVersionDecoder.VERSION.UNRECOGNIZED);
        }
        // print(dec.getRoot());
    }
View Full Code Here

            } else if (existgs == false){
                System.out.println("Failing tests  : geoserver not found");
                fail("GeoServer not found");
            }
           
            GSVersionDecoder v=reader.getGeoserverVersion();
            if (v.compareTo(VERSION.getVersion(GS_VERSION))!=0){
                System.out.println("Failing tests  : geoserver version does not match.\nAccepted versions: "+VERSION.print());
                fail("GeoServer version ("+v.getVersion()+") does not match the desired one ("+GS_VERSION+")");
            }
        } else {
            System.out.println("Skipping tests ");
            LOGGER.warn("Tests are disabled. Please read the documentation to enable them.");
        }
View Full Code Here

TOP

Related Classes of it.geosolutions.geoserver.rest.decoder.about.GSVersionDecoder$GSAboutResource

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.