Examples of GetFeatureType


Examples of net.opengis.wfs.GetFeatureType

                postURL = new URL(url);
            }
        }

        RequestComponents reqParts = strategy.createGetFeatureRequest(this, request);
        GetFeatureType serverRequest = reqParts.getServerRequest();

        Encoder encoder = new Encoder(strategy.getWfsConfiguration());

        // If the typeName is of the form prefix:typeName we better declare the namespace since we
        // don't know how picky the server parser will be
View Full Code Here

Examples of net.opengis.wfs.GetFeatureType

    @Test
    public void testCreateGetFeatureRequest() throws IOException {
        GetFeature query = new GetFeatureQueryAdapter(new Query(
                CUBEWERX_GOVUNITCE.FEATURETYPENAME), "GML2", "EPSG:4326", ResultType.RESULTS);
        RequestComponents getFeatureRequest = strategy.createGetFeatureRequest(wfs, query);
        GetFeatureType serverRequest = getFeatureRequest.getServerRequest();
        ResultTypeType resultType = serverRequest.getResultType();
        assertNull(resultType);
        Map<String, String> kvpParameters = getFeatureRequest.getKvpParameters();
        assertNull(kvpParameters.get("RESULTTYPE"));
    }
View Full Code Here

Examples of net.opengis.wfs.GetFeatureType

    public InputStream getPostContents(WFSRequest request) throws IOException {
        if (!(request instanceof GetFeatureRequest)) {
            return super.getPostContents(request);
        }

        GetFeatureType requestObject = createGetFeatureRequestPost((GetFeatureRequest) request);

        final Encoder encoder = prepareEncoder(request);
        final QName opName = getOperationName(request.getOperation());

        Document dom;
View Full Code Here

Examples of net.opengis.wfs.GetFeatureType

        InputType in = (InputType) exec.getDataInputs().getInput().get(0);
        InputReferenceType ref = in.getReference();
        assertNotNull(ref);

        assertTrue(ref.getBody() instanceof GetFeatureType);
        GetFeatureType gft = (GetFeatureType) ref.getBody();

        QName typeName = (QName) ((QueryType)gft.getQuery().get(0)).getTypeName().get(0);
        assertEquals("states", typeName.getLocalPart());
        assertEquals("http://usa.org", typeName.getNamespaceURI());
    }
View Full Code Here

Examples of net.opengis.wfs.GetFeatureType

     * @param names type names for which queries are present in the returned request
     * @return GetFeature operation to request the named types
     */
    Operation request(QName... names) {
        Service service = getServiceDescriptor10();
        GetFeatureType type = WfsFactory.eINSTANCE.createGetFeatureType();
        type.setBaseUrl("http://localhost:8080/geoserver");
        for (QName name : names) {
            QueryType queryType = WfsFactory.eINSTANCE.createQueryType();
            queryType.setTypeName(Collections.singletonList(name));
            type.getQuery().add(queryType);
        }
        Operation request = new Operation("wfs", service, null, new Object[] { type });
        return request;
    }
View Full Code Here

Examples of net.opengis.wfs20.GetFeatureType

        "   </wfs:Query> " +
        "</wfs:GetFeature> ";
       
        buildDocument(xml);
       
        GetFeatureType gf = (GetFeatureType) parse();
        assertNotNull(gf);
       
        assertEquals(1, gf.getAbstractQueryExpression().size());
        QueryType q = (QueryType) gf.getAbstractQueryExpression().get(0);
        assertNotNull(q);
       
        assertEquals(new URI("epsg:4326"), q.getSrsName());
        assertEquals(1, q.getTypeNames().size());
        assertEquals(
View Full Code Here

Examples of net.opengis.wfs20.GetFeatureType

            "      </fes:Filter> " +
            "   </wfs:Query> " +
            "</wfs:GetFeature> ";
        buildDocument(xml);
       
        GetFeatureType gf = (GetFeatureType) parse();
        assertNotNull(gf);
       
        assertEquals(BigInteger.valueOf(100), gf.getCount());
        assertEquals(1, gf.getAbstractQueryExpression().size());
        QueryType q = (QueryType) gf.getAbstractQueryExpression().get(0);
        assertNotNull(q);

        assertNotNull(q.getFilter());
        assertEquals(3, q.getPropertyNames().size());
       
View Full Code Here

Examples of net.opengis.wfs20.GetFeatureType

            "   <Query typeNames='myns:BuiltUpA_1M'/> " +
            "   <Query typeNames='yourns:RoadL_1M'/> " +
            "</GetFeature> ";
        buildDocument(xml);
       
        GetFeatureType gf = (GetFeatureType) parse();
        assertNotNull(gf);
       
        assertEquals(3, gf.getAbstractQueryExpression().size());
       
        QueryType q = (QueryType) gf.getAbstractQueryExpression().get(0);
        assertNotNull(q);
        assertEquals(new QName("http://www.someserver.com/myns", "InWaterA_1M"),
            q.getTypeNames().get(0));
       
        q = (QueryType) gf.getAbstractQueryExpression().get(1);
        assertNotNull(q);
        assertEquals(new QName("http://www.someserver.com/myns", "BuiltUpA_1M"),
            q.getTypeNames().get(0));
       
        q = (QueryType) gf.getAbstractQueryExpression().get(2);
        assertNotNull(q);
        assertEquals(new QName("http://demo.cubewerx.com/yourns", "RoadL_1M"),
            q.getTypeNames().get(0));
    }
View Full Code Here

Examples of net.opengis.wfs20.GetFeatureType

            "      </fes:SortBy> " +
            "   </Query> " +
            "</GetFeature> ";
        buildDocument(xml);
       
        GetFeatureType gf = (GetFeatureType) parse();
        assertNotNull(gf);
        assertEquals(ResultTypeType.HITS, gf.getResultType());
       
        assertEquals(1, gf.getAbstractQueryExpression().size());
        QueryType q = (QueryType) gf.getAbstractQueryExpression().get(0);
        assertNotNull(q);
       
        Not f = (Not) q.getFilter();
        assertNotNull(f);
       
View Full Code Here

Examples of net.opengis.wfs20.GetFeatureType

        "      </wfs:Parameter> " +
        "   </wfs:StoredQuery>" +
        " </wfs:GetFeature>";
        buildDocument(xml);
       
        GetFeatureType gf = (GetFeatureType) parse();
        assertNotNull(gf);
       
        assertEquals(1, gf.getAbstractQueryExpression().size());
       
        StoredQueryType sq = (StoredQueryType) gf.getAbstractQueryExpression().get(0);
        assertEquals(1, sq.getParameter().size());
        ParameterType p = sq.getParameter().get(0);
        assertEquals("AreaOfInterest", p.getName());
        assertNotNull(p.getValue());
        assertTrue(p.getValue().contains("gml:Polygon"));
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.