Examples of GeoServer


Examples of org.geoserver.config.GeoServer

        form.add(new TextField("contactFacsimile"));
        form.add(new TextField("contactEmail"));
        form.add(new Button("submit") {
            @Override
            public void onSubmit() {
                GeoServer gs = (GeoServer)geoServerModel.getObject();
                GeoServerInfo global = gs.getGlobal();
                global.setContact((ContactInfo)contactModel.getObject());
                gs.save(global);
                setResponsePage(GeoServerHomePage.class);
            }
        });
        form.add(new Button("cancel") {
            @Override
View Full Code Here

Examples of org.geoserver.config.GeoServer

        form.add(new CheckBox("allowNativeMosaic"));

        Button submit = new Button("submit", new StringResourceModel("submit", this, null)) {
            @Override
            public void onSubmit() {
                GeoServer gs = (GeoServer) geoServerModel.getObject();
                gs.getGlobal().setJAI( (JAIInfo)jaiModel.getObject() );
                gs.save( gs.getGlobal() );
                setResponsePage(GeoServerHomePage.class);
            }
        };
        form.add(submit);
       
View Full Code Here

Examples of org.geoserver.config.GeoServer

    protected String getLogConfiguration() {
        return "/DEFAULT_LOGGING.properties";
    }
   
    public void testContextStartup() {
        GeoServer config = (GeoServer) applicationContext.getBean("geoServer");
        assertNotNull(config.getCatalog().getFeatureTypeByName(MockData.BUILDINGS.getNamespaceURI(), MockData.BUILDINGS.getLocalPart()));
        assertNotNull(config.getCatalog().getFeatureTypeByName(MockData.BASIC_POLYGONS.getNamespaceURI(), MockData.BASIC_POLYGONS.getLocalPart()));
    }
View Full Code Here

Examples of org.geoserver.config.GeoServer

        protected void encodeExtendedData(SimpleFeature feature) {
            // code at the moment is in KML3VectorTransfomer
        }

        protected String getFeatureTypeURL() throws IOException {
            GeoServer gs = mapContext.getRequest().getWMS().getGeoServer();
            Catalog catalog = gs.getCatalog();
            String nsUri = mapLayer.getFeatureSource().getSchema().getName().getNamespaceURI();
            NamespaceInfo ns = catalog.getNamespaceByURI(nsUri);
            String featureTypeName = mapLayer.getFeatureSource().getSchema()
                    .getName().getLocalPart();
            GetMapRequest request = mapContext.getRequest();
View Full Code Here

Examples of org.geoserver.config.GeoServer

            KMLGeometryTransformer geometryTransformer = new KMLGeometryTransformer();
            //geometryTransformer.setUseDummyZ( true );
            geometryTransformer.setOmitXMLDeclaration(true);
            geometryTransformer.setNamespaceDeclarationEnabled(true);

            GeoServer config = mapContext.getRequest().getWMS().getGeoServer();
            geometryTransformer.setNumDecimals(config.getGlobal().getNumDecimals());

            geometryTranslator =
                (KMLGeometryTransformer.KMLGeometryTranslator)
                geometryTransformer.createTranslator(contentHandler, mapContext);
        }
View Full Code Here

Examples of org.geoserver.config.GeoServer

       
        //this is a dummy wrapper around our 'request' object so that the new Dispatcher will accept it.
        Service serviceDesc = new Service("wms", null, null, Collections.EMPTY_LIST);
        Operation opDescriptor = new Operation("",serviceDesc,null, new Object[] { gfreq });
       
        final GeoServer gs = wmsConfig.getGeoServer();
        GML2OutputFormat format = new GML2OutputFormat(gs);
        format.write(features, out, opDescriptor);
    }
View Full Code Here

Examples of org.geoserver.config.GeoServer

        this.filterIsEnabled = Boolean.valueOf(enabledInitParam).booleanValue();
        if (filterIsEnabled) {
            final String mimeTypesInitParam = filterConfig.getInitParameter(MIME_TYPES_INIT_PARAM);

            GeoServer geoServerConfig = GeoServerExtensions.bean(GeoServer.class);
            if (geoServerConfig == null) {
                throw new ServletException("No " + GeoServer.class.getName()
                        + " found, the system is either not properly "
                        + "configured or the method to get to the GeoServer "
                        + "config instance have changed!");
            }
            geoServer = geoServerConfig.getGlobal();

            if (geoServer == null) {
                throw new ServletException(
                        "No GeoServerInfo instance found. Needed to look for the proxy base URL");
            }
View Full Code Here

Examples of org.geoserver.config.GeoServer

    }

    public void testInit() throws ServletException {
        final String proxyBaseUrl = "https://localhost/geoserver/tools";

        GeoServer geoserver = getMockGeoServer(proxyBaseUrl);
        String mimeTypesInitParam = "*wrong*expression*";

        try {
            ReverseProxyFilter.parsePatterns(geoserver.getGlobal(), mimeTypesInitParam);
            fail("expected ServletException with an illegal regular expression to match mime types");
        } catch (ServletException e) {
            assertTrue(true);
        }

        mimeTypesInitParam = DEFAULT_MIME_TYPES_REGEX;

        ReverseProxyFilter.parsePatterns(geoserver.getGlobal(), mimeTypesInitParam);
    }
View Full Code Here

Examples of org.geoserver.config.GeoServer

    private String testDoFilter(final String proxyBaseUrl, final String requestBaseUrl,
            final String requestResource, final String content, final String contentType,
            final boolean filterIsEnabled) throws MalformedURLException, ServletException,
            IOException {

        GeoServer mockGeoServer = getMockGeoServer(proxyBaseUrl);

        ApplicationContextMock context = new ApplicationContextMock();
        context.putBean(mockGeoServer);

        GeoServerExtensions ext = new GeoServerExtensions();
View Full Code Here

Examples of org.geoserver.config.GeoServer

*
*/
public class GeoServerHomePage extends GeoServerBasePage {

    public GeoServerHomePage() {
        GeoServer gs = getGeoServer();
        ContactInfo contact = gs.getGlobal().getContact();

        //add some contact info
        add(new ExternalLink("contactURL", contact.getOnlineResource())
            .add( new Label("contactName", contact.getContactOrganization())));
        {
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.