Examples of GMLInfo


Examples of org.geoserver.wfs.GMLInfo

        for (PropertyDescriptor pd : complexType.getDescriptors()) {
            if (pd instanceof AttributeDescriptor) {
                AttributeDescriptor attribute = (AttributeDescriptor) pd;

                if ( filterAttributeType( attribute ) ) {
                    GMLInfo gml = getGMLConfig(gs.getService(WFSInfo.class));
                    if (gml == null || !gml.getOverrideGMLAttributes()) {
                        continue;
                    }
                }
                
                XSDElementDeclaration element = factory.createXSDElementDeclaration();
View Full Code Here

Examples of org.geoserver.wfs.GMLInfo

    }
   
    @Test
    public void testGMLAttributeMapping() throws Exception {
        WFSInfo wfs = getWFS();
        GMLInfo gml = wfs.getGML().get(WFSInfo.Version.V_11);
        gml.setOverrideGMLAttributes(false);
        getGeoServer().save(wfs);
       
        Document dom = getAsDOM("ows?service=WFS&version=2.0.0&request=DescribeFeatureType" +
                "&typename=" + getLayerId(CiteTestData.PRIMITIVEGEOFEATURE));
        assertSchema(dom, CiteTestData.PRIMITIVEGEOFEATURE);
        XMLAssert.assertXpathNotExists("//xsd:element[@name = 'name']", dom);
        XMLAssert.assertXpathNotExists("//xsd:element[@name = 'description']", dom);
       
        gml.setOverrideGMLAttributes(true);
        dom = getAsDOM("ows?service=WFS&version=2.0.0&request=DescribeFeatureType" +
                "&typename=" + getLayerId(CiteTestData.PRIMITIVEGEOFEATURE));
        assertSchema(dom, CiteTestData.PRIMITIVEGEOFEATURE);
        XMLAssert.assertXpathExists("//xsd:element[@name = 'name']", dom);
        XMLAssert.assertXpathExists("//xsd:element[@name = 'description']", dom);
View Full Code Here

Examples of org.geoserver.wfs.GMLInfo

    }
   
    void doTestSrsNameSyntax(SrsNameStyle srsNameStyle, boolean doSave) throws Exception {
        if (doSave) {
            WFSInfo wfs = getWFS();
            GMLInfo gml = wfs.getGML().get(WFSInfo.Version.V_20);
            gml.setSrsNameStyle(srsNameStyle);
            getGeoServer().save(wfs);
        }
   
        String q = "wfs?request=getfeature&service=wfs&version=2.0.0&typenames=cgf:Points";
        Document d = getAsDOM(q);
View Full Code Here

Examples of org.geoserver.wfs.GMLInfo

    }
   
    @Test
    public void testGMLAttributeMapping() throws Exception {
        WFSInfo wfs = getWFS();
        GMLInfo gml = wfs.getGML().get(WFSInfo.Version.V_11);
        gml.setOverrideGMLAttributes(false);
        getGeoServer().save(wfs);
       
        Document dom = getAsDOM("ows?service=WFS&version=1.1.0&request=DescribeFeatureType" +
                "&typename=" + getLayerId(CiteTestData.PRIMITIVEGEOFEATURE));
        XMLAssert.assertXpathNotExists("//xsd:element[@name = 'name']", dom);
        XMLAssert.assertXpathNotExists("//xsd:element[@name = 'description']", dom);
       
        wfs = getWFS();
        gml = wfs.getGML().get(WFSInfo.Version.V_11);
        gml.setOverrideGMLAttributes(true);
        getGeoServer().save(wfs);
        wfs = getWFS();
        gml = wfs.getGML().get(WFSInfo.Version.V_11);
        assertTrue(gml.getOverrideGMLAttributes());
        dom = getAsDOM("ows?service=WFS&version=1.1.0&request=DescribeFeatureType" +
                "&typename=" + getLayerId(CiteTestData.PRIMITIVEGEOFEATURE));
        XMLAssert.assertXpathExists("//xsd:element[@name = 'name']", dom);
        XMLAssert.assertXpathExists("//xsd:element[@name = 'description']", dom);
    }
View Full Code Here

Examples of org.geoserver.wfs.GMLInfo

    }

    @Test
    public void testGMLAttributeMapping() throws Exception {
        WFSInfo wfs = getWFS();
        GMLInfo gml = wfs.getGML().get(WFSInfo.Version.V_11);
        gml.setOverrideGMLAttributes(false);
        getGeoServer().save(wfs);
       
        Document dom = getAsDOM("ows?service=WFS&version=2.0.0&request=GetFeature" +
                "&typename=" + getLayerId(MockData.PRIMITIVEGEOFEATURE));
        XMLAssert.assertXpathExists("//gml:name", dom);
        XMLAssert.assertXpathExists("//gml:description", dom);
        XMLAssert.assertXpathNotExists("//sf:name", dom);
        XMLAssert.assertXpathNotExists("//sf:description", dom);
       
        gml.setOverrideGMLAttributes(true);
        getGeoServer().save(wfs);
   
        dom = getAsDOM("ows?service=WFS&version=2.0.0&request=GetFeature" +
                "&typename=" + getLayerId(MockData.PRIMITIVEGEOFEATURE));
        XMLAssert.assertXpathNotExists("//gml:name", dom);
        XMLAssert.assertXpathNotExists("//gml:description", dom);
        XMLAssert.assertXpathExists("//sf:name", dom);
        XMLAssert.assertXpathExists("//sf:description", dom);
       
        gml.setOverrideGMLAttributes(false);
        getGeoServer().save(wfs);
    }
View Full Code Here

Examples of org.geoserver.wfs.GMLInfo

        for (PropertyDescriptor pd : complexType.getDescriptors()) {
            if (pd instanceof AttributeDescriptor) {
                AttributeDescriptor attribute = (AttributeDescriptor) pd;

                if ( filterAttributeType( attribute ) ) {
                    GMLInfo gml = getGMLConfig(wfs);
                    if (gml == null || !gml.getOverrideGMLAttributes()) {
                        continue;
                    }
                }
                
                XSDElementDeclaration element = factory.createXSDElementDeclaration();
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.