Package org.geoserver.catalog

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


        vt.addParameter(new VirtualTableParameter("bool", "true"));
        vt.addParameter(new VirtualTableParameter("name", "name-f001"));
        vt.addGeometryMetadatata("pointProperty", Point.class, 4326);
        jds.addVirtualTable(vt);

        FeatureTypeInfo vft = cb.buildFeatureType(jds.getFeatureSource(vt.getName()));
        vft.getMetadata().put(FeatureTypeInfo.JDBC_VIRTUAL_TABLE, vt);
        cat.add(vft);
    }

    /**
 
View Full Code Here


                monitor.setTask("Processing " + typeName);

                // warning - this will log a scary exception if SRS cannot be found
                try {
                    FeatureTypeInfo featureType =
                            cb.buildFeatureType(dataStore.getFeatureSource(typeName));
                    featureType.setStore(null);
                    featureType.setNamespace(null);
   
                    SimpleFeatureSource featureSource = dataStore.getFeatureSource(typeName);
                    cb.setupBounds(featureType, featureSource);
View Full Code Here

        CatalogBuilder cb = new CatalogBuilder(cat);
        cb.setStore(ds);
       
        FeatureStore fs = (FeatureStore) store.getFeatureSource("Fifteen");
        fs.addFeatures(fs1.getFeatures());
        FeatureTypeInfo ft = cb.buildFeatureType(fs);
        cat.add(ft);
       
        fs = (FeatureStore) store.getFeatureSource("Seven");
        fs.addFeatures(fs2.getFeatures());
        ft = cb.buildFeatureType(fs);
View Full Code Here

        FeatureTypeInfo ft = cb.buildFeatureType(fs);
        cat.add(ft);
       
        fs = (FeatureStore) store.getFeatureSource("Seven");
        fs.addFeatures(fs2.getFeatures());
        ft = cb.buildFeatureType(fs);
        cat.add(ft);
    }

    @Test
    public void testSingleType() throws Exception {
View Full Code Here

            JDBCDataStore ds = (JDBCDataStore) dsInfo.getDataStore(null);
            ds.addVirtualTable(vt);

            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);
View Full Code Here

                DataStoreInfo dsInfo = catalog.getStore(ri.getStore().getId(), DataStoreInfo.class);
                SolrDataStore ds = (SolrDataStore) dsInfo.getDataStore(null);
                CatalogBuilder builder = new CatalogBuilder(catalog);
                builder.setStore(dsInfo);
                ds.setSolrConfigurations(layerConfiguration);
                typeInfo = builder.buildFeatureType(ds.getFeatureSource(ri.getQualifiedName()));
                typeInfo.getMetadata().put(SolrLayerConfiguration.KEY, layerConfiguration);
                layerInfo = builder.buildLayer(typeInfo);
            } else {
                // Update
                isNew = false;
View Full Code Here

            // featuretyepinfo and layerinfo
            DataStore dataStore = (DataStore) store.getDataStore(new NullProgressListener());
            String featureTypeName = coverageName != null ? coverageName : storeName;
            SimpleFeatureSource featureSource = dataStore.getFeatureSource(featureTypeName);
            featureType = builder.buildFeatureType(featureSource);
            featureType.setName(layerName);
            featureType.setTitle(layerName);
            builder.setupBounds(featureType, featureSource);
            // dimensions
            boolean foundTime = enableDimensions(featureType, coverageName, reader);
View Full Code Here

       DefaultFeatureCollection fc = new DefaultFeatureCollection();
       fc.add(b.buildFeature(null));
       fs.addFeatures(fc);

       FeatureTypeInfo ft = cb.buildFeatureType(fs);
       cat.add(ft);

       String xml =
           "<wfs:Transaction service=\"WFS\" version=\"1.1.0\" "
               + " xmlns:wfs=\"http://www.opengis.net/wfs\" "
View Full Code Here

        cb.setStore(ds);
       
        FeatureStore fs = (FeatureStore) store.getFeatureSource("Fifteen");
        addFeatures(fs, fs1.getFeatures());
       
        FeatureTypeInfo ft = cb.buildFeatureType(fs);
        cat.add(ft);
       
        fs = (FeatureStore) store.getFeatureSource("Seven");
        addFeatures(fs, fs2.getFeatures());
       
View Full Code Here

        cat.add(ft);
       
        fs = (FeatureStore) store.getFeatureSource("Seven");
        addFeatures(fs, fs2.getFeatures());
       
        ft = cb.buildFeatureType(fs);
        cat.add(ft);
    }

    void addFeatures(FeatureStore fs, FeatureCollection features) throws Exception {
        SimpleFeatureBuilder b = new SimpleFeatureBuilder((SimpleFeatureType) fs.getSchema());
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.