Examples of GeoServer


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

        form.add(new TextField<Integer>("featureTypeCacheSize").add(new MinimumValidator<Integer>(0)));
       
        Button submit = new Button("submit", new StringResourceModel("submit", this, null)) {
            @Override
            public void onSubmit() {
                GeoServer gs = getGeoServer();
                gs.save( (GeoServerInfo) globalInfoModel.getObject() );
                gs.save( (LoggingInfo) loggingInfoModel.getObject() );
                setResponsePage(GeoServerHomePage.class);
            }
        };
        form.add(submit);
       
View Full Code Here

Examples of org.geoserver.config.GeoServer

                MockData.LAKES.getLocalPart());
        assertEquals("foo", lakes.getTitle());
    }
   
    public void testConfigureFeatureTypeCacheSize() {
        GeoServer gs = getGeoServer();
        GeoServerInfo global = gs.getGlobal();
        global.setFeatureTypeCacheSize(200);
        gs.save(global);

        Catalog catalog = getCatalog();
        assertEquals(200, catalog.getResourcePool().featureTypeCache.maxSize());
    }
View Full Code Here

Examples of org.geoserver.config.GeoServer

        form.add(imageIOCacheThreshold);
               
        Button submit = new Button("submit", new StringResourceModel("submit", this, null)) {
            @Override
            public void onSubmit() {
                GeoServer gs = (GeoServer) geoServerModel.getObject();
                gs.getGlobal().setCoverageAccess( (CoverageAccessInfo)coverageModel.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

    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

Examples of org.geoserver.config.GeoServer

     *
     * @throws Exception
     */
    @SuppressWarnings("unchecked")
    public void testProxyBaseURL() throws Exception {
        GeoServer gs = getGeoServer();
        try {
            GeoServerInfo info = gs.getGlobal();
            info.setProxyBaseUrl("http://myhost:9999/gs");
            gs.save(info);

            MapLayer mapLayer = createMapLayer(MockData.POINTS, "Bridge");
            FeatureSource<SimpleFeatureType, SimpleFeature> featureSource;
            featureSource = (FeatureSource<SimpleFeatureType, SimpleFeature>) mapLayer
                    .getFeatureSource();
            int nfeatures = featureSource.getFeatures().size();

            WMSMapContext mapContext = new WMSMapContext(createGetMapRequest(MockData.POINTS));
            Document document;

            try {
                mapContext.addLayer(mapLayer);
                KMLVectorTransformer transformer = new KMLVectorTransformer(getWMS(), mapContext,
                        mapLayer);
                transformer.setIndentation(2);

                document = WMSTestSupport.transform(featureSource.getFeatures(), transformer);
                // print(document);
            } finally {
                mapContext.dispose();
            }
            // make sure we are using the proxy base URL
            XMLAssert.assertXpathEvaluatesTo("http://myhost:9999/gs/styles/bridge.png",
                    "//Style/IconStyle/Icon/href", document);
        } finally {
            GeoServerInfo info = gs.getGlobal();
            info.setProxyBaseUrl(null);
            gs.save(info);
        }
    }
View Full Code Here

Examples of org.vfny.geoserver.global.GeoServer

        // And allways remember to release locks if we are failing:
        // - if we fail to aquire all the locks we will need to fail and
        //   itterate through the the FeatureSources to release the locks
        //
        WFS wfs = request.getWFS();
        GeoServer config = wfs.getGeoServer();
        Data catalog = wfs.getData();
        FeatureTypeInfo meta = null;
        NameSpaceInfo namespace;
        Query query;
View Full Code Here

Examples of org.vfny.geoserver.global.GeoServer

        throws IOException {
        this.compressOutput = formatNameCompressed.equalsIgnoreCase(outputFormat);
        this.results = results;

        GetNearestRequest request = results.getRequest();
        GeoServer config = request.getWFS().getGeoServer();
        transformer = new FeatureTransformer();

        FeatureTypeNamespaces ftNames = transformer.getFeatureTypeNamespaces();
        int maxFeatures = 999;
        int serverMaxFeatures = config.getMaxFeatures();

        if (maxFeatures > serverMaxFeatures) {
            maxFeatures = serverMaxFeatures;
        }

        StringBuffer typeNames = new StringBuffer();
        FeatureResults features;
        FeatureTypeInfo meta = null;
        NameSpaceInfo namespace;
        int resCount = results.getResultsetsCount();
        Map ftNamespaces = new HashMap(resCount);

        for (int resIndex = 0; resIndex < resCount; resIndex++) {
            features = results.getFeatures(resIndex);
            meta = results.getTypeInfo(resIndex);
            namespace = meta.getDataStoreInfo().getNameSpace();

            String uri = namespace.getUri();
            ftNames.declareNamespace(features.getSchema(), namespace.getPrefix(), uri);

            if (ftNamespaces.containsKey(uri)) {
                String location = (String) ftNamespaces.get(uri);
                ftNamespaces.put(uri, location + "," + meta.getName());
            } else {
                ftNamespaces.put(uri,
                    request.getBaseUrl() + "wfs/" + "DescribeFeatureType?typeName="
                    + meta.getName());
            }
        }

        System.setProperty("javax.xml.transform.TransformerFactory",
            "org.apache.xalan.processor.TransformerFactoryImpl");

        transformer.setIndentation(config.isVerbose() ? INDENT_SIZE : (NO_FORMATTING));
        transformer.setNumDecimals(config.getNumDecimals());
        transformer.setFeatureBounding(request.getWFS().isFeatureBounding());
        transformer.setEncoding(request.getWFS().getGeoServer().getCharSet());

        String wfsSchemaLoc = request.getSchemaBaseUrl() + "wfs/1.0.0/WFS-basic.xsd";
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.