Examples of GetCapabilitiesRequest


Examples of org.geoserver.wms.GetCapabilitiesRequest

    @SuppressWarnings("unchecked")
    @Test
    public void testNamespace() throws Exception {
        kvp.put("namespace", "og");
        GetCapabilitiesRequest read = reader.read(reader.createRequest(), kvp, rawKvp);
        assertNotNull(read);
        assertEquals("og", read.getNamespace());
    }
View Full Code Here

Examples of org.geoserver.wms.GetCapabilitiesRequest

    @SuppressWarnings("unchecked")
    @Test
    public void testUpdateSequence() throws Exception {
        kvp.put("updateSequence", "1000");
        GetCapabilitiesRequest read = reader.read(reader.createRequest(), kvp, rawKvp);
        assertNotNull(read);
        assertEquals("1000", read.getUpdateSequence());
    }
View Full Code Here

Examples of org.geoserver.wms.GetCapabilitiesRequest

        geosConfig.setCatalog(catalog);

        wmsConfig = new WMS(geosConfig);
        wmsConfig.setApplicationContext(applicationContext);

        req = new GetCapabilitiesRequest();
        req.setBaseUrl(baseUrl);

        getTestData().copyTo(
                getClass().getResourceAsStream("/legendURL/BasicPolygons.png"),
                LegendSampleImpl.LEGEND_SAMPLES_FOLDER + "/BasicPolygons.png");
View Full Code Here

Examples of org.geoserver.wms.GetCapabilitiesRequest

        catalog = new CatalogImpl();
        geosConfig.setCatalog(catalog);

        wmsConfig = new WMS(geosConfig);

        req = new GetCapabilitiesRequest();
        req.setBaseUrl(baseUrl);

        Map<String, String> namespaces = new HashMap<String, String>();
        namespaces.put("xlink", "http://www.w3.org/1999/xlink");
        XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
View Full Code Here

Examples of org.geoserver.wms.GetCapabilitiesRequest

    @Override
    public void write(final Object value, final OutputStream output, final Operation operation)
            throws IOException, ServiceException {

        final GetCapabilitiesTransformer transformer = (GetCapabilitiesTransformer) value;
        final GetCapabilitiesRequest request = (GetCapabilitiesRequest) operation.getParameters()[0];

        final String internalDTDDeclaration = getInternalDTDDeclaration(request);

        if (internalDTDDeclaration == null) {
            // transform directly to output
View Full Code Here

Examples of org.geoserver.wms.GetCapabilitiesRequest

     */
    @SuppressWarnings("rawtypes")
    @Override
    public Object read(Object request, Reader reader, Map kvp) throws Exception {
        // instantiante parsers and content handlers
        GetCapabilitiesRequest req = new GetCapabilitiesRequest();
        CapabilitiesHandler currentRequest = new CapabilitiesHandler(req);

        // read in XML file and parse to content handler
        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
View Full Code Here

Examples of org.geoserver.wms.GetCapabilitiesRequest

    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
    @Override
    public GetCapabilitiesRequest read(Object req, Map kvp, Map rawKvp) throws Exception {
        GetCapabilitiesRequest request = (GetCapabilitiesRequest) super.read(req, kvp, rawKvp);
        request.setRawKvp(rawKvp);

        String version = request.getVersion();
        if (null == version || version.length() == 0) {
            version = (String) rawKvp.get("WMTVER");
        }
       
        //kind of a silly check but the cite tests put some rules about using WMTVER vs VERSION
        // depending on which one shows up as a kvp parameter first in order, which actualy
        // violates http get, but we do a check here to throw out one if it does not match
        // an available wms version
        if (rawKvp.containsKey("VERSION") && rawKvp.containsKey("WMTVER")) {
            String ver = (String) rawKvp.get("VERSION");
            String wmtver = (String) rawKvp.get("WMTVER");
           
            if (WMS.version(ver, true) != null && WMS.version(wmtver, true) == null) {
                version = ver;
            }
            else if (WMS.version(ver, true) == null && WMS.version(wmtver, true) != null) {
                version = wmtver;
            }
        }
        // version negotation
        Version requestedVersion = WMS.version(version);
        Version negotiatedVersion = wms.negotiateVersion(requestedVersion);
        request.setVersion(negotiatedVersion.toString());
       
        return request;
    }
View Full Code Here

Examples of org.geotools.data.ows.GetCapabilitiesRequest

    public void testGetVersion() {
        assertEquals(spec.getVersion(), "1.0.0");
    }
   
    public void testCreateGetCapabilitiesRequest() throws Exception {
        GetCapabilitiesRequest request = spec.createGetCapabilitiesRequest(server);
       
        Properties properties = new Properties();
       
        StringTokenizer tokenizer = new StringTokenizer(request.getFinalURL()
        .getQuery(), "&");
       
        while (tokenizer.hasMoreTokens()) {
            String token = tokenizer.nextToken();
            String[] param = token.split("=");
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.