Package org.geotools.data.postgis

Examples of org.geotools.data.postgis.PostgisNGDataStoreFactory.createDataStore()


    }

    public synchronized JDBCDataStore getDataStore() throws IOException {
      if(datastore == null) {
            PostgisNGDataStoreFactory factory = PostgisServiceExtension2.getFactory();
            datastore = factory.createDataStore(params);
      }
        return datastore;
    }

    public String getSchemaName() {
View Full Code Here


        datastore=null;
        PostgisServiceExtension2 ext=new PostgisServiceExtension2();
        Map<String, Serializable> params = ext.createParams(PostgisServiceExtension2.DIALECT.toURL(url));
        PostgisNGDataStoreFactory factory = new PostgisNGDataStoreFactory();
       
        datastore=factory.createDataStore(params);
        return datastore;
    }

    public String getExtensionID() {
        return ID;
View Full Code Here

        // we can work with it
        assertTrue(factory.canProcess(params));
       
        // force database creation and check the store functions
        JDBCDataStore store = factory.createDataStore(params);
        assertNotNull(store);
        store.createSchema(DataUtilities.createType("test", "id:String,polygonProperty:Polygon:srid=32615"));
        store.getSchema("test");
       
        // now disconnect and drop
View Full Code Here

        factory.dropDatabase(params);
       
        // try to connect again, it must fail
        params.remove(PostgisNGDataStoreFactory.CREATE_DB_IF_MISSING.key);
        try {
            store = factory.createDataStore(params);
            store.getTypeNames();
            fail("This one should have failed, the database has just been dropped");
        } catch(Exception e) {
            // fine, it's what we expected
        }
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.