Package org.vfny.geoserver.wcs.requests

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


            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

TOP

Related Classes of org.vfny.geoserver.wcs.requests.DescribeRequest

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.