Package org.geotools.data

Examples of org.geotools.data.DataAccessFactory


        final Catalog catalog = storeInfo.getCatalog();
        final ResourcePool resourcePool = catalog.getResourcePool();

        Class<?> factoryClass = null;
        if (storeInfo instanceof DataStoreInfo) {
            DataAccessFactory storeFactory;
            try {
                storeFactory = resourcePool.getDataStoreFactory((DataStoreInfo) storeInfo);
            } catch (IOException e) {
                throw new IllegalArgumentException("no factory found for StoreInfo " + storeInfo);
            }
            if (storeFactory != null) {
                factoryClass = storeFactory.getClass();
            }
        } else if (storeInfo instanceof CoverageStoreInfo) {
            AbstractGridFormat gridFormat;
            gridFormat = resourcePool.getGridCoverageFormat((CoverageStoreInfo) storeInfo);
            if (gridFormat != null) {
View Full Code Here


        final IModel model = storeEditForm.getModel();
        final DataStoreInfo info = (DataStoreInfo) model.getObject();
        final Catalog catalog = getCatalog();
        final ResourcePool resourcePool = catalog.getResourcePool();
        DataAccessFactory dsFactory;
        try {
            dsFactory = resourcePool.getDataStoreFactory(info);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }

        final Map<String, ParamInfo> paramsMetadata = new LinkedHashMap<String, ParamInfo>();

        {
            final boolean isNew = null == info.getId();
            final Param[] dsParams = dsFactory.getParametersInfo();
            for (Param p : dsParams) {
                ParamInfo paramInfo = new ParamInfo(p);
                paramsMetadata.put(p.key, paramInfo);

                if (isNew) {
View Full Code Here

        Path newPath = root().relativize(newFileRef.toPath());
        return "file:%WORKSPACE%/" + newPath.toString();
    }

    FileParam isFileBased(DataStoreInfo ds) throws IOException {
        DataAccessFactory factory = DataStoreUtils.aquireFactory(ds.getConnectionParameters());
        if (factory == null) {
            factory = DataStoreUtils.aquireFactory(ds.getType());
        }

        if (factory == null) {
View Full Code Here

    }

    private DataFormat<DataAccessFactory> findVectorFormat(String name) {
        if( name != null ){
            for (Iterator<DataAccessFactory> i = DataAccessFinder.getAllDataStores(); i.hasNext();) {
                DataAccessFactory f = i.next();
                if(name.equals(formatName(f.getDisplayName()))){
                    return format(f);
                }
            }
        }
        return null;
View Full Code Here

               
                // Get the factory instance
                //
                while(factories.hasNext())
                {
                    DataAccessFactory it = factories.next();
                    if(it instanceof EFeatureDataStoreFactory)
                    {
                        eFeatureStoreFactory =
                            new WeakReference<EFeatureDataStoreFactory>(
                                    (EFeatureDataStoreFactory)it);
View Full Code Here

    @Test
    public void testDataStoreFinderFindsIt() throws IOException {
        Iterator<DataStoreFactorySpi> allFactories = DataStoreFinder.getAllDataStores();
        ArcSDEDataStoreFactory sdeFac = null;
        while (allFactories.hasNext()) {
            DataAccessFactory next = allFactories.next();
            if (next instanceof ArcSDEDataStoreFactory) {
                sdeFac = (ArcSDEDataStoreFactory) next;
                break;
            }
        }
View Full Code Here

    @Test
    public void testDataAccessFinderFindsIt() throws IOException {
        Iterator<DataAccessFactory> allFactories = DataAccessFinder.getAllDataStores();
        ArcSDEDataStoreFactory sdeFac = null;
        while (allFactories.hasNext()) {
            DataAccessFactory next = allFactories.next();
            if (next instanceof ArcSDEDataStoreFactory) {
                sdeFac = (ArcSDEDataStoreFactory) next;
                break;
            }
        }
View Full Code Here

    @Test
    public void testDataStoreFinderFindsIt() throws IOException {
        Iterator<DataStoreFactorySpi> allFactories = DataStoreFinder.getAllDataStores();
        ArcSDEJNDIDataStoreFactory sdeFac = null;
        while (allFactories.hasNext()) {
            DataAccessFactory next = allFactories.next();
            if (next instanceof ArcSDEJNDIDataStoreFactory) {
                sdeFac = (ArcSDEJNDIDataStoreFactory) next;
                break;
            }
        }
View Full Code Here

    @Test
    public void testDataAccessFinderFindsIt() throws IOException {
        Iterator<DataAccessFactory> allFactories = DataAccessFinder.getAllDataStores();
        ArcSDEJNDIDataStoreFactory sdeFac = null;
        while (allFactories.hasNext()) {
            DataAccessFactory next = allFactories.next();
            if (next instanceof ArcSDEJNDIDataStoreFactory) {
                sdeFac = (ArcSDEJNDIDataStoreFactory) next;
                break;
            }
        }
View Full Code Here

     * is not available.
     *
     * @throws IOException Any I/O errors.
     */
    public DataAccessFactory getDataStoreFactory( DataStoreInfo info ) throws IOException {
        DataAccessFactory factory = null;
   
        if ( info.getType() != null ) {
            factory = DataStoreUtils.aquireFactory( info.getType() );   
        }
   
View Full Code Here

TOP

Related Classes of org.geotools.data.DataAccessFactory

Copyright © 2018 www.massapicom. 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.