Examples of DataAccessFactory


Examples of org.geotools.data.DataAccessFactory

        final CatalogIconFactory icons = CatalogIconFactory.get();
        final ListView dataStoreLinks = new ListView("vectorResources", sortedDsNames) {
            @Override
            protected void populateItem(ListItem item) {
                final String dataStoreFactoryName = item.getModelObjectAsString();
                final DataAccessFactory factory = getAvailableDataStores()
                        .get(dataStoreFactoryName);
                final String description = factory.getDescription();
                SubmitLink link;
                link = new SubmitLink("resourcelink") {
                    @Override
                    public void onSubmit() {
                        setResponsePage(new DataAccessNewPage(dataStoreFactoryName));
                    }
                };
                link.setEnabled(thereAreWorkspaces);
                link.add(new Label("resourcelabel", dataStoreFactoryName));
                item.add(link);
                item.add(new Label("resourceDescription", description));
                Image icon = new Image("storeIcon", icons.getStoreIcon(factory.getClass()));
                // TODO: icons could provide a description too to be used in alt=...
                icon.add(new AttributeModifier("alt", true, new Model("")));
                item.add(icon);
            }
        };
View Full Code Here

Examples of org.geotools.data.DataAccessFactory

            availableDataStores = DataAccessFinder.getAvailableDataStores();

            Map<String, DataAccessFactory> storeNames = new HashMap<String, DataAccessFactory>();

            while (availableDataStores.hasNext()) {
                DataAccessFactory factory = availableDataStores.next();
                storeNames.put(factory.getDisplayName(), factory);
            }
            dataStores = storeNames;
        }
        return dataStores;
    }
View Full Code Here

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

Examples of org.geotools.data.DataAccessFactory

        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

Examples of org.geotools.data.DataAccessFactory

        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

Examples of org.geotools.data.DataAccessFactory

    }

    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

Examples of org.geotools.data.DataAccessFactory

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

Examples of org.geotools.data.DataAccessFactory

    @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

Examples of org.geotools.data.DataAccessFactory

    @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

Examples of org.geotools.data.DataAccessFactory

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