Examples of WMSInfo


Examples of org.geoserver.wms.WMSInfo

        NamespaceContext ctx = new SimpleNamespaceContext(namespaces);
        XMLUnit.setXpathNamespaceContext(ctx);

        Logging.getLogger("org.geoserver.ows").setLevel(Level.OFF);
        WMSInfo wmsInfo = getGeoServer().getService(WMSInfo.class);
        wmsInfo.setMaxBuffer(50);
        getGeoServer().save(wmsInfo);
    }
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

        assertTrue(href.contains("layer=Fifteen"));
        assertTrue(href.contains("style=point"));
    }

    public void testServiceMetadata() throws Exception {
        final WMSInfo service = getGeoServer().getService(WMSInfo.class);
        service.setTitle("test title");
        service.setAbstract("test abstract");
        service.setAccessConstraints("test accessConstraints");
        service.setFees("test fees");
        service.getKeywords().clear();
        service.getKeywords().add("test keyword 1");
        service.getKeywords().add("test keyword 2");
        service.setMaintainer("test maintainer");
        service.setOnlineResource("http://example.com/geoserver");
        GeoServerInfo global = getGeoServer().getGlobal();
        ContactInfo contact = global.getContact();
        contact.setAddress("__address");
        contact.setAddressCity("__city");
        contact.setAddressCountry("__country");
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

   
    @Override
    protected void setUpInternal() throws Exception {
        super.setUpInternal();
        Logging.getLogger("org.geoserver.ows").setLevel(Level.OFF);
        WMSInfo wmsInfo = getGeoServer().getService(WMSInfo.class);
        wmsInfo.setMaxBuffer(50);
        getGeoServer().save(wmsInfo);
    }
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

public class WMSExtendedCapabilitiesTest extends GeoServerSystemTestSupport {

    @Test
    public void testExtendedCaps() throws Exception {
        WMSInfo wms = getGeoServer().getService(WMSInfo.class);
        wms.getSRS().add("EPSG:4326");
        wms.getMetadata().put(InspireMetadata.LANGUAGE.key, "fre");
        wms.getMetadata().put(InspireMetadata.SERVICE_METADATA_URL.key, "http://foo.com?bar=baz");
        getGeoServer().save(wms);

        Document dom = getAsDOM("wms?request=getcapabilities");
        assertEquals(NAMESPACE, dom.getDocumentElement().getAttribute("xmlns:inspire_vs"));
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

        assertEquals("fre", respLangVal.getFirstChild().getNodeValue());
    }

    @Test
    public void testChangeMediaType() throws Exception {
        WMSInfo wms = getGeoServer().getService(WMSInfo.class);
        wms.getSRS().add("EPSG:4326");
        wms.getMetadata().put(InspireMetadata.LANGUAGE.key, "fre");
        wms.getMetadata().put(InspireMetadata.SERVICE_METADATA_URL.key, "http://foo.com?bar=baz");
        getGeoServer().save(wms);

        Document dom = getAsDOM("wms?request=getcapabilities");
        assertEquals(NAMESPACE, dom.getDocumentElement().getAttribute("xmlns:inspire_vs"));
        assertMetadataUrlAndMediaType(dom, "http://foo.com?bar=baz", "application/vnd.iso.19139+xml");

        wms.getMetadata().put(InspireMetadata.SERVICE_METADATA_TYPE.key, "application/xml");
        getGeoServer().save(wms);

        dom = getAsDOM("wms?request=getcapabilities");
        assertEquals(NAMESPACE, dom.getDocumentElement().getAttribute("xmlns:inspire_vs"));
        assertMetadataUrlAndMediaType(dom, "http://foo.com?bar=baz", "application/xml");
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

    @Test
    public void testModifyService(){
       
        // Create a service to modify
        WMSInfo service = new WMSInfoImpl();
        ((WMSInfoImpl) service).setId("WMS-TEST");
        service.setName("WMS");
        service.setMaintainer("Foo");


        service = database.add(service);
       
        assertEquals(service.getMaintainer(), "Foo");
       
        service.setMaintainer("Bar");
        testSaved(service);

    }
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

        service = database.getById(service.getId(), ServiceInfo.class);
        assertEquals("Bar", service.getMaintainer());
    }

    public void testGetServiceWithGeoServerRef() {
        WMSInfo service = new WMSInfoImpl();
        ((WMSInfoImpl) service).setId("WMS-TEST");
        service.setName("WMS");
        service.setMaintainer("Foo");

        service = database.add(service);
        database.clear(service);

        service = database.getAll(WMSInfo.class).iterator().next();
        assertNotNull(service.getGeoServer());
    }
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

        CiteTestData.registerNamespaces(namespaces);
        XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));

        // setup limited srs
        GeoServer gs = getGeoServer();
        WMSInfo wms = gs.getService(WMSInfo.class);
        wms.getSRS().add("EPSG:4326");
        gs.save(wms);
       
        GeoServerUserGroupService service = getSecurityManager().loadUserGroupService("default");
        GeoServerUserGroupStore store  = service.createStore();
        store.load();
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

     * instead.
     */
    private void upgradeWMSIntegrationConfig(final GeoServer geoServer, final GWCConfig gwcConfig)
            throws IOException {
        // Check whether we're using the old way of storing this information, and get rid of it
        WMSInfo service = geoServer.getService(WMSInfo.class);
        if (service != null) {
            MetadataMap metadata = service.getMetadata();
            if (service != null && metadata != null) {
                Boolean storedValue = metadata.get(WMS_INTEGRATION_ENABLED_KEY, Boolean.class);
                if (storedValue != null) {
                    boolean enabled = storedValue.booleanValue();
                    gwcConfig.setDirectWMSIntegrationEnabled(enabled);
View Full Code Here

Examples of org.geoserver.wms.WMSInfo

       
        GeoServerInfo global = getGeoServer().getGlobal();
        global.getSettings().setProxyBaseUrl("src/test/resources/geoserver");
        getGeoServer().save(global);
       
        WMSInfo wms = getGeoServer().getService(WMSInfo.class);
        wms.getSRS().add("EPSG:4326");
        getGeoServer().save(wms);
       
        Map<String, String> namespaces = new HashMap<String, String>();
        namespaces.put("xlink", "http://www.w3.org/1999/xlink");
        namespaces.put("", "http://www.opengis.net/wms");
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.