Examples of canProcess()


Examples of org.geotools.data.DataAccessFactory.canProcess()

    public static DataAccessFactory aquireFactory(Map params) {
        for (Iterator i = getAvailableDataStoreFactories().iterator(); i.hasNext();) {
            DataAccessFactory factory = (DataAccessFactory) i.next();
            initializeDataStoreFactory( factory );
           
            if (factory.canProcess(params)) {
                return factory;
            }
        }

        return null;
View Full Code Here

Examples of org.geotools.data.DataStoreFactorySpi.canProcess()

     */
    public IService createService( URL providedId, Map<String, Serializable> params ) {
        Iterator<DataStoreFactorySpi> available = DataStoreFinder.getAvailableDataStores();
        while( available.hasNext() ) {
            DataStoreFactorySpi factory = available.next();
            if (factory.canProcess(params)) {
                ID id = createID(providedId, factory, params);
                if( id == null ){
                    // cannot represent this in our catalog as we have
                    // no idea how to create an "id" for it
                    continue;
View Full Code Here

Examples of org.geotools.data.DataStoreFactorySpi.canProcess()

        }
       
        DataStoreFactorySpi factory = null;
        for ( Iterator<DataStoreFactorySpi> i =  DataStoreFinder.getAvailableDataStores(); i.hasNext(); ) {
            DataStoreFactorySpi f = i.next();
            if ( f.canProcess( params ) ) {
                factory = f;
                break;
            }
        }
       
View Full Code Here

Examples of org.geotools.data.DataStoreFactorySpi.canProcess()

        }
        /* we did not find it? */
        assertNotNull(spi);

        /* try with params */
        assertTrue(spi.canProcess(createParams()));
   
    }

    /*
     * Setup mock service to run test with URL
View Full Code Here

Examples of org.geotools.data.DataStoreFactorySpi.canProcess()

   
    public DataStore createDataStore(ImportData data) throws IOException {
        DataStoreFactorySpi dataStoreFactory = factory();

        Map<String,Serializable> params = createConnectionParameters(data);
        if (params != null && dataStoreFactory.canProcess(params)) {
            DataStore dataStore = dataStoreFactory.createDataStore(params);
            if (dataStore != null) {
                return dataStore;
            }
        }
View Full Code Here

Examples of org.geotools.data.DataStoreFactorySpi.canProcess()

    public static DataStoreFactorySpi aquireFactory(Map params) {
        for (Iterator i = DataStoreFinder.getAvailableDataStores();
                i.hasNext();) {
            DataStoreFactorySpi factory = (DataStoreFactorySpi) i.next();

            if (factory.canProcess(params)) {
                return factory;
            }
        }

        return null;
View Full Code Here

Examples of org.geotools.data.DataStoreFactorySpi.canProcess()

        connectionParams.put("namespace", dataStoresForm.getNamespaceId());
        paramTexts.put("namespace", dataStoresForm.getNamespaceId());
       
        //dump("editor", connectionParams );
        //dump("texts ",paramTexts );       
        if (!factory.canProcess(connectionParams)) {
            // We could not use these params!
            //
            ActionErrors errors = new ActionErrors();
            errors.add(ActionErrors.GLOBAL_ERROR,
                new ActionError("error.cannotProcessConnectionParams"));
View Full Code Here

Examples of org.geotools.data.DataStoreFactorySpi.canProcess()

        //connectionParams.put("namespace", getNamespaceId());

        dump("form", connectionParams );
        // Factory will provide even more stringent checking
        //
        if (!factory.canProcess( connectionParams )) {
            errors.add("paramValue",
                new ActionError("error.datastoreEditor.validation"));
        }

        return errors;
View Full Code Here

Examples of org.geotools.data.FileDataStoreFactorySpi.canProcess()

     */
    public static boolean consider( DataAccessFactory factory, URL url ) {
        // is this specifically the kind of thing that can take a url?
        if (factory instanceof FileDataStoreFactorySpi) {
            FileDataStoreFactorySpi fileFactory = (FileDataStoreFactorySpi) factory;
            return fileFactory.canProcess(url);
        }
        // Go through the params and see if a URL can even be used?
        // (It should be a required parameter that accepts a URL
        for( Param param : factory.getParametersInfo() ) {
            if (param.required) {
View Full Code Here

Examples of org.geotools.data.db2.DB2NGDataStoreFactory.canProcess()

                        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
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.