Examples of buildLayer()


Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

                //TODO: set lat lon bounding box
                if ( add ) {
                    catalog.add( ftinfo );
                   
                    //add a layer for the feature type as well
                    catalog.add(builder.buildLayer(ftinfo));
                  
                }
                else {
                    catalog.save( ftinfo );
                }
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

            //add/save
            if ( add ) {
                catalog.add( cinfo );
               
                LayerInfo layerInfo = builder.buildLayer( cinfo );
                //JD: commenting this out, these sorts of edits should be handled
                // with a second PUT request on the created coverage
                /*
                String styleName = form.getFirstValue("style");
                if ( styleName != null ) {
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

                try {
                    builder.setStore(storeInfo);
                    FeatureTypeInfo featureType = builder.buildFeatureType(name);
                    builder.lookupSRS(featureType, true);
                    builder.setupBounds(featureType);
                    layer = builder.buildLayer(featureType);
                    layer.setDefaultStyle(styles.getStyle(featureType));
                    ImportStatus status = SUCCESS;
                   
                    if(cancelled)
                        return;
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

        try {
            CatalogBuilder builder = new CatalogBuilder(catalog);
            builder.setStore(store);
            if (store instanceof CoverageStoreInfo) {
                CoverageInfo ci = builder.buildCoverage();
                return builder.buildLayer(ci);
            } else if (store instanceof DataStoreInfo) {
                FeatureTypeInfo fti = builder.buildFeatureType(resource.getName());
                return builder.buildLayer(fti);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

            if (store instanceof CoverageStoreInfo) {
                CoverageInfo ci = builder.buildCoverage();
                return builder.buildLayer(ci);
            } else if (store instanceof DataStoreInfo) {
                FeatureTypeInfo fti = builder.buildFeatureType(resource.getName());
                return builder.buildLayer(fti);
            }
        } catch (Exception e) {
            throw new RuntimeException(
                    "Error occurred while building the resources for the configuration page",
                    e);
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

        // LINES is a feature type with a native SRS, so we want the bounds to be there
        Catalog cat = getCatalog();
        CatalogBuilder cb = new CatalogBuilder(cat);
        cb.setStore(cat.getDataStoreByName(MockData.GEOMETRYLESS.getPrefix()));
        FeatureTypeInfo fti = cb.buildFeatureType(toName(MockData.GEOMETRYLESS));
        LayerInfo layer = cb.buildLayer(fti);
        cb.setupBounds(fti);
       
        // perform basic checks
        assertNull(fti.getCRS());
        // ... not so sure about this one, null would seem more natural
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

            DataAccess data = dataStore.getDataStore(null);

            FeatureSource source = data.getFeatureSource(resourceName);
            builder.setupBounds(ft, source);

            return builder.buildLayer(ft);
        }
        else if (store instanceof CoverageStoreInfo) {
            CoverageStoreInfo covStore = (CoverageStoreInfo) store;
            builder.setStore(covStore);
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

            } catch (Exception e) {
                Throwables.propagateIfInstanceOf(e, IOException.class);
                Throwables.propagate(e);
            }

            return builder.buildLayer(cov);
        }
        else {
            throw new UnsupportedOperationException("Copy for non vector/raster layer currently unsupported");
        }
    }
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

            CatalogBuilder builder = new CatalogBuilder(getCatalog());
            builder.setStore(dsInfo);
            FeatureTypeInfo fti = builder.buildFeatureType(ds.getFeatureSource(vt.getName()));
            fti.getMetadata().put(FeatureTypeInfo.JDBC_VIRTUAL_TABLE, vt);
            LayerInfo layerInfo = builder.buildLayer(fti);
            setResponsePage(new ResourceConfigurationPage(layerInfo, true));
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Failed to create feature type", e);
            error(new ParamResourceModel("creationFailure", this, getFirstErrorMessage(e))
                    .getString());
View Full Code Here

Examples of org.geoserver.catalog.CatalogBuilder.buildLayer()

        try {
            CatalogBuilder builder = new CatalogBuilder(catalog);
            builder.setStore(store);
            if (store instanceof CoverageStoreInfo) {
                CoverageInfo ci = builder.buildCoverage();
                return builder.buildLayer(ci);
            } else if (store instanceof DataStoreInfo) {
                FeatureTypeInfo fti = builder.buildFeatureType(resource.getName());
                return builder.buildLayer(fti);
            } else if (store instanceof WMSStoreInfo) {
                WMSLayerInfo wli = builder.buildWMSLayer(resource.getLocalName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.