Package org.geoserver.catalog

Examples of org.geoserver.catalog.CatalogBuilder


            throw new RestletException( "layer group must not be empty", Status.CLIENT_ERROR_BAD_REQUEST );
        }
      
        if ( lg.getBounds() == null ) {
            LOGGER.fine( "Auto calculating layer group bounds");
            new CatalogBuilder( catalog ).calculateLayerGroupBounds(lg);
        }

        if (ws != null) {
            lg.setWorkspace(catalog.getWorkspaceByName(ws));
        }
View Full Code Here


                throw new RestletException( "Can't change the workspace of a layer group, instead " +
                    "DELETE from existing workspace and POST to new workspace", Status.CLIENT_ERROR_FORBIDDEN );
            }
        }

        new CatalogBuilder( catalog ).updateLayerGroup( original, lg );
        catalog.save( original );
    }
View Full Code Here

//            throw new RestletException( "Can't change name of a layer", Status.CLIENT_ERROR_FORBIDDEN );
//        }
        // force in the same resource otherwise the update will simply fail as we cannot reach the name
        layer.setResource(original.getResource());
       
        new CatalogBuilder( catalog ).updateLayer( original, layer );
        catalog.save( original );

        LOGGER.info( "PUT layer " + l);
    }
View Full Code Here

            }
        }
       
        GranuleSource source = reader.getGranules(nativeCoverageName, true);
        SimpleFeatureType schema = source.getSchema();
        List<AttributeTypeInfo> attributes = new CatalogBuilder(catalog).getAttributes(schema, null);
       
        return new IndexSchema(attributes);
    }
View Full Code Here

        eoProduct.setName("EO Sample");
        eoProduct.setMode(LayerGroupInfo.Mode.EO);
        eoProduct.setRootLayer(rootLayer);
        eoProduct.setRootLayerStyle(rootLayer.getDefaultStyle());
       
        CatalogBuilder catBuilder = new CatalogBuilder(getCatalog());
        catBuilder.calculateLayerGroupBounds(eoProduct);
       
        eoProduct.getLayers().add(rootLayer);
        getCatalog().add(eoProduct);
        try {
            Document dom = dom(get("wms?request=getCapabilities&version=1.1.1"), false);
View Full Code Here

       
        String caps = wms13BaseURL + "?service=WMS&request=GetCapabilities&version=1.3.0";
        TestHttpClientProvider.bind(wms13Client, caps);
       
        // setup the WMS layer
        CatalogBuilder cb = new CatalogBuilder(getCatalog());
        WMSStoreInfo store = cb.buildWMSStore("mock-wms-store-130");
        getCatalog().add(store);
        cb.setStore(store);
        store.setCapabilitiesURL(caps);
        WMSLayerInfo wmsLayer = cb.buildWMSLayer("world4326");
        getCatalog().add(wmsLayer);
        LayerInfo gsLayer = cb.buildLayer(wmsLayer);
        gsLayer.setName(WORLD4326_130);
        getCatalog().add(gsLayer);
    }
View Full Code Here

                // handles the case of layer removed, but feature type not
                catalog.remove(ft);
                ft = featureType;
                catalog.add(featureType);
            } else {
                new CatalogBuilder(catalog).updateFeatureType(ft, featureType);
                catalog.save(ft);
            }
        }

        if (layer == null || !layer.getResource().getNamespace().equals(catalog.getNamespaceByPrefix(prefix))) {
View Full Code Here

       
        String caps = wms11BaseURL + "?service=WMS&request=GetCapabilities&version=1.1.1";
        TestHttpClientProvider.bind(wms11Client, caps);
       
        // setup the WMS layer
        CatalogBuilder cb = new CatalogBuilder(getCatalog());
        WMSStoreInfo store = cb.buildWMSStore("mock-wms-store-110");
        getCatalog().add(store);
        cb.setStore(store);
        store.setCapabilitiesURL(caps);
        WMSLayerInfo wmsLayer = cb.buildWMSLayer("world4326");
        getCatalog().add(wmsLayer);
        LayerInfo gsLayer = cb.buildLayer(wmsLayer);
        gsLayer.setName(WORLD4326_110);
        getCatalog().add(gsLayer);
    }
View Full Code Here

            else {
                catalog.save(store);
            }
   
            //create the coverage
            CatalogBuilder builder = new CatalogBuilder(catalog);
            builder.setStore(store);
   
            final String coverageNames[] = reader.getGridCoverageNames();
            if (reader instanceof StructuredGridCoverage2DReader && coverageNames != null && coverageNames.length > 1) {
                for (String coverageName: coverageNames) {
                    addCoverage(store, builder, reader, catalog, format, coverageName, qName, props, coverageName);
View Full Code Here

        String caps = wms11BaseNfiURL + "?service=WMS&request=GetCapabilities&version=1.1.1";
        TestHttpClientProvider.bind(wms11ClientNfi, caps);
       
        // setup the WMS layer
        CatalogBuilder cb = new CatalogBuilder(getCatalog());
        WMSStoreInfo store = cb.buildWMSStore("mock-wms-store-110-nfi");
        getCatalog().add(store);
        cb.setStore(store);
        store.setCapabilitiesURL(caps);
        WMSLayerInfo wmsLayer = cb.buildWMSLayer("world4326");
        getCatalog().add(wmsLayer);
        LayerInfo gsLayer = cb.buildLayer(wmsLayer);
        gsLayer.setName(WORLD4326_110_NFI);
        getCatalog().add(gsLayer);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.CatalogBuilder

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.