Examples of WFSDataStoreFactory


Examples of org.geotools.data.wfs.WFSDataStoreFactory

  private static WFSDataStoreFactory wfsDSFactory;

  public static WFSDataStoreFactory getWFSDSFactory() {
    if (wfsDSFactory == null){
      wfsDSFactory = new WFSDataStoreFactory();
    }
    return wfsDSFactory;
  }
View Full Code Here

Examples of org.geotools.data.wfs.WFSDataStoreFactory

            dsLock.lock();
            monitor.worked(1);
            try {
                if (ds == null) {
                    if (dsf == null) {
                        dsf = new WFSDataStoreFactory();
                    }
                    monitor.worked(1);
                    if (dsf.canProcess(params)) {
                        monitor.worked(1);
                        try {
View Full Code Here

Examples of org.geotools.data.wfs.WFSDataStoreFactory

                logger.log(Level.WARNING, "Skipping remote OWS test because they were not enabled via -DremoteOwsTests=true");
                remoteStatesAvailable = Boolean.FALSE;
            } else {
                // let's check if the remote WFS tests are runnable
                try {
                    WFSDataStoreFactory factory = new WFSDataStoreFactory();
                    Map<String, Serializable> params = new HashMap(factory.getImplementationHints());
                    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

Examples of org.geotools.data.wfs.WFSDataStoreFactory

        return layersOrGroups;
    }

    private static DataStore connectRemoteWFS(URL remoteOwsUrl) throws WmsException {
        try {
            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

Examples of org.geotools.data.wfs.WFSDataStoreFactory

      getCapabilities += "?request=GetCapabilities";
    }
    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;
  }
View Full Code Here

Examples of org.geotools.data.wfs.WFSDataStoreFactory

            return;

        Map m = new HashMap();
        m.put(WFSDataStoreFactory.URL.key, url);
        m.put(WFSDataStoreFactory.TIMEOUT.key, new Integer(100000));
        DataStore post = (WFS_1_0_0_DataStore) (new WFSDataStoreFactory()).createDataStore(m);
        String typeName = post.getTypeNames()[0];

        Envelope bbox = post.getFeatureSource(typeName).getBounds();
        WFSDataStoreReadTest.doFeatureReaderWithBBox(url, true, false, 0, bbox);
    }
View Full Code Here

Examples of org.geotools.data.wfs.WFSDataStoreFactory

            return;

        Map m = new HashMap();
        m.put(WFSDataStoreFactory.URL.key, url);
        m.put(WFSDataStoreFactory.TIMEOUT.key, new Integer(100000));
        DataStore post = (WFS_1_0_0_DataStore) (new WFSDataStoreFactory()).createDataStore(m);

        String typeName = post.getTypeNames()[0];
        Envelope bbox = post.getFeatureSource(typeName).getBounds();

        WFSDataStoreReadTest.doFeatureReaderWithBBox(url, true, false, 0, bbox);
View Full Code Here

Examples of org.geotools.data.wfs.WFSDataStoreFactory

        if (url == null)
            return;
        Map m = new HashMap();
        m.put(WFSDataStoreFactory.URL.key, url);
        m.put(WFSDataStoreFactory.TIMEOUT.key, new Integer(100000));
        WFS_1_0_0_DataStore wfs = (WFS_1_0_0_DataStore) (new WFSDataStoreFactory())
                .createDataStore(m);
        FilterFactory2 fac = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());

        Filter filter = fac.equals(fac.property("NAME"), fac.literal("E 58th St"));
View Full Code Here

Examples of org.geotools.data.wfs.WFSDataStoreFactory

            return;

        Map m = new HashMap();
        m.put(WFSDataStoreFactory.URL.key, url);
        m.put(WFSDataStoreFactory.TIMEOUT.key, new Integer(10000000));
        DataStore post = (WFS_1_0_0_DataStore) (new WFSDataStoreFactory()).createDataStore(m);
        String typename = TO_EDIT_TYPE;
        SimpleFeatureType ft = post.getSchema(typename);
        SimpleFeatureSource fs = post.getFeatureSource(typename);
        class Watcher implements FeatureListener {
            public int count = 0;
View Full Code Here

Examples of org.geotools.data.wfs.WFSDataStoreFactory

        if (url == null)
            return;
        Map m = new HashMap();
        m.put(WFSDataStoreFactory.URL.key, url);
        m.put(WFSDataStoreFactory.TIMEOUT.key, new Integer(100000));
        WFS_1_0_0_DataStore wfs = (WFS_1_0_0_DataStore) (new WFSDataStoreFactory())
                .createDataStore(m);
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());

        WFSFeatureSource fs = wfs.getFeatureSource("topp:states");
       
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.