Examples of StoredQueryDescriptionType


Examples of net.opengis.wfs20.StoredQueryDescriptionType

        CreateStoredQueryType csq = (CreateStoredQueryType) parse();
        assertNotNull(csq);
       
        assertEquals(1, csq.getStoredQueryDefinition().size());
       
        StoredQueryDescriptionType  sqd = csq.getStoredQueryDefinition().get(0);
        assertEquals("Features In Polygon", sqd.getTitle().get(0).getValue());
       
        assertEquals(1, sqd.getParameter().size());
        ParameterExpressionType pe = sqd.getParameter().get(0);
        assertEquals("AreaOfInterest", pe.getName());
        assertEquals(GML.Polygon, pe.getType());
       
        assertEquals(1, sqd.getQueryExpressionText().size());
        QueryExpressionTextType qet = sqd.getQueryExpressionText().get(0);
        assertEquals("urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression", qet.getLanguage());
        assertFalse(qet.isIsPrivate());
        assertEquals(3, qet.getReturnFeatureTypes().size());
        assertNotNull(qet.getValue());
        assertTrue(qet.getValue().contains("wfs:Query"));
View Full Code Here

Examples of net.opengis.wfs20.StoredQueryDescriptionType

        "         </wfs:Query> " +
        "      </wfs:QueryExpressionText> " +
        "   </wfs:StoredQueryDefinition> ";
        buildDocument(xml);
       
        StoredQueryDescriptionType sqd = (StoredQueryDescriptionType) parse(WFS.StoredQueryDescriptionType);
        assertNotNull(sqd);
       
        assertEquals(1, sqd.getParameter().size());
       
        ParameterExpressionType p = sqd.getParameter().get(0);
        assertEquals("AreaOfInterest", p.getName());
        assertEquals(GML.Polygon, p.getType());
       
        assertEquals(1, sqd.getQueryExpressionText().size());
    }
View Full Code Here

Examples of net.opengis.wfs20.StoredQueryDescriptionType

        assertEquals(1, sqd.getQueryExpressionText().size());
    }

    public void testEncode() throws Exception {
        Wfs20Factory f = Wfs20Factory.eINSTANCE;
        StoredQueryDescriptionType sqd = f.createStoredQueryDescriptionType();
        sqd.setId("foo");

        ParameterExpressionType p = f.createParameterExpressionType();
        p.setName("AreaOfInterest");
        p.setType(GML.Polygon);
        sqd.getParameter().add(p);

        String xml =
        "<wfs:Query typeNames='myns:Parks'>" +
        "  <fes:Filter>" +
        "   <fes:Within>\n" +
        "     <fes:ValueReference>geometry</fes:ValueReference>" +
        "     ${AreaOfInterest}" +
        "   </fes:Within>" +
        "  </fes:Filter>" +
        "</wfs:Query> ";
       
        QueryExpressionTextType qet = f.createQueryExpressionTextType();
        sqd.getQueryExpressionText().add(qet);
       
        qet.setLanguage("urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression");
        qet.setReturnFeatureTypes(Arrays.asList(new QName("http://www.someserver.com/myns", "Parks")));
        qet.setValue(xml);
View Full Code Here

Examples of net.opengis.wfs20.StoredQueryDescriptionType

   
    StoredQuery parseStoredQuery(File file, Parser p) throws Exception {
        p.setRootElementType(WFS.StoredQueryDescriptionType);
        FileInputStream fin = new FileInputStream(file);
        try {
            StoredQueryDescriptionType q =
                (StoredQueryDescriptionType) p.parse(new BufferedInputStream(fin));
            return createStoredQuery(q);
        }
        finally {
            fin.close();
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.