Package net.opengis.wfs

Examples of net.opengis.wfs.GetCapabilitiesType


     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        GetCapabilitiesType getCapabilities = wfsFactory.createGetCapabilitiesType();
        getCapabilities.setAcceptVersions(owsFactory.createAcceptVersionsType());

        WFSBindingUtils.service(getCapabilities, node);

        getCapabilities.getAcceptVersions().getVersion().add(node.getAttributeValue("version"));

        return getCapabilities;
    }
View Full Code Here


        if (kvp.containsKey("version")) {
            AcceptVersionsType acceptVersions = Ows10Factory.eINSTANCE
                .createAcceptVersionsType();
            acceptVersions.getVersion().add(kvp.get("version"));

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

        return request;
    }
View Full Code Here

     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        net.opengis.ows10.GetCapabilitiesType owsGetCapabilities = (net.opengis.ows10.GetCapabilitiesType) value;
        GetCapabilitiesType getCapabilities = wfsfactory.createGetCapabilitiesType();

        getCapabilities.setAcceptFormats(owsGetCapabilities.getAcceptFormats());
        getCapabilities.setAcceptVersions(owsGetCapabilities.getAcceptVersions());
        getCapabilities.setSections(owsGetCapabilities.getSections());
        getCapabilities.setUpdateSequence(owsGetCapabilities.getUpdateSequence());

        if (node.hasAttribute("service")) {
            getCapabilities.setService((String) node.getAttributeValue("service"));
        }

        return getCapabilities;
    }
View Full Code Here

        return "GetCapabilities".equalsIgnoreCase(operation.getId()) &&
                operation.getService().getId().equals("wfs");
    }

    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

        owsFactory = Ows10Factory.eINSTANCE;
    }

    public void test0() throws Exception {
        // test when provided and accepted match up
        GetCapabilitiesType request = factory.createGetCapabilitiesType();
        request.setService("WFS");
        request.setAcceptVersions(owsFactory.createAcceptVersionsType());
        request.getAcceptVersions().getVersion().add("1.0.0");
        request.getAcceptVersions().getVersion().add("1.1.0");

        TransformerBase tx = getCaps.run(request);
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_1);
    }
View Full Code Here

        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_1);
    }

    public void test1() throws Exception {
        // test accepted only 1.0
        GetCapabilitiesType request = factory.createGetCapabilitiesType();
        request.setService("WFS");
        request.setAcceptVersions(owsFactory.createAcceptVersionsType());
        request.getAcceptVersions().getVersion().add("1.0.0");

        TransformerBase tx = getCaps.run(request);
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_0);
    }
View Full Code Here

        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_0);
    }

    public void test2() throws Exception {
        // test accepted only 1.1
        GetCapabilitiesType request = factory.createGetCapabilitiesType();
        request.setService("WFS");
        request.setAcceptVersions(owsFactory.createAcceptVersionsType());
        request.getAcceptVersions().getVersion().add("1.1.0");

        TransformerBase tx = getCaps.run(request);
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_1);
    }
View Full Code Here

    }

    public void test5() throws Exception {
        // test accepted = 0.0.0

        GetCapabilitiesType request = factory.createGetCapabilitiesType();
        request.setService("WFS");
        request.setAcceptVersions(owsFactory.createAcceptVersionsType());
        request.getAcceptVersions().getVersion().add("0.0.0");

        TransformerBase tx = getCaps.run(request);
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_0);
    }
View Full Code Here

    }

    public void test6() throws Exception {
        // test accepted = 1.1.1

        GetCapabilitiesType request = factory.createGetCapabilitiesType();
        request.setService("WFS");
        request.setAcceptVersions(owsFactory.createAcceptVersionsType());
        request.getAcceptVersions().getVersion().add("1.1.1");

        TransformerBase tx = getCaps.run(request);
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_1);
    }
View Full Code Here

        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_1);
    }

    public void test7() throws Exception {
        // test accepted = 1.0.5
        GetCapabilitiesType request = factory.createGetCapabilitiesType();
        request.setService("WFS");
        request.setAcceptVersions(owsFactory.createAcceptVersionsType());
        request.getAcceptVersions().getVersion().add("1.0.5");

        TransformerBase tx = getCaps.run(request);
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_0);
    }
View Full Code Here

TOP

Related Classes of net.opengis.wfs.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.