Package net.opengis.wcs20

Examples of net.opengis.wcs20.DescribeCoverageType


        GetCapabilitiesType caps = parameter(operation, GetCapabilitiesType.class);
        if (caps != null) {
            return;
        }
       
        DescribeCoverageType dcov = parameter(operation, DescribeCoverageType.class);
        if (dcov != null) {
            qualifyNames(dcov.getCoverage(), ws);
            return;
        }
           
        GetCoverageType gcov = parameter(operation, GetCoverageType.class);
        if (gcov != null) {
View Full Code Here


        assertEquals("http://acme.org:foo", data.getLayers().get(0));
    }
   
    @Test
    public void testWCS10DescribeCoverage() throws Exception {
        DescribeCoverageType dc = Wcs10Factory.eINSTANCE.createDescribeCoverageType();
        dc.getCoverage().add("acme:foo");
        dc.getCoverage().add("acme:bar");
       
        callback.operationDispatched(new Request(), op("DescribeCoverage", "WCS", "1.0.0", dc));
        assertEquals("acme:foo", data.getLayers().get(0));
        assertEquals("acme:bar", data.getLayers().get(1));
    }
View Full Code Here

                + "  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
                + "  xsi:schemaLocation=\"http://www.opengis.net/wcs schemas/wcs/1.0.0/describeCoverage.xsd\">"
                + "    <Coverage>nurc:Pk50095</Coverage>    " + "</DescribeCoverage>";

        // smoke test, we only try out a very basic request
        DescribeCoverageType cap = (DescribeCoverageType) reader.read(null, new StringReader(
                request), null);
        assertEquals("WCS", cap.getService());
        assertEquals("1.0.0", cap.getVersion());
        assertEquals(1, cap.getCoverage().size());
        assertEquals("nurc:Pk50095", cap.getCoverage().get(0));
    }
View Full Code Here

    public Object read(Object request, Map kvp, Map rawKvp) throws Exception {
        // let super do its thing
        request = super.read(request, kvp, rawKvp);

        DescribeCoverageType describeCoverage = (DescribeCoverageType) request;
        if (describeCoverage.getCoverage() == null || describeCoverage.getCoverage().size() == 0) {
            throw new WcsException("Required paramer, coverage, missing",
                    WcsExceptionCode.MissingParameterValue, "coverage");
        }
        // if not specified, throw a resounding exception (by spec)
        if (!describeCoverage.isSetVersion())
            throw new WcsException("Version has not been specified",
                    WcsExceptionCode.MissingParameterValue, "version");

        return request;
    }
View Full Code Here

        GetCapabilitiesType caps = parameter(operation, GetCapabilitiesType.class);
        if (caps != null) {
            return;
        }
       
        DescribeCoverageType dcov = parameter(operation, DescribeCoverageType.class);
        if (dcov != null) {
            qualifyNames(dcov.getCoverage(), ws);
            return;
        }
           
        GetCoverageType gcov = parameter(operation, GetCoverageType.class);
        if (gcov != null) {
View Full Code Here

        assertEquals("http://acme.org:foo", data.getResources().get(0));
    }
   
    @Test
    public void testWCS10DescribeCoverage() throws Exception {
        DescribeCoverageType dc = Wcs10Factory.eINSTANCE.createDescribeCoverageType();
        dc.getCoverage().add("acme:foo");
        dc.getCoverage().add("acme:bar");
       
        callback.operationDispatched(new Request(), op("DescribeCoverage", "WCS", "1.0.0", dc));
        assertEquals("acme:foo", data.getResources().get(0));
        assertEquals("acme:bar", data.getResources().get(1));
    }
View Full Code Here

                + "  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
                + "  xsi:schemaLocation=\"http://www.opengis.net/wcs schemas/wcs/1.0.0/describeCoverage.xsd\">"
                + "    <Coverage>nurc:Pk50095</Coverage>    " + "</DescribeCoverage>";

        // smoke test, we only try out a very basic request
        DescribeCoverageType cap = (DescribeCoverageType) reader.read(null, new StringReader(
                request), null);
        assertEquals("WCS", cap.getService());
        assertEquals("1.0.0", cap.getVersion());
        assertEquals(1, cap.getCoverage().size());
        assertEquals("nurc:Pk50095", cap.getCoverage().get(0));
    }
View Full Code Here

    public Object read(Object request, Map kvp, Map rawKvp) throws Exception {
        // let super do its thing
        request = super.read(request, kvp, rawKvp);

        DescribeCoverageType describeCoverage = (DescribeCoverageType) request;
        // if not specified, throw a resounding exception (by spec)
        if (!describeCoverage.isSetVersion())
            throw new WcsException("Version has not been specified",
                    WcsExceptionCode.MissingParameterValue, "version");

        return request;
    }
View Full Code Here

    public Object read(Object request, Map kvp, Map rawKvp) throws Exception {
        // let super do its thing
        request = super.read(request, kvp, rawKvp);

        DescribeCoverageType describeCoverage = (DescribeCoverageType) request;
       
        // we need at least one coverage
        final String identifiersValue = (String) rawKvp.get("identifiers");
        final List identifiers = KvpUtils.readFlat(identifiersValue);
        if(identifiers == null || identifiers.size() == 0) {
            throw new WcsException("Required paramer, identifiers, missing", WcsExceptionCode.MissingParameterValue, "identifiers");
        }
       
        // all right, set into the model (note there is a mismatch between the kvp name and the
        // xml name, that's why we have to parse the identifiers by hand)
        describeCoverage.getIdentifier().addAll(identifiers);
       
       
        // if not specified, throw a resounding exception (by spec)
        if(!describeCoverage.isSetVersion())
            throw new WcsException("Version has not been specified", WcsExceptionCode.MissingParameterValue, "version");

        return request;
    }
View Full Code Here

        GetCapabilitiesType caps = parameter(operation, GetCapabilitiesType.class);
        if (caps != null) {
            return;
        }
       
        DescribeCoverageType dcov = parameter(operation, DescribeCoverageType.class);
        if (dcov != null) {
            qualifyNames(dcov.getIdentifier(), ws);
            return;
        }
           
        GetCoverageType gcov = parameter(operation, GetCoverageType.class);
        if (gcov != null) {
View Full Code Here

TOP

Related Classes of net.opengis.wcs20.DescribeCoverageType

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.