Examples of DescribeRequest


Examples of org.vfny.geoserver.wcs.requests.DescribeRequest

     * @return DescribeRequest request object.
     * @throws WcsException
     */
    public Request getRequest(HttpServletRequest request)
        throws WcsException {
        DescribeRequest currentRequest = new DescribeRequest((WCSInfo) serviceConfig);

        if (keyExists("SERVICE")) {
            final String service = getValue("SERVICE");

            if (service.trim().toUpperCase().startsWith("WCS")) {
                currentRequest.setService(service);
            } else {
                throw new WcsException("SERVICE parameter is wrong.");
            }
        } else {
            throw new WcsException("SERVICE parameter is mandatory.");
        }

        if (keyExists("VERSION")) {
            final String version = getValue("VERSION");

            if (version.equals("1.0.0")) {
                currentRequest.setVersion(version);
            } else {
                throw new WcsException("VERSION parameter is wrong.");
            }
        } else {
            throw new WcsException("VERSION parameter is mandatory.");
        }

        if (keyExists("REQUEST")) {
            final String requestType = getValue("REQUEST");

            if (requestType.equalsIgnoreCase("DescribeCoverage")) {
                currentRequest.setRequest(requestType);
            } else {
                throw new WcsException("REQUEST parameter is wrong.");
            }
        } else {
            throw new WcsException("REQUEST parameter is mandatory.");
        }

        currentRequest.setHttpServletRequest(request);
        currentRequest.setVersion(getValue("VERSION"));
        currentRequest.setRequest(getValue("REQUEST"));
        currentRequest.setOutputFormat(getValue("OUTPUTFORMAT"));
        currentRequest.setCoverages(readFlat(getValue("COVERAGE"), INNER_DELIMETER));

        return currentRequest;
    }
View Full Code Here

Examples of org.vfny.geoserver.wcs.requests.DescribeRequest

            throw new WcsException(new StringBuffer(
                    "illegal request type, expected DescribeRequest, got ").append(request)
                                                                                                           .toString());
        }

        DescribeRequest wcsRequest = (DescribeRequest) request;
        this.request = wcsRequest;
        LOGGER.finer("processing describe request" + wcsRequest);

        String outputFormat = wcsRequest.getOutputFormat();

        if (!outputFormat.equalsIgnoreCase("XMLSCHEMA")) {
            throw new WcsException(new StringBuffer("output format: ").append(outputFormat)
                                                                      .append(" not ")
                                                                      .append("supported by geoserver")
View Full Code Here

Examples of org.vfny.geoserver.wfs.requests.DescribeRequest

            throw new WfsException(
                "illegal request type, expected DescribeRequest, got "
                + request);
        }

        DescribeRequest wfsRequest = (DescribeRequest) request;
        this.request = wfsRequest;
        LOGGER.finer("processing describe request" + wfsRequest);

        String outputFormat = wfsRequest.getOutputFormat();

        if (!outputFormat.equalsIgnoreCase("XMLSCHEMA")) {
            throw new WfsException("output format: " + outputFormat + " not "
                + "supported by geoserver");
        }
View Full Code Here

Examples of org.vfny.geoserver.wfs.requests.DescribeRequest

        return suite;
    }

    public void setUp() {
        baseRequest[0] = new DescribeRequest();
        baseRequest[0].addFeatureType("rail");
        baseRequest[0].setVersion("0.0.15");

        baseRequest[1] = new DescribeRequest();
        baseRequest[1].addFeatureType("rail");
        baseRequest[1].addFeatureType("roads");
        baseRequest[1].setVersion("0.0.15");
    }
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.