Package it.geosolutions.geoserver.rest.encoder

Examples of it.geosolutions.geoserver.rest.encoder.GSLayerEncoder


      RESTLayer layer = reader.getLayer(layerName);
      LOGGER.info("Layer style is " + layer.getDefaultStyle());
      assertEquals(styleName, layer.getDefaultStyle());
    }

    GSLayerEncoder le = new GSLayerEncoder();
    le.setDefaultStyle(styleName2);
    publisher.configureLayer(DEFAULT_WS, layerName, le);

    {
      RESTLayer layer = reader.getLayer(layerName);
      LOGGER.info("Layer style is " + layer.getDefaultStyle());
View Full Code Here


      assertFalse(e1.getLocalizedMessage(),Boolean.FALSE);
      e1.printStackTrace();
    }

       
        GSLayerEncoder layerEncoder=new GSLayerEncoder();
       
        layerEncoder.setDefaultStyle(styleName);
        LOGGER.info(layerEncoder.toString());
        // creation test
        RESTCoverageStore coverageStore =null;
        try {
          final File mosaicFile = new ClassPathResource("testdata/time_geotiff/").getFile();
         
View Full Code Here

        fte.setNativeName(layername);
        fte.setTitle(layername+"_TITLE");
        fte.setNativeCRS("EPSG:4326");
        fte.setDescription("desc");
        fte.setEnabled(true);
        GSLayerEncoder layerEncoder = new GSLayerEncoder();
        layerEncoder.setEnabled(true);
        layerEncoder.setQueryable(true);
        layerEncoder.setDefaultStyle("polygon");

        boolean published = publisher.publishDBLayer(DEFAULT_WS, storeName, fte, layerEncoder);

        assertTrue("*** Test layer " + layername
                + " has not been published. Problem in datastore configuration", published);
View Full Code Here

        // metadataLink
        GSMetadataLinkInfoEncoder metadatalink = new GSMetadataLinkInfoEncoder("text/xml",
                "ISO19115:2003", "http://www.organization.org/metadata1");
        fte.addMetadataLinkInfo(metadatalink);

        GSLayerEncoder layerEncoder = null;
        if (VERSION.getVersion(GS_VERSION).compareTo(VERSION.UNRECOGNIZED) > 0) {
            layerEncoder = new GSLayerEncoder();
        } else if (VERSION.getVersion(GS_VERSION).compareTo(VERSION.UNRECOGNIZED) == 0) {
            layerEncoder = new GSLayerEncoder21();
        }
        layerEncoder.setEnabled(true);
        layerEncoder.setQueryable(true);
        layerEncoder.setAdvertised(true);

        layerEncoder.setDefaultStyle("point");
        layerEncoder.addStyle("point2");
        layerEncoder.addStyle("point3");

        // authorityURL
        GSAuthorityURLInfoEncoder authorityURL = new GSAuthorityURLInfoEncoder("authority1",
                "http://www.authority1.org");
        layerEncoder.addAuthorityURL(authorityURL);

        // identifier
        GSIdentifierInfoEncoder identifier1 = new GSIdentifierInfoEncoder("authority1",
                "identifier1");
        GSIdentifierInfoEncoder identifier2 = new GSIdentifierInfoEncoder("authority1",
                "another_identifier");
        layerEncoder.addIdentifier(identifier1);
        layerEncoder.addIdentifier(identifier2);


        // optionally select the attributes to publish
        RESTLayer layer = reader.getLayer(DEFAULT_WS, layerName);
        RESTFeatureType resource = reader.getFeatureType(layer);
View Full Code Here

        fte.setMetadataVirtualTable(vte); // Set the virtual table

        // Layer encoder
        // -------------
        GSLayerEncoder layerEncoder = new GSLayerEncoder();
        layerEncoder.setEnabled(true);
        layerEncoder.setQueryable(true);
        layerEncoder.setDefaultStyle("polygon");
       
        // test insert
        // ------------
        publisher.createWorkspace(DEFAULT_WS);
        published = publisher.publishDBLayer(DEFAULT_WS, storeName, fte, layerEncoder);
View Full Code Here

        fte.setProjectionPolicy(ProjectionPolicy.REPROJECT_TO_DECLARED);
        fte.addKeyword("KEYWORD");
        fte.setTitle(layername);
        fte.setName(layername);
        fte.setSRS(srs); // srs=null?"EPSG:4326":srs);
        final GSLayerEncoder layerEncoder = new GSLayerEncoder();
        layerEncoder.setDefaultStyle(defaultStyle);
        return publishDBLayer(workspace, storename, fte, layerEncoder);
    }
View Full Code Here

            LOGGER.error("Unable to create a coverage store for coverage: " + shapefile);
            return false;
        }

        // config layer props (style, ...)
        final GSLayerEncoder layerEncoder = new GSLayerEncoder();
        if (defaultStyle != null && !defaultStyle.isEmpty())
            layerEncoder.setDefaultStyle(defaultStyle);

        return configureLayer(workspace, datasetName, layerEncoder);
    }
View Full Code Here

            LOGGER.error("Unable to create a coverage store for coverage: " + geotiff);
            return false;
        }

        // config layer props (style, ...)
        final GSLayerEncoder layerEncoder = new GSLayerEncoder();
        layerEncoder.setDefaultStyle(defaultStyle);

        return configureLayer(workspace, coverageName, layerEncoder);
    }
View Full Code Here

        coverageEncoder.setTitle(coverageName);
        coverageEncoder.setSRS(srs);
        coverageEncoder.setProjectionPolicy(policy);

        // config layer props (style, ...)
        final GSLayerEncoder layerEncoder = new GSLayerEncoder();
        layerEncoder.setDefaultStyle(defaultStyle);

        return publishExternalGeoTIFF(workspace, storeName, geotiff, coverageEncoder, layerEncoder) != null ? true
                : false;
    }
View Full Code Here

        final GSCoverageEncoder coverageEncoder = new GSCoverageEncoder();
        coverageEncoder.setSRS(srs);
        final String name = FilenameUtils.getBaseName(mosaicDir.getName());
        coverageEncoder.setName(name);

        final GSLayerEncoder layerEncoder = new GSLayerEncoder();
        layerEncoder.setDefaultStyle(defaultStyle);

        return publishExternalMosaic(workspace, storeName, mosaicDir, coverageEncoder, layerEncoder);
    }
View Full Code Here

TOP

Related Classes of it.geosolutions.geoserver.rest.encoder.GSLayerEncoder

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.