Examples of GetCapabilitiesType


Examples of net.opengis.wfs.GetCapabilitiesType

public class CapabilitiesTransformerTest extends WFSTestSupport {

    static Logger logger = org.geotools.util.logging.Logging.getLogger("org.geoserver.wfs.test");

    GetCapabilitiesType request() {
        GetCapabilitiesType type = WfsFactory.eINSTANCE.createGetCapabilitiesType();
        type.setBaseUrl("http://localhost:8080/geoserver");
        return type;
    }
View Full Code Here

Examples of net.opengis.wfs.GetCapabilitiesType

        return type;
    }

    @Test
    public void test() throws Exception {
      GetCapabilitiesType request = request();
        CapabilitiesTransformer tx = new CapabilitiesTransformer.WFS1_1(getWFS(), request.getBaseUrl(), getCatalog(), Collections.<WFSExtendedCapabilitiesProvider>emptyList());
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        tx.transform(request, output);

        InputStreamReader reader = new InputStreamReader(new ByteArrayInputStream(output
                .toByteArray()));
View Full Code Here

Examples of net.opengis.wfs.GetCapabilitiesType

    /**
     * see GEOS-2461
     */
    @Test
    public void testDefaultOutputFormat() throws Exception {
      GetCapabilitiesType request = request();
        CapabilitiesTransformer tx = new CapabilitiesTransformer.WFS1_1(getWFS(), request.getBaseUrl(), getCatalog(), Collections.<WFSExtendedCapabilitiesProvider>emptyList());
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        tx.transform(request, output);

        Document dom = super.dom(new ByteArrayInputStream(output.toByteArray()));

View Full Code Here

Examples of net.opengis.wfs.GetCapabilitiesType

     * @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

Examples of net.opengis.wfs.GetCapabilitiesType

    }

    @Test
    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(GetCapabilitiesRequest.adapt(request));
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_0);
    }
View Full Code Here

Examples of net.opengis.wfs.GetCapabilitiesType

    }

    @Test
    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(GetCapabilitiesRequest.adapt(request));
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_1);
    }
View Full Code Here

Examples of net.opengis.wfs.GetCapabilitiesType

    }

    @Test
    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(GetCapabilitiesRequest.adapt(request));
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_0);
    }
View Full Code Here

Examples of net.opengis.wfs.GetCapabilitiesType

    }

    @Test
    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(GetCapabilitiesRequest.adapt(request));
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_1);
    }
View Full Code Here

Examples of net.opengis.wfs.GetCapabilitiesType

    @Test
    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(GetCapabilitiesRequest.adapt(request));
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_0);
    }
View Full Code Here

Examples of net.opengis.wfs.GetCapabilitiesType

    @Test
    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(GetCapabilitiesRequest.adapt(request));
        assertTrue(tx instanceof CapabilitiesTransformer.WFS1_1);
    }
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.