Package net.opengis.wcs11

Examples of net.opengis.wcs11.GetCapabilitiesType


   
    public void testAxisSingleKey() throws Exception {
        RangeSubsetType rs = (RangeSubsetType) parser.parse("radiance[bands[Red]]");
        assertNotNull(rs);
        assertEquals(1, rs.getFieldSubset().size());
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        assertEquals("radiance", field.getIdentifier().getValue());
        assertEquals(1, field.getAxisSubset().size());
        AxisSubsetType axis = (AxisSubsetType) field.getAxisSubset().get(0);
        assertEquals("bands", axis.getIdentifier());
        List keys = axis.getKey();
        assertEquals(1, keys.size());
        assertEquals("Red", keys.get(0));
    }
View Full Code Here


   
    public void testAxisKeys() throws Exception {
        RangeSubsetType rs = (RangeSubsetType) parser.parse("radiance[bands[Red,Green,Blue]]");
        assertNotNull(rs);
        assertEquals(1, rs.getFieldSubset().size());
        FieldSubsetType field = (FieldSubsetType) rs.getFieldSubset().get(0);
        assertEquals("radiance", field.getIdentifier().getValue());
        assertEquals(1, field.getAxisSubset().size());
        AxisSubsetType axis = (AxisSubsetType) field.getAxisSubset().get(0);
        assertEquals("bands", axis.getIdentifier());
        List keys = axis.getKey();
        assertEquals(3, keys.size());
        assertEquals("Red", keys.get(0));
        assertEquals("Green", keys.get(1));
View Full Code Here

        // set the version attribute on the request
        if (kvp.containsKey("version")) {
            AcceptVersionsType acceptVersions = Ows11Factory.eINSTANCE.createAcceptVersionsType();
            acceptVersions.getVersion().add(kvp.get("version"));

            GetCapabilitiesType getCapabilities = (GetCapabilitiesType) request;
            getCapabilities.setAcceptVersions(acceptVersions);
        }

        return request;
    }
View Full Code Here

                (operation.getService().getVersion().toString().equals("1.1.0") ||
                        operation.getService().getVersion().toString().equals("1.1.1"));
    }

    public String getMimeType(Object value, Operation operation) {
        GetCapabilitiesType request = (GetCapabilitiesType) OwsUtils.parameter(operation
                .getParameters(), GetCapabilitiesType.class);

        if ((request != null) && (request.getAcceptFormats() != null)) {
            //look for an accepted format
            List formats = request.getAcceptFormats().getOutputFormat();

            for (Iterator f = formats.iterator(); f.hasNext();) {
                String format = (String) f.next();

                if (format.endsWith("/xml")) {
View Full Code Here

    }

    @Override
    protected void qualifyRequest(WorkspaceInfo ws, LayerInfo l, Operation operation, Request request) {
     
        GetCapabilitiesType caps = parameter(operation, GetCapabilitiesType.class);
        if (caps != null) {
            return;
        }
       
        DescribeCoverageType dcov = parameter(operation, DescribeCoverageType.class);
View Full Code Here

                + "<wcs:GetCapabilities service=\"WCS\" "
                + "xmlns:ows=\"http://www.opengis.net/ows/1.1\" "
                + "xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\" "
                + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>";
        // smoke test, we only try out a very basic request
        GetCapabilitiesType cap = (GetCapabilitiesType) reader.read(null,
                new StringReader(request), null);
        assertEquals("WCS", cap.getService());
    }
View Full Code Here

                "<ows:AcceptFormats>" + //
                "  <ows:OutputFormat>text/xml</ows:OutputFormat>" + //
                "</ows:AcceptFormats>" + //
                "</wcs:GetCapabilities>";
//        System.out.println(request);
        GetCapabilitiesType cap = (GetCapabilitiesType) reader.read(null,
                new StringReader(request), null);
        assertEquals("WCS", cap.getService());
        assertEquals(1, cap.getAcceptVersions().getVersion().size());
        assertEquals("1.0.0", (String) cap.getAcceptVersions().getVersion().get(0));
        assertEquals(1, cap.getSections().getSection().size());
        assertEquals("Section1", (String) cap.getSections().getSection().get(0));
        assertEquals(1, cap.getAcceptFormats().getOutputFormat().size());
        assertEquals("text/xml", (String) cap.getAcceptFormats().getOutputFormat().get(0));
    }
View Full Code Here

                  operation.getService().getVersion().toString().equals(WCS20Const.V20) );
    }

    @Override
    public String getMimeType(Object value, Operation operation) {
        GetCapabilitiesType request = (GetCapabilitiesType) OwsUtils.parameter(operation
                .getParameters(), GetCapabilitiesType.class);

        if ((request != null) && (request.getAcceptFormats() != null)) {
            //look for an accepted format
            List<String> formats = request.getAcceptFormats().getOutputFormat();
            for (String format : formats) {
                if (format.endsWith("/xml")) {
                    return format;
                }
            }
View Full Code Here

                + "<wcs:GetCapabilities service=\"WCS\" "
                + "xmlns:ows=\"http://www.opengis.net/ows/1.1\" "
                + "xmlns:wcs=\"http://www.opengis.net/wcs/1.1.1\" "
                + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>";
        // smoke test, we only try out a very basic request
        GetCapabilitiesType cap = (GetCapabilitiesType) reader.read(null,
                new StringReader(request), null);
        assertEquals("WCS", cap.getService());
    }
View Full Code Here

                "<ows:AcceptFormats>" + //
                "  <ows:OutputFormat>text/xml</ows:OutputFormat>" + //
                "</ows:AcceptFormats>" + //
                "</wcs:GetCapabilities>";
        // System.out.println(request);
        GetCapabilitiesType cap = (GetCapabilitiesType) reader.read(null,
                new StringReader(request), null);
        assertEquals("WCS", cap.getService());
        assertEquals(1, cap.getAcceptVersions().getVersion().size());
        assertEquals("1.0.0", (String) cap.getAcceptVersions().getVersion().get(0));
        assertEquals(1, cap.getSections().getSection().size());
        assertEquals("Section1", (String) cap.getSections().getSection().get(0));
        assertEquals(1, cap.getAcceptFormats().getOutputFormat().size());
        assertEquals("text/xml", (String) cap.getAcceptFormats().getOutputFormat().get(0));
    }
View Full Code Here

TOP

Related Classes of net.opengis.wcs11.GetCapabilitiesType

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.