Examples of buildDataStore()


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

                        si.setEnabled(true);
                    } else {
                        storeNew = true;
                        CatalogBuilder builder = new CatalogBuilder(getCatalog());
                        builder.setWorkspace(ws);
                        si = builder.buildDataStore(project);
                        si.getConnectionParameters().putAll(params);
                        si.setEnabled(true);
                        si.setType(storeType);
                       
                        getCatalog().add(si);
View Full Code Here

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

       
        boolean add = false;
        if ( info == null ) {
            LOGGER.info("Auto-configuring datastore: " + datastore);
           
            info = builder.buildDataStore( datastore );
            add = true;
        }
        else {
            LOGGER.info("Using existing datastore: " + datastore);
        }
View Full Code Here

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

        if (ftInfo == null) {
            // SG the fc might have been generated by the WPS therefore there is no such a thing
            // inside the GeoServer catalogue
            final SimpleFeatureSource featureSource = DataUtilities.source(c);
            final CatalogBuilder catalogBuilder = new CatalogBuilder(catalog);
            catalogBuilder.setStore(catalogBuilder.buildDataStore(c.getSchema().getName()
                    .getLocalPart()));
            ftInfo = catalogBuilder.buildFeatureType(featureSource);

        }
        return ftInfo;
View Full Code Here

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

        if (ftInfo == null) {
            // SG the fc might have been generated by the WPS therefore there is no such a thing
            // inside the GeoServer catalogue
            final SimpleFeatureSource featureSource = DataUtilities.source(c);
            final CatalogBuilder catalogBuilder = new CatalogBuilder(catalog);
            catalogBuilder.setStore(catalogBuilder.buildDataStore(c.getSchema().getName()
                    .getLocalPart()));
            ftInfo = catalogBuilder.buildFeatureType(featureSource);

        }
        return ftInfo;
View Full Code Here

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

            return null;
        }

        CatalogBuilder cb = new CatalogBuilder(catalog);
        cb.setWorkspace(workspace);
        DataStoreInfo store  = cb.buildDataStore(data.getName());
        store.setType(factory().getDisplayName());
        store.getConnectionParameters().putAll(params);
        return store;
    }
View Full Code Here

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

        DataStore dataStore = createDataStore(data);
        try {
            CatalogBuilder cb = new CatalogBuilder(catalog);
           
            //create a dummy datastore
            DataStoreInfo store = cb.buildDataStore("dummy");
            cb.setStore(store);
           
            List<ImportTask> tasks = new ArrayList<ImportTask>();
            for (String typeName : dataStore.getTypeNames()) {
                if (monitor.isCanceled()) {
View Full Code Here

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

        DataStoreInfo store = null;
        FeatureTypeInfo featureType = null;
        LayerInfo layer = null;
        boolean success = false;
        try {
            store = builder.buildDataStore(layerName);

            DataStoreFactorySpi dataStoreFactory = getOutlineDataStoreFactory(dir);

            Map<String, Serializable> parameters = getOutlineDataStoreParameters(dir,
                    dataStoreFactory);
View Full Code Here

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

        String charset = form.getFirstValue("charset");
       
        if (info == null) {
            LOGGER.info("Auto-configuring datastore: " + datastore);
           
            info = builder.buildDataStore( datastore );
            add = true;
           
            //TODO: should check if the store actually supports charset
            if (charset != null && charset.length() > 0) {
                info.getConnectionParameters().put("charset", charset);
View Full Code Here

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

            //JD: not sure why we do this, rather than just task.setStore(existing);
            CatalogBuilder cb = new CatalogBuilder(importer.getCatalog());

            StoreInfo clone;
            if (existing instanceof DataStoreInfo) {
                clone = cb.buildDataStore(existing.getName());
                cb.updateDataStore((DataStoreInfo) clone, (DataStoreInfo) existing);
            }
            else if (existing instanceof CoverageStoreInfo) {
                clone = cb.buildCoverageStore(existing.getName());
                cb.updateCoverageStore((CoverageStoreInfo) clone, (CoverageStoreInfo) existing);
View Full Code Here

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

    }

    @Test
    public void testMetadataFromFeatueSource() throws Exception {
        CatalogBuilder cb = new CatalogBuilder(getCatalog());
        cb.setStore(cb.buildDataStore("fooStore"));

        FeatureType ft = createMock(FeatureType.class);
        expect(ft.getName()).andReturn(new NameImpl("foo")).anyTimes();
        expect(ft.getCoordinateReferenceSystem()).andReturn(null).anyTimes();
        expect(ft.getGeometryDescriptor()).andReturn(null).anyTimes();
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.