Examples of WFSDataStoreFactory


Examples of org.geotools.data.wfs.WFSDataStoreFactory

                logger.log(Level.WARNING, "Skipping remote WFS test because they were not enabled via -DremoteOwsTests=true");
                remoteWFSStatesAvailable = 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);
                    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

Examples of org.geotools.data.wfs.WFSDataStoreFactory

        return layersOrGroups;
    }

    private static DataStore connectRemoteWFS(URL remoteOwsUrl) throws ServiceException {
        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 ServiceException("Could not connect to remote OWS", e, "RemoteOWSFailure");
        }
    }
View Full Code Here

Examples of org.geotools.data.wfs.WFSDataStoreFactory

                logger.log(Level.WARNING, "Skipping remote WFS test because they were not enabled via -DremoteOwsTests=true");
                remoteWFSStatesAvailable = 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&version=1.1.0");
                    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
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.