Examples of OWSExceptionCode


Examples of org.geoserver.platform.OWS20Exception.OWSExceptionCode

    private Object describeEOCoverageSet(DescribeEOCoverageSetType dcs) {
        checkService(dcs.getService());
        checkVersion(dcs.getVersion());

        if (dcs.getEoId() == null || dcs.getEoId().isEmpty()) {
            throw new OWS20Exception("Required parameter eoID missing", new OWSExceptionCode(
                    "emptyEoIdList", 404), "eoid");
        }

        // check coverages are legit
        List<String> badCoverageIds = new ArrayList<String>();

        for (String datasetId : (List<String>) dcs.getEoId()) {
            CoverageInfo layer = resourceCodec.getDatasetCoverage(datasetId);
            if (layer == null) {
                badCoverageIds.add(datasetId);
            }
        }
        if (!badCoverageIds.isEmpty()) {
            String mergedIds = StringUtils.merge(badCoverageIds);
            throw new WCS20Exception("Could not find the requested coverage(s): " + mergedIds,
                    new OWSExceptionCode("noSuchEODataset", 404), "eoid");
        }

        WCS20DescribeCoverageTransformer tx = new WCS20DescribeCoverageTransformer(
                getServiceInfo(), catalog, responseFactory, envelopeAxesMapper, mimemapper);
        return new DescribeEOCoverageSetTransformer(getServiceInfo(), resourceCodec, envelopeAxesMapper, tx);
View Full Code Here

Examples of org.geoserver.platform.OWS20Exception.OWSExceptionCode

        } else if ( exception.getCause() != null && exception.getCause() instanceof OWS20Exception) {
            ows2ex = (OWS20Exception)exception.getCause();
        } else {
            // try to infer if it's a standard exception
            String code = exception.getCode();
            OWSExceptionCode exCode = OWS20Exception.OWSExceptionCode.getByCode(code);
            if(exCode != null) {
                ows2ex = new OWS20Exception(exception.getMessage(), exception, exCode, exception.getLocator());
            } else {
                ows2ex = new OWS20Exception(exception.getMessage(), exception, OWSExceptionCode.NoApplicableCode, exception.getLocator());
            }
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.