Examples of WMSStoreInfo


Examples of org.geoserver.catalog.WMSStoreInfo

            }

            @Override
            protected void onSubmit(AjaxRequestTarget target, Form form) {
                form.process();
                WMSStoreInfo info = (WMSStoreInfo) form.getModelObject();
                try {
                    onSave(info, target);
                } catch (IllegalArgumentException e) {
                    form.error(e.getMessage());
                    target.addComponent(form);
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

                    Name name = ci.getQualifiedName();
                    resources.put(name.getLocalPart(), new Resource(name));
                }
                   
            } else if(store instanceof WMSStoreInfo) {
                WMSStoreInfo wmsInfo = (WMSStoreInfo) store;
               
                CatalogBuilder builder = new CatalogBuilder(getCatalog());
                builder.setStore(store);
                List<Layer> layers = wmsInfo.getWebMapServer(null).getCapabilities().getLayerList();
                for(Layer l : layers) {
                    if(l.getName() == null) {
                        continue;
                    }
                   
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

        }

        Catalog cat = getCatalog();

        CatalogBuilder cb = new CatalogBuilder(cat);
        WMSStoreInfo wms = cb.buildWMSStore("demo");
        wms.setCapabilitiesURL(RemoteOWSTestSupport.WMS_SERVER_URL
                + "service=WMS&request=GetCapabilities&version=1.1.0");

        cb.setStore(wms);
        WMSLayerInfo wmsLayer = cb.buildWMSLayer("topp:states");
        assertWMSLayer(wmsLayer);
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

            client.expectGet(capsURL,
                    new MockHttpResponse(getClass().getResource("caps111.xml"), "text/xml"));
            TestHttpClientProvider.bind(client, capsURL);
           
            CatalogBuilder cb = new CatalogBuilder(getCatalog());
            WMSStoreInfo store = cb.buildWMSStore("test-store");
            store.setCapabilitiesURL(capsURL.toExternalForm());
            cb.setStore(store);
            WMSLayerInfo layer = cb.buildWMSLayer("world4326");
           
            // check the bbox has the proper axis order
            assertEquals("EPSG:4326", layer.getSRS());
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

            client.expectGet(capsURL,
                    new MockHttpResponse(getClass().getResource("caps130.xml"), "text/xml"));
            TestHttpClientProvider.bind(client, capsURL);
           
            CatalogBuilder cb = new CatalogBuilder(getCatalog());
            WMSStoreInfo store = cb.buildWMSStore("test-store");
            store.setCapabilitiesURL(capsURL.toExternalForm());
            cb.setStore(store);
            WMSLayerInfo layer = cb.buildWMSLayer("world4326");
           
            // check the bbox has the proper axis order
            assertEquals("EPSG:4326", layer.getSRS());
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

            client.expectGet(capsURL,
                    new MockHttpResponse(getClass().getResource("caps130_crs84.xml"), "text/xml"));
            TestHttpClientProvider.bind(client, capsURL);
           
            CatalogBuilder cb = new CatalogBuilder(getCatalog());
            WMSStoreInfo store = cb.buildWMSStore("test-store");
            store.setCapabilitiesURL(capsURL.toExternalForm());
            cb.setStore(store);
            WMSLayerInfo layer = cb.buildWMSLayer("world4326");
           
            // check the bbox has the proper axis order
            assertEquals("EPSG:4326", layer.getSRS());
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

        CatalogFactory cFactory = catalog.getFactory();
       
        WorkspaceInfo ws = cFactory.createWorkspace();
        ws.setName( "foo" );
       
        WMSStoreInfo wms1 = cFactory.createWebMapServer();
        wms1.setName( "bar" );
        wms1.setWorkspace( ws );
        wms1.setCapabilitiesURL( "http://fake.host/wms?request=GetCapabilities&service=wms");
       
        ByteArrayOutputStream out = out();
        persister.save( wms1, out );
       
        WMSStoreInfo wms2 = persister.load( in( out ), WMSStoreInfo.class );
        assertEquals( "bar", wms2.getName() );
        assertEquals(WMSStoreInfoImpl.DEFAULT_MAX_CONNECTIONS, wms2.getMaxConnections());
        assertEquals(WMSStoreInfoImpl.DEFAULT_CONNECT_TIMEOUT, wms2.getConnectTimeout());
        assertEquals(WMSStoreInfoImpl.DEFAULT_READ_TIMEOUT, wms2.getReadTimeout());
       
        //TODO: reenable when resolving proxy commited
        assertNotNull( wms2.getWorkspace() );
        assertEquals( "foo", wms2.getWorkspace().getId() );
       
        Document dom = dom( in( out ) );
        assertEquals( "wmsStore", dom.getDocumentElement().getNodeName() );
    }
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

        CatalogFactory cFactory = catalog.getFactory();
       
        WorkspaceInfo ws = cFactory.createWorkspace();
        ws.setName( "foo" );
       
        WMSStoreInfo wms1 = cFactory.createWebMapServer();
        wms1.setName( "bar" );
        wms1.setWorkspace( ws );
        wms1.setCapabilitiesURL( "http://fake.host/wms?request=GetCapabilities&service=wms");
        wms1.getMetadata().put("maxConnections", Integer.valueOf(18));
        wms1.getMetadata().put("connectTimeout", Integer.valueOf(25));
        wms1.getMetadata().put("readTimeout", Integer.valueOf(78));
       
        ByteArrayOutputStream out = out();
        persister.save( wms1, out );
       
        WMSStoreInfo wms2 = persister.load( in( out ), WMSStoreInfo.class );
        assertEquals( "bar", wms2.getName() );

        assertEquals(18, wms2.getMaxConnections());
        assertEquals(25, wms2.getConnectTimeout());
        assertEquals(78, wms2.getReadTimeout());
       
        assertNull(wms2.getMetadata().get("maxConnections"));
        assertNull(wms2.getMetadata().get("connectTimeout"));
        assertNull(wms2.getMetadata().get("readTimeout"));
    }
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

        NamespaceInfo ns = cFactory.createNamespace();
        ns.setPrefix( "acme" );
        ns.setURI( "http://acme.org" );
        catalog.add( ns );
       
        WMSStoreInfo wms = cFactory.createWebMapServer();
        wms.setWorkspace( ws );
        wms.setName( "foo" );
        wms.setCapabilitiesURL( "http://fake.host/wms?request=getCapabilities");
        catalog.add( wms );
       
        WMSLayerInfo wl = cFactory.createWMSLayer();
        wl.setStore( wms );
        wl.setNamespace( ns );
View Full Code Here

Examples of org.geoserver.catalog.WMSStoreInfo

    @SuppressWarnings({ "serial", "unchecked", "rawtypes" })
    public WMSLayerImporterPage(PageParameters params) {
       
        storeId = params.getString("storeId");
       
        WMSStoreInfo store = getCatalog().getStore(storeId, WMSStoreInfo.class);

        // check if we have anything to import
        provider = new WMSLayerProvider();       
        provider.setStoreId(storeId);
       
        if (provider.size() <= 0) {
            error(new ParamResourceModel("storeEmpty", this, store.getName(),
                    store.getWorkspace().getName()).getString());
        }

        // build the GUI
        form = new Form("form", new CompoundPropertyModel(this));
        form.setOutputMarkupId(true);
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.