Package org.geoserver.config

Examples of org.geoserver.config.GeoServer


    }

    @Override
    protected void setUpInternal() throws Exception {
        // configure the GSS service
        GeoServer gs = getGeoServer();
        GSSInfo gssInfo = gs.getService(GSSInfo.class);
        gssInfo.setMode(GSSMode.Unit);
        gssInfo.setVersioningDataStore(getCatalog().getDataStoreByName("synch"));
        gs.save(gssInfo);

        // initialize the GSS service
        Map gssBeans = applicationContext
                .getBeansOfType(DefaultGeoServerSynchronizationService.class);
        gss = (DefaultGeoServerSynchronizationService) gssBeans.values().iterator().next();
View Full Code Here


    }

    public void testESRIFormatFromDefaultValue() throws Exception {
        setupESRIPropertyFile();

        final GeoServer geoServer = getGeoServer();
        setupESRIFormatByDefault(geoServer, true);

        final FeatureSource fs = getFeatureSource(MockData.BASIC_POLYGONS);
        final Catalog catalog = getCatalog();
        final GeoServerResourceLoader resourceLoader = getResourceLoader();
View Full Code Here

         *
         * @param wcs
         *            the service.
         */
        private void handleContact() {
            final GeoServer gs = wcs.getGeoServer();
            start("ows:ServiceContact");

            ContactInfo contact = gs.getGlobal().getContact();
            elementIfNotEmpty("ows:IndividualName", contact.getContactPerson());
            elementIfNotEmpty("ows:PositionName", contact.getContactPosition());

            start("ows:ContactInfo");
            start("ows:Phone");
            elementIfNotEmpty("ows:Voice", contact.getContactVoice());
            elementIfNotEmpty("ows:Facsimile", contact.getContactFacsimile());
            end("ows:Phone");
            start("ows:Address");
            elementIfNotEmpty("ows:DeliveryPoint", contact.getAddress());
            elementIfNotEmpty("ows:City", contact.getAddressCity());
            elementIfNotEmpty("ows:AdministrativeArea", contact.getAddressState());
            elementIfNotEmpty("ows:PostalCode", contact.getAddressPostalCode());
            elementIfNotEmpty("ows:Country", contact.getAddressCountry());
            elementIfNotEmpty("ows:ElectronicMailAddress", contact.getContactEmail());
            end("ows:Address");

            String or = gs.getGlobal().getOnlineResource();
            if ((or != null) && !"".equals(or.trim())) {
                AttributesImpl attributes = new AttributesImpl();
                attributes.addAttribute("", "xlink:href", "xlink:href", "", or);
                start("ows:OnlineResource", attributes);
                end("OnlineResource");
View Full Code Here

            }
            AttributesImpl attributes = attributes("xlink:type", "simple", "xlink:href",
                    onlineResource);
            element("OnlineResource", null, attributes);

            GeoServer geoServer = wmsConfig.getGeoServer();
            ContactInfo contact = geoServer.getGlobal().getContact();
            handleContactInfo(contact);

            element("Fees", serviceInfo.getFees());
            element("AccessConstraints", serviceInfo.getAccessConstraints());
View Full Code Here

        String path = "ows?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName="
            + typeName.getLocalPart();
        Document doc;
   
        //first, non cite compliant mode should find the type even if namespace is not specified
        GeoServer geoServer = getGeoServer();
        WFSInfo service = geoServer.getService(WFSInfo.class);
        service.setCiteCompliant(false);
        geoServer.save(service);
        doc = getAsDOM(path);
        //print(doc);
        assertEquals("xsd:schema", doc.getDocumentElement().getNodeName());

        //then, in cite compliance more, it should not find the type name
        service.setCiteCompliant(true);
        geoServer.save(service);
        doc = getAsDOM(path);
        //print(doc);
        assertEquals("ows:ExceptionReport", doc.getDocumentElement().getNodeName());
    }
View Full Code Here

     * See http://jira.codehaus.org/browse/GEOS-3306
     *
     * @throws Exception
     */
    public void testPrefixedGetStrictCite() throws Exception {
        GeoServer geoServer = getGeoServer();
        WFSInfo service = geoServer.getService(WFSInfo.class);
        service.setCiteCompliant(true);
        geoServer.save(service);
       
        final QName typeName = MockData.POLYGONS;
        String path = "ows?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName="
                + getLayerId(typeName);
        Document doc = getAsDOM(path);
View Full Code Here

                request), null);
        return service.getCoverage(getCoverage);
    }

    protected void setInputLimit(int kbytes) {
        GeoServer gs = getGeoServer();
        WCSInfo info = gs.getService(WCSInfo.class);
        info.setMaxInputMemory(kbytes);
        gs.save(info);
    }
View Full Code Here

        gs.save(info);
    }
   

    protected void setOutputLimit(int kbytes) {
        GeoServer gs = getGeoServer();
        WCSInfo info = gs.getService(WCSInfo.class);
        info.setMaxOutputMemory(kbytes);
        gs.save(info);
    }
View Full Code Here

        expect(catalog.getResourceLoader()).andReturn(null).anyTimes();
        expect(catalog.getResourcePool()).andReturn(resourcePool).anyTimes();
        expect(catalog.getFeatureTypes()).andReturn(Collections.EMPTY_LIST).anyTimes();
        replay(catalog);
       
        GeoServer gs = createNiceMock(GeoServer.class);
        expect(gs.getService(WFSInfo.class)).andReturn(new WFSInfoImpl()).anyTimes();
        expect(gs.getCatalog()).andReturn(catalog).anyTimes();
        replay(gs);
       
        FeatureTypeSchemaBuilder.GML3 schemaBuilder = new FeatureTypeSchemaBuilder.GML3(gs);
        WFS wfs = new WFS(schemaBuilder);
       
View Full Code Here

   
    @Override
    protected WFSGetFeatureOutputFormat createOutputFormat(PythonFormatAdapter adapter) {
        //workaround, because this is an extension provider it can not depend on GeoServer or
        // a circular bean reference is created so we lazily obtain a reference to gs
        GeoServer gs = GeoServerExtensions.bean(GeoServer.class);
        return new PythonGetFeatureOutputFormat((PythonVectorFormatAdapter) adapter, gs);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.config.GeoServer

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.