Package org.geoserver.wcs2_0.response

Examples of org.geoserver.wcs2_0.response.WCS20CoverageMetadataProvider$Translator


            StructuredGridCoverage2DReader reader = (StructuredGridCoverage2DReader) ci.getGridCoverageReader(null, null);
            String coverageName = codec.getCoverageName(ci);
            GranuleSource source = reader.getGranules(coverageName, true);
            return source.getCount(new Query(coverageName, granuleFilter)) > 0;           
        } catch(IOException e) {
            throw new WCS20Exception("Could not determine if the coverage has the specified granule", e);
        }
    }
View Full Code Here


            Sections sections = Wcs20Factory.eINSTANCE.createSections();
            for(Object o : owsSections.getSection()) {
                String sectionName = (String) o;
                Section section = Section.get(sectionName);
                if(section == null) {
                    throw new WCS20Exception("Invalid sections value " + sectionName + ", supported values are " + Arrays.asList(Section.values()),
                            OWSExceptionCode.InvalidParameterValue, "sections");
                }
                sections.getSection().add(section);
            }
            kvp.put("sections", sections);
View Full Code Here

                badCoverageIds.add(encodedCoverageId);
            }
        }
        if(!badCoverageIds.isEmpty()) {
            String mergedIds = StringUtils.merge(badCoverageIds);
            throw new WCS20Exception("Could not find the requested coverage(s): " + mergedIds
                    , WCS20Exception.WCS20ExceptionCode.NoSuchCoverage, "coverageId");
        }

        WCSInfo wcs = getServiceInfo();
View Full Code Here

        return sa;
    }

    @Override
    protected void throwInvalidSyntaxException(Exception e) {
        WCS20Exception ex = new WCS20Exception(
                "Invalid ScaleAxes syntax, expecting a comma separate list of axisName(scale)*",
                WCS20Exception.WCS20ExceptionCode.InvalidEncodingSyntax, "scaleAxes");
        if(e != null) {
            ex.initCause(e);
        }
        throw ex;
       
    }
View Full Code Here

        return result;
    }

    protected void throwInvalidSyntaxException() {
        throw new WCS20Exception(
                "Invalid Interpolation syntax, expecting either a single interpolation value, "
                        + "or a comma separated list of axis:interpolation specs",
                WCS20Exception.WCS20ExceptionCode.InvalidEncodingSyntax, "interpolation");
    }
View Full Code Here

        return tas;
    }

    @Override
    protected void throwInvalidSyntaxException(Exception e) {
        WCS20Exception ex = new WCS20Exception(
                "Invalid ScaleSize syntax, expecting a comma separate list of axisName(size)*",
                WCS20Exception.WCS20ExceptionCode.InvalidEncodingSyntax, "scaleSize");
        if (e != null) {
            ex.initCause(e);
        }
        throw ex;

    }
View Full Code Here

        return result;
    }

    protected void throwInvalidSyntaxException() {
        throw new WCS20Exception(
                "Invalid RangeSubset syntax, expecting a list of band names or band ranges (b1:b2)",
                WCS20Exception.WCS20ExceptionCode.InvalidEncodingSyntax, "rangeSubset");
    }
View Full Code Here

        } else if (WCS20Const.V20.equals(negotiatedVersion) || WCS20Const.V201.equals(negotiatedVersion)) {
            WCS20GetCapabilitiesTransformer capsTransformer = new WCS20GetCapabilitiesTransformer(wcs.getGeoServer(), responseFactory);
            capsTransformer.setEncoding(Charset.forName((wcs.getGeoServer().getSettings().getCharset())));
            return capsTransformer;
        } else {
            throw new WCS20Exception("Internal error: Could not understand version:" + negotiatedVersion,
                    OWS20Exception.OWSExceptionCode.VersionNegotiationFailed, negotiatedVersion);
        }

    }
View Full Code Here

            String axesLabel = builder.substring(0, builder.length() - 1);
            try {
                GeneralEnvelope envelope = new GeneralEnvelope(gc2d.getEnvelope());
                handleBoundedBy(envelope, axisSwap, srsName, axesLabel, null);
            } catch (IOException ex) {
                throw new WCS20Exception(ex);
            }

            // handle domain
            builder.setLength(0);
            axesNames = GMLTransformer.this.envelopeDimensionsMapper.getAxesNames(
View Full Code Here

                }
            }

            return null;
        } catch(IOException e) {
            throw new WCS20Exception("Failed to locate the reader's " + dimensionName + " dimension descriptor", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.geoserver.wcs2_0.response.WCS20CoverageMetadataProvider$Translator

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.