Package net.opengis.wfs

Examples of net.opengis.wfs.WFSCapabilitiesType


    }

    @Test
    public void testParseGetCapabilities() throws Exception {
        Parser parser = new Parser(configuration);
        WFSCapabilitiesType caps = (WFSCapabilitiesType) parser.parse(getClass()
                .getResourceAsStream("geoserver-GetCapabilities.xml"));

        assertNotNull(caps);
        assertEquals("1.1.0", caps.getVersion());

        assertServiceIdentification(caps);
        assertOperationsMetadata(caps);
        assertFeatureTypeList(caps);
        assertFilterCapabilities(caps);
View Full Code Here


     * TODO: fix me
     * @throws Exception
     */
    public void _testParseGetCapabilitiesDeegree() throws Exception {
        Parser parser = new Parser(configuration);
        WFSCapabilitiesType caps = (WFSCapabilitiesType) parser.parse(getClass()
                .getResourceAsStream("deegree-GetCapabilities.xml"));

        assertNotNull(caps);
        assertEquals("1.1.0", caps.getVersion());

        //assertServiceIdentification(caps);
        assertOperationsMetadataDeeGree(caps);
        //assertFeatureTypeList(caps);
        //assertFilterCapabilities(caps);
View Full Code Here

    public void testParse() throws Exception {
        String xml = "<WFS_Capabilities version=\"1.1.0\">" + "<FeatureTypeList/>"
                + "</WFS_Capabilities>";
        buildDocument(xml);

        WFSCapabilitiesType caps = (WFSCapabilitiesType) parse();
        assertEquals("1.1.0", caps.getVersion());

        assertNotNull(caps.getFeatureTypeList());
    }
View Full Code Here

        assertNotNull(caps.getFeatureTypeList());
    }

    public void testEncode() throws Exception {
        WFSCapabilitiesType caps = factory.createWFSCapabilitiesType();
        caps.setVersion("1.1.0");
        {
            FeatureTypeListType ftl = factory.createFeatureTypeListType();
            caps.setFeatureTypeList(ftl);
        }
        {
            GMLObjectTypeListType servesGmlObj = factory.createGMLObjectTypeListType();
            GMLObjectTypeType gmlObj = factory.createGMLObjectTypeType();
            gmlObj.setAbstract("abstract");
            gmlObj.setName(GML._Feature);
            gmlObj.setTitle("title");
            servesGmlObj.getGMLObjectType().add(gmlObj);
            caps.setServesGMLObjectTypeList(servesGmlObj);
        }
        {
            GMLObjectTypeListType supportsGmlObj = factory.createGMLObjectTypeListType();
            GMLObjectTypeType type = factory.createGMLObjectTypeType();
            type.setName(GML._Feature);
            supportsGmlObj.getGMLObjectType().add(type);
            caps.setSupportsGMLObjectTypeList(supportsGmlObj);
        }
        FilterCapabilities filterCaps = createTestFilterCapabilities();
        caps.setFilterCapabilities(filterCaps);

        final Document dom = encode(caps, WFS.WFS_Capabilities);
        final Element root = dom.getDocumentElement();

        assertName(WFS.WFS_Capabilities, root);
View Full Code Here

                : WFS_1_1_CONFIGURATION;
    }

    @Override
    public void setCapabilities(WFSGetCapabilities capabilities) {
        WFSCapabilitiesType caps = (WFSCapabilitiesType) capabilities.getParsedCapabilities();
        this.capabilities = caps;
        String version = caps.getVersion();
        try {
            this.serviceVersion = Versions.find(version);
        } catch (IllegalArgumentException e) {
            LOGGER.warning("Capabilities document didn't advertise a supported version (" + version
                    + "). Defaulting to " + this.serviceVersion);
View Full Code Here

    }

    public static WFSGetCapabilities create(EObject capabilities, Document rawDocument) {
        if (capabilities instanceof WFSCapabilitiesType) {

            WFSCapabilitiesType caps = (WFSCapabilitiesType) capabilities;
            String version = rawDocument.getDocumentElement().getAttribute("version");
            if ("1.0.0".equals(version)) {
                return new WFS_1_0_0(caps, rawDocument);
            }
            if ("1.1.0".equals(version)) {
View Full Code Here

        Parser parser = new Parser(configuration);
        Object parsed = parser.parse(new ByteArrayInputStream(xml.getBytes()));
        assertNotNull(parsed);
        assertTrue(parsed.getClass().getName(), parsed instanceof WFSCapabilitiesType);
        WFSCapabilitiesType caps = (WFSCapabilitiesType) parsed;

        assertNotNull(caps);
        assertEquals("1.0.0", caps.getVersion());
    }
View Full Code Here

        Object parsed = parser.parse(getClass().getResourceAsStream(
                "geoserver-GetCapabilities.xml"));

        assertNotNull(parsed);
        assertTrue(parsed.getClass().getName(), parsed instanceof WFSCapabilitiesType);
        WFSCapabilitiesType caps = (WFSCapabilitiesType) parsed;

        assertNotNull(caps);
        assertEquals("1.0.0", caps.getVersion());

        assertServiceIdentification(caps);
        assertOperationsMetadata(caps);
        assertFeatureTypeList(caps);
        assertFilterCapabilities(caps);
View Full Code Here

     *
     * @throws Exception
     */
    public void _testParseGetCapabilitiesDeegree() throws Exception {
        Parser parser = new Parser(configuration);
        WFSCapabilitiesType caps = (WFSCapabilitiesType) parser.parse(getClass()
                .getResourceAsStream("deegree-GetCapabilities.xml"));

        assertNotNull(caps);
        assertEquals("1.0.0", caps.getVersion());

        // assertServiceIdentification(caps);
        assertOperationsMetadataDeeGree(caps);
        // assertFeatureTypeList(caps);
        // assertFilterCapabilities(caps);
View Full Code Here

TOP

Related Classes of net.opengis.wfs.WFSCapabilitiesType

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.