Package org.geoserver.ows

Examples of org.geoserver.ows.Request



    private String retrieveCallerIpAddress() {

        // is this an OWS request
        Request owsRequest = Dispatcher.REQUEST.get();
        if(owsRequest != null ) {
            HttpServletRequest httpReq = owsRequest.getHttpRequest();
            String sourceAddress = getSourceAddress(httpReq);
            if(sourceAddress == null) {
                LOGGER.log(Level.WARNING, "Could not retrieve source address from OWSRequest");
            }
            return sourceAddress;
View Full Code Here


        }

        // get info from the current request
        String service = null;
        String request = null;
        Request owsRequest = Dispatcher.REQUEST.get();
        if (owsRequest != null)
        {
            service = owsRequest.getService();
            request = owsRequest.getRequest();
        }

        // get the resource info
        String layer = resource.getName();
        StoreInfo store = resource.getStore();
View Full Code Here

            }
        };
       

        callback = createProxy(callback);
        callback.operationDispatched(new Request(),
            new Operation("foo", new Service("bar", null, null, null), null, null));
       
        assertEquals(Status.RUNNING, data.getStatus());
    }
View Full Code Here

        monitor.complete();
    }
   
    @Test
    public void testBasic() throws Exception {
        callback.operationDispatched(new Request(), op("foo", "bar", "1.2.3", null));
       
        assertEquals("BAR", data.getService());
        assertEquals("foo", data.getOperation());
        assertEquals("1.2.3", data.getOwsVersion());
    }
View Full Code Here

        DescribeFeatureTypeType dft = WfsFactory.eINSTANCE.createDescribeFeatureTypeType();
        dft.getTypeName().add(new QName("http://acme.org", "foo", "acme"));
        dft.getTypeName().add(new QName("http://acme.org", "bar", "acme"));
       
        Operation op = op("DescribeFeatureType", "WFS", "1.0.0", dft);
        callback.operationDispatched(new Request(), op);
       
        assertEquals("acme:foo", data.getResources().get(0));
        assertEquals("acme:bar", data.getResources().get(1));
    }
View Full Code Here

        q.setTypeName(Arrays.asList(new QName("http://acme.org", "bar", "acme")));
        gf.getQuery().add(q);getClass();
        q.setFilter(f2);
       
        Operation op = op("GetFeature", "WFS", "1.0.0", gf);
        callback.operationDispatched(new Request(), op);
       
        assertEquals("acme:foo", data.getResources().get(0));
        assertEquals("acme:bar", data.getResources().get(1));
        BoundingBox expected = new ReferencedEnvelope(53.73,40, -60,-95.1193,CRS.decode("EPSG:4326"));
        // xMin,yMin -95.1193,40 : xMax,yMax -60,53.73
View Full Code Here

        LockType l = WfsFactory.eINSTANCE.createLockType();
        l.setTypeName(new QName("http://acme.org", "foo", "acme"));
        lf.getLock().add(l);
       
        Operation op = op("LockFeature", "WFS", "1.0.0", lf);
        callback.operationDispatched(new Request(), op);
       
        assertEquals("acme:foo", data.getResources().get(0));
    }
View Full Code Here

        de.setTypeName(new QName("http://acme.org", "bar", "acme"));
        de.setFilter(f2);
        t.getDelete().add(de);
       
        Operation op = op("Transaction", "WFS", "1.1.0", t);
        callback.operationDispatched(new Request(), op);
       
        assertEquals("acme:foo", data.getResources().get(0));
        assertEquals("acme:bar", data.getResources().get(1));
        BoundingBox expected = new ReferencedEnvelope(53.73,40, -60,-95.1193,CRS.decode("EPSG:4326"));
        // xMin,yMin -95.1193,40 : xMax,yMax -60,53.73       
View Full Code Here

        replay(f);

        ie.getFeature().add(f);

        Operation op = op("Transaction", "WFS", "1.1.0", t);
        callback.operationDispatched(new Request(), op);
       
        assertEquals("acme:foo", data.getResources().get(0));
       
        // xMin,yMin -95.1193,40 : xMax,yMax -60,53.73       
        BBoxAsserts.assertEqualsBbox(expected, data.getBbox(), 0.01);
View Full Code Here

        Envelope env = new Envelope(100,110,70,80);
        CoordinateReferenceSystem crs = CRS.decode("EPSG:4326", true);
        CoordinateReferenceSystem logCrs = CRS.decode("EPSG:4326");
        gm.setBbox(env);
        gm.setCrs(crs);
        callback.operationDispatched(new Request(), op("GetMap", "WMS", "1.1.1", gm));
       
        assertEquals("acme:foo", data.getResources().get(0));
        BBoxAsserts.assertEqualsBbox(new ReferencedEnvelope(env,crs).toBounds(logCrs), data.getBbox(), 0.1);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.ows.Request

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.