Search in sources :

Example 1 with RESTCoverage

use of it.geosolutions.geoserver.rest.decoder.RESTCoverage in project geo-platform by geosdi.

the class GeoserverConnectorCoverageStoresTest method e_splitDimensions.

@Test
public void e_splitDimensions() throws Exception {
    GPGeoserverCoverageInfo gpGeoserverCoverageInfo = this.geoserverConnectorStore.loadCoverageInfoWithUrl().withUrl("http://150.145.141.180/geoserver/rest/workspaces/nurc/coveragestores/mosaic/coverages/mosaic.json").getResponse();
    logger.info("################{}\n", gpGeoserverCoverageInfo.getDimensions().getCoverageDimension());
    logger.info("##############{}\n", StreamSupport.stream(gpGeoserverCoverageInfo.getDimensions().getCoverageDimension().spliterator(), Boolean.FALSE).collect(Collectors.toList()));
    RESTLayer restLayer = this.restReader.getLayer("nurc", "mosaic");
    RESTCoverage coverage = this.restReader.getCoverage(restLayer);
    StreamSupport.stream(coverage.getEncodedDimensionsInfoList().spliterator(), Boolean.FALSE).forEach(c -> System.out.println(c.getName()));
}
Also used : GPGeoserverCoverageInfo(org.geosdi.geoplatform.connector.geoserver.model.workspace.coverages.GPGeoserverCoverageInfo) RESTLayer(it.geosolutions.geoserver.rest.decoder.RESTLayer) RESTCoverage(it.geosolutions.geoserver.rest.decoder.RESTCoverage) GeoserverConnectorTest(org.geosdi.geoplatform.geoserver.GeoserverConnectorTest) Test(org.junit.Test)

Example 2 with RESTCoverage

use of it.geosolutions.geoserver.rest.decoder.RESTCoverage in project geo-platform by geosdi.

the class GeoserverConnectorCoverageStoresTest method c_exsistCoverage.

@Test
public void c_exsistCoverage() throws Exception {
    RESTCoverage restCoverage = this.restReader.getCoverage("nurc", "mosaic", "mosaic");
    logger.info("###################{}\n", restCoverage.getTitle());
    Boolean exsist = this.geoserverConnectorStore.loadWorkspaceStoreCoverageRequest().withCoverage("mosaic").withWorkspace("nurc").withStore("mosaic").exist();
    logger.info("###################{}\n", exsist);
}
Also used : RESTCoverage(it.geosolutions.geoserver.rest.decoder.RESTCoverage) GeoserverConnectorTest(org.geosdi.geoplatform.geoserver.GeoserverConnectorTest) Test(org.junit.Test)

Example 3 with RESTCoverage

use of it.geosolutions.geoserver.rest.decoder.RESTCoverage in project geo-platform by geosdi.

the class GeoserverConnectorLayersTest method g_readLayerWithUrl.

@Test
public void g_readLayerWithUrl() throws Exception {
    GeoserverLayer geoserverLayer = this.geoserverConnectorStore.loadWorkspaceLayerRequest().withQuietOnNotFound(FALSE).withLayerName("poi").withWorkspaceName("tiger").getResponse();
    logger.info("#################LAYER: {}\n", geoserverLayer);
    GeoserverLoadFeatureTypeWithUrlRequest geoserverLoadFeatureTypeWithUrlRequest = this.geoserverConnectorStore.loadFeatureTypeWithUrl().withUrl(geoserverLayer.getLayerResource().getHref());
    GPGeoserverFeatureTypeInfo gpGeoserverFeatureTypeInfo = geoserverLoadFeatureTypeWithUrlRequest.getResponse();
    logger.info("####################FEATURES: {}\n", gpGeoserverFeatureTypeInfo);
    geoserverLayer = this.geoserverConnectorStore.loadWorkspaceLayerRequest().withQuietOnNotFound(FALSE).withLayerName("sfdem").withWorkspaceName("sf").getResponse();
    logger.info("#################LAYER: {}\n", geoserverLayer);
    GPGeoserverCoverageInfo coverageInfo = this.geoserverConnectorStore.loadCoverageInfoWithUrl().withUrl(geoserverLayer.getLayerResource().getHref()).getResponse();
    logger.info("########################COVERAGES : {}\n", coverageInfo);
    logger.info("########################DIMENSIONS : {}\n", coverageInfo.getDimensions().getCoverageDimension());
    RESTLayer restLayer = this.restReader.getLayer("sf", "sfdem");
    RESTCoverage restCoverage = this.restReader.getCoverage(restLayer);
    logger.info("############{}\n", restCoverage.getEncodedDimensionsInfoList());
}
Also used : GeoserverLayer(org.geosdi.geoplatform.connector.geoserver.model.layers.GeoserverLayer) GeoserverLoadFeatureTypeWithUrlRequest(org.geosdi.geoplatform.connector.geoserver.request.featuretypes.GeoserverLoadFeatureTypeWithUrlRequest) IGPGeoserverFeatureTypeInfo(org.geosdi.geoplatform.connector.geoserver.model.featuretypes.IGPGeoserverFeatureTypeInfo) GPGeoserverFeatureTypeInfo(org.geosdi.geoplatform.connector.geoserver.model.featuretypes.GPGeoserverFeatureTypeInfo) GPGeoserverCoverageInfo(org.geosdi.geoplatform.connector.geoserver.model.workspace.coverages.GPGeoserverCoverageInfo) RESTLayer(it.geosolutions.geoserver.rest.decoder.RESTLayer) RESTCoverage(it.geosolutions.geoserver.rest.decoder.RESTCoverage) GeoserverConnectorTest(org.geosdi.geoplatform.geoserver.GeoserverConnectorTest) Test(org.junit.Test)

Aggregations

RESTCoverage (it.geosolutions.geoserver.rest.decoder.RESTCoverage)3 GeoserverConnectorTest (org.geosdi.geoplatform.geoserver.GeoserverConnectorTest)3 Test (org.junit.Test)3 RESTLayer (it.geosolutions.geoserver.rest.decoder.RESTLayer)2 GPGeoserverCoverageInfo (org.geosdi.geoplatform.connector.geoserver.model.workspace.coverages.GPGeoserverCoverageInfo)2 GPGeoserverFeatureTypeInfo (org.geosdi.geoplatform.connector.geoserver.model.featuretypes.GPGeoserverFeatureTypeInfo)1 IGPGeoserverFeatureTypeInfo (org.geosdi.geoplatform.connector.geoserver.model.featuretypes.IGPGeoserverFeatureTypeInfo)1 GeoserverLayer (org.geosdi.geoplatform.connector.geoserver.model.layers.GeoserverLayer)1 GeoserverLoadFeatureTypeWithUrlRequest (org.geosdi.geoplatform.connector.geoserver.request.featuretypes.GeoserverLoadFeatureTypeWithUrlRequest)1