Package org.geotools.data

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


        }
       
        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

        }
        /* 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

   
    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

    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

        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

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

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.