Package org.geotools.data.wfs

Examples of org.geotools.data.wfs.WFSDataStoreFactory.createDataStore()


                    URL url = new URL(WFS_SERVER_URL + "service=WFS&request=GetCapabilities");
                    params.put(WFSDataStoreFactory.URL.key, url);
                    params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
                    //give it five seconds to respond...
                    params.put(WFSDataStoreFactory.TIMEOUT.key, Integer.valueOf(5000));
                    DataStore remoteStore = factory.createDataStore(params);
                    FeatureSource fs = remoteStore.getFeatureSource(TOPP_STATES);
                    remoteStatesAvailable = Boolean.TRUE;
                    // check a basic response can be answered correctly
                    DefaultQuery dq = new DefaultQuery(TOPP_STATES);
                    FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
View Full Code Here


            WFSDataStoreFactory factory = new WFSDataStoreFactory();
            Map params = new HashMap(factory.getImplementationHints());
            params.put(WFSDataStoreFactory.URL.key, remoteOwsUrl
                    + "&request=GetCapabilities&service=WFS");
            params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
            return factory.createDataStore(params);
        } catch (Exception e) {
            throw new WmsException("Could not connect to remote OWS", "RemoteOWSFailure", e);
        }
    }
View Full Code Here

    }
    URL endPoint = new URL(getCapabilities);
    HashMap<String, Serializable> params = new HashMap<String, Serializable>();
    params.put(WFSDataStoreFactory.URL.key, endPoint);
    WFSDataStoreFactory dsFactory = new WFSDataStoreFactory();
    DataStore ds = dsFactory.createDataStore(params);
    return ds;
  }

  public static DataStore getDataStoreFromPostGIS(String host, int port,
      String user, String passwd, String database, String schema)
View Full Code Here

        params.put(WFSDataStoreFactory.BUFFER_SIZE.key, 100);
        params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
        params.put(WFSDataStoreFactory.LENIENT.key, Boolean.TRUE);

        //ds=new WFSDataStore(host, null, null, null, 10000, 100, true, true);
        ds = (WFS_1_0_0_DataStore) dsfac.createDataStore(params);
        assertTrue( ds.strategy instanceof MapServerWFSStrategy );
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
       
        String attName = ds.getSchema(TYPE_NAME).getGeometryDescriptor().getLocalName();
View Full Code Here

        Map<String, Serializable> params = new HashMap<String, Serializable>();
        params.put(WFSDataStoreFactory.URL.key, SERVER_URL);
        params.put(WFSDataStoreFactory.PROTOCOL.key, usePost);
        params.put("USE_PULL_PARSER", Boolean.TRUE);
        WFSDataStoreFactory dataStoreFactory = new WFSDataStoreFactory();
        WFSDataStore wfs = dataStoreFactory.createDataStore(params);
       
        final WFS_1_1_0_Protocol originalHandler = (WFS_1_1_0_Protocol) ((WFS_1_1_0_DataStore) wfs).wfs;
        originalHandler.http = new HttpProtocolWrapper(originalHandler.http) {
           
            @Override
View Full Code Here

            Map<String, Serializable> params = new HashMap<String, Serializable>();
            params.put(WFSDataStoreFactory.URL.key, SERVER_URL);
            params.put("USE_PULL_PARSER", Boolean.TRUE);
            WFSDataStoreFactory dataStoreFactory = new WFSDataStoreFactory();
            wfs = dataStoreFactory.createDataStore(params);
            LOGGER.fine("WFS datastore created");
        }
    }

    @Test
View Full Code Here

            Map<String, Serializable> params = new HashMap<String, Serializable>();
            params.put(WFSDataStoreFactory.URL.key, SERVER_URL);
            params.put("USE_PULL_PARSER", Boolean.TRUE);
            WFSDataStoreFactory dataStoreFactory = new WFSDataStoreFactory();
            wfs = dataStoreFactory.createDataStore(params);
            LOGGER.fine("WFS datastore created");
        }
    }

    @Test
View Full Code Here

            WFSDataStoreFactory factory = new WFSDataStoreFactory();
            Map params = new HashMap(factory.getImplementationHints());
            params.put(WFSDataStoreFactory.URL.key, remoteOwsUrl
                    + "&request=GetCapabilities&service=WFS");
            params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
            return factory.createDataStore(params);
        } catch (Exception e) {
            throw new ServiceException("Could not connect to remote OWS", e, "RemoteOWSFailure");
        }
    }
View Full Code Here

                    URL url = new URL(WFS_SERVER_URL + "service=WFS&request=GetCapabilities");
                    params.put(WFSDataStoreFactory.URL.key, url);
                    params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
                    //give it five seconds to respond...
                    params.put(WFSDataStoreFactory.TIMEOUT.key, Integer.valueOf(5000));
                    DataStore remoteStore = factory.createDataStore(params);
                    FeatureSource fs = remoteStore.getFeatureSource(TOPP_STATES);
                    remoteWFSStatesAvailable = Boolean.TRUE;
                    // check a basic response can be answered correctly
                    Query dq = new Query(TOPP_STATES);
                    FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
View Full Code Here

            WFSDataStoreFactory factory = new WFSDataStoreFactory();
            Map params = new HashMap(factory.getImplementationHints());
            params.put(WFSDataStoreFactory.URL.key, remoteOwsUrl
                    + "&request=GetCapabilities&service=WFS");
            params.put(WFSDataStoreFactory.TRY_GZIP.key, Boolean.TRUE);
            return factory.createDataStore(params);
        } catch (Exception e) {
            throw new ServiceException("Could not connect to remote OWS", e, "RemoteOWSFailure");
        }
    }
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.