Examples of StoreInfo


Examples of org.geoserver.catalog.StoreInfo

                    Map<String, Serializable> params = new HashMap<String, Serializable>();
                    params.put(DirectoryDataStoreFactory.URLP.key, new File(directory).toURI().toURL().toString());
                    params.put(DirectoryDataStoreFactory.NAMESPACE.key, new URI(ns).toString());
                   
                    DataStoreInfo si;
                    StoreInfo preExisting = getCatalog().getStoreByName(ws, project, StoreInfo.class);
                    boolean storeNew = false;
                    if(preExisting != null) {
                        if(!(preExisting instanceof DataStoreInfo)) {
                            error(new ParamResourceModel("storeExistsNotVector", this, project));
                            return;
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

            WorkspaceInfo ws = getCatalog().getWorkspaceByName(project);
            if(ws == null)
                return;
           
            // new store too?
            StoreInfo store = getCatalog().getStoreByName(ws, project, StoreInfo.class);
            if(store != null)
                error(validatable, "ImportPage.duplicateStore",
                        Collections.singletonMap("project", project));
        }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

                if(summary.isWorkspaceNew()) {
                    WorkspaceInfo ws = catalog.getWorkspaceByName(project);
                    if(ws != null)
                        ws.accept(deleteVisitor);
                } else if(summary.isStoreNew()) {
                    StoreInfo si = catalog.getStoreByName(project, project, StoreInfo.class);
                    if(si != null)
                        si.accept(deleteVisitor);
                } else {
                    // just remove the layers we created
                    for (LayerSummary layer : summary.getLayers()) {
                        catalog.remove(layer.getLayer());
                        catalog.remove(layer.getLayer().getResource());
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        tester.assertRenderedPage(StorePage.class);
        tester.assertNoErrorMessage();
       
        DataView dv = (DataView) tester.getComponentFromLastRenderedPage("table:listContainer:items");
        assertEquals(dv.size(), getCatalog().getStores(StoreInfo.class).size());
        StoreInfo ws = (StoreInfo) dv.getDataProvider().iterator(0, 1).next();
        assertEquals(getCatalog().getStores(StoreInfo.class).get(0), ws);
    }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        @Override
        protected void postDoMarshal(Object result,
                HierarchicalStreamWriter writer, MarshallingContext context) {
           
            StoreInfo store = (StoreInfo) result;
            if ( store instanceof DataStoreInfo ) {
                callback.postEncodeDataStore( (DataStoreInfo) store, writer, context );
            }
            else {
                callback.postEncodeCoverageStore( (CoverageStoreInfo) store, writer, context );
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

            }
           
        }
        public Object doUnmarshal(Object result,
                HierarchicalStreamReader reader, UnmarshallingContext context) {
            StoreInfo store = (StoreInfo) super.doUnmarshal(result, reader, context);
           
            LOGGER.info( "Loaded store '" +  store.getName() "', " + (store.isEnabled() ? "enabled" : "disabled") );
            return store;
        }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

        replay(fs);
       
        DataStore dstore = createNiceMock(DataStore.class);
        replay(dstore);
       
        StoreInfo store;
        if (resourceClass.equals(CoverageInfo.class)) {
            store = createNiceMock(CoverageStoreInfo.class);
        } else {
            store = createNiceMock(DataStoreInfo.class);
            expect((DataStore)((DataStoreInfo) store).getDataStore(null)).andReturn(dstore);
        }
        expect(store.getWorkspace()).andReturn(ws).anyTimes();
        replay(store);

        ResourceInfo resource = createNiceMock(resourceClass);
        expect(resource.getStore()).andReturn(store).anyTimes();
        expect(resource.getName()).andReturn(name).anyTimes();
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

            return false;
        if (!( obj instanceof StoreInfo ) ) {
            return false;
        }
       
        final StoreInfo other = (StoreInfo) obj;
        if (connectionParameters == null) {
            if (other.getConnectionParameters() != null)
                return false;
        } else if (!connectionParameters.equals(other.getConnectionParameters()))
            return false;
        if (description == null) {
            if (other.getDescription() != null)
                return false;
        } else if (!description.equals(other.getDescription()))
            return false;
        if (enabled != other.isEnabled())
            return false;
        if (id == null) {
            if (other.getId() != null)
                return false;
        } else if (!id.equals(other.getId()))
            return false;
        if (name == null) {
            if (other.getName() != null)
                return false;
        } else if (!name.equals(other.getName()))
            return false;
        if (workspace == null) {
            if (other.getWorkspace() != null)
                return false;
        } else if (!workspace.equals(other.getWorkspace()))
            return false;
        return true;
    }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

    final class ArcSDEStoreListModel extends LoadableDetachableModel {
        private static final long serialVersionUID = 1L;

        @Override
        protected Object load() {
            final StoreInfo storeInfo = (StoreInfo) getModelObject();
            final Catalog catalog = storeInfo.getCatalog();

            List<StoreInfo> stores = catalog.getStores(StoreInfo.class);
            stores = new ArrayList<StoreInfo>(stores);

            {
                final String arcsdeCoverageType = ArcSDERasterFormat.getInstance().getName();
                final String arcsdeVectorType = new ArcSDEDataStoreFactory().getDisplayName();

                StoreInfo store;
                String type;
                for (Iterator<StoreInfo> it = stores.iterator(); it.hasNext();) {
                    store = it.next();
                    type = store.getType();
                    if (arcsdeCoverageType.equals(type) || arcsdeVectorType.equals(type)) {
                        continue;
                    } else {
                        it.remove();
                    }
View Full Code Here

Examples of org.geoserver.catalog.StoreInfo

    static final class ArcSDEStoreListChoiceRenderer implements IChoiceRenderer {
        private static final long serialVersionUID = 1L;

        public Object getDisplayValue(final Object store) {
            StoreInfo info = (StoreInfo) store;
            return new StringBuilder(info.getWorkspace().getName()).append(':').append(
                    info.getName());
        }
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.