Package org.geotools.data.db2

Examples of org.geotools.data.db2.DB2SpatialFiltersTest


                if (ds == null) {
                    // We are using DB2NGDataStoreFactory as we do not need to look up in
                    // a JNDI context for a shared connection pool - we will end up using a
                    // an internal connection pool supplied by GeoTools DBCPDataSource.
                    //
                    DB2NGDataStoreFactory dsf = new DB2NGDataStoreFactory();
                    try {
                        // We expect the port value (key '3') to be a String but some of the
                        // extensions (ArcServiceExtension)
                        // change this from a String to an Integer which causes us to fail.
                        // In order to cope with this, we make a local copy of the parameters and
                        // force the port
                        // value to be a String.
                        // Maybe we should change DB2DataStoreFactory.canProcess to accept either
                        // Integer or
                        // String as valid for port.
                        Map<String, Serializable> paramsLocal = new HashMap<String, Serializable>();
                        for( String key : this.params.keySet() ) {
                            String value = this.params.get(key).toString();
                            paramsLocal.put(key, value);
                        }
                        if (dsf.canProcess(paramsLocal)) {
                            this.ds = (JDBCDataStore) dsf.createDataStore(paramsLocal);
                        }
                    } catch (IOException e) {
                        msg = e;
                        throw e;
                    }
View Full Code Here

TOP

Related Classes of org.geotools.data.db2.DB2SpatialFiltersTest

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.