Package org.opengis.filter.expression

Examples of org.opengis.filter.expression.PropertyName


        assertEquals(targetType, complexFeature.getType());

        features.close();

        org.opengis.filter.FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        PropertyName expr;
        Object value;

        expr = ff.property("measurement[1]");
        value = expr.evaluate(complexFeature);
        assertNotNull(value);

        expr = ff.property("measurement[1]/parameter");
        value = expr.evaluate(complexFeature);
        assertNotNull(value);

        expr = ff.property("measurement[1]/value");
        value = expr.evaluate(complexFeature);
        assertNotNull(value);

        expr = ff.property("measurement[2]/parameter");
        value = expr.evaluate(complexFeature);
        assertNotNull(value);

        expr = ff.property("measurement[2]/value");
        value = expr.evaluate(complexFeature);
        assertNotNull(value);

        expr = ff.property("measurement[3]/parameter");
        value = expr.evaluate(complexFeature);
        assertNotNull(value);

        expr = ff.property("measurement[3]/value");
        value = expr.evaluate(complexFeature);
        assertNotNull(value);

    }
View Full Code Here


     */
    @Test
    public void testGetFeatureReaderQuery() throws Exception {
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);

        PropertyName property = ff.property("sample/measurement[1]/parameter");
        Literal literal = ff.literal("ph");
        Filter filterParameter = ff.equals(property, literal);

        property = ff.property("sample/measurement[1]/value");
        literal = ff.literal(new Integer(3));
View Full Code Here

        PropertyIsEqualTo equal = (PropertyIsEqualTo) thing;
        assertTrue(equal.getExpression1() instanceof PropertyName);
        assertTrue(equal.getExpression2() instanceof Literal);

        PropertyName name = (PropertyName) equal.getExpression1();
        assertEquals("testString", name.getPropertyName());

        Literal literal = (Literal) equal.getExpression2();
        assertEquals("2", literal.toString());
    }
View Full Code Here

        DWithin filter = (DWithin) parser.parse(new ByteArrayInputStream(xml.getBytes()));
        assertNotNull(filter);
       
        //Asserting the Property Name
        assertNotNull(filter.getExpression1());
        PropertyName propName = (PropertyName) filter.getExpression1();
        String name = propName.getPropertyName();
        assertEquals("the_geom", name);
       
        //Asserting the Geometry
        assertNotNull(filter.getExpression2());
        Literal geom = (Literal) filter.getExpression2();
View Full Code Here

*/
public class PropertyNameTypeBindingTest extends FilterTestSupport {
    public void testParse() throws Exception {
        FilterMockData.propertyName(document, document);

        PropertyName propertyName = (PropertyName) parse();
        assertNotNull(propertyName);

        assertEquals("foo", propertyName.getPropertyName());
    }
View Full Code Here

    }

    public void testParseWithPrefix() throws Exception {
        FilterMockData.propertyName("bar:foo", document, document);

        PropertyName propertyName = (PropertyName) parse();
        assertNotNull(propertyName);

        assertEquals("bar:foo", propertyName.getPropertyName());
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        PropertyName name = (PropertyName) node.getChildValue(PropertyName.class);
        SortOrder order = (SortOrder) node.getChildValue(SortOrder.class);

        if (order == null) {
            order = SortOrder.ASCENDING;
        }

        return filterfactory.sort(name.getPropertyName(), order);
    }
View Full Code Here

        assertEquals("bar:foo", propertyName.getPropertyName());
    }

    public void testEncode() throws Exception {
        PropertyName propertyName = FilterMockData.propertyName("foo");
        Document dom = encode(propertyName, OGC.PropertyName);

        assertEquals("foo", dom.getDocumentElement().getFirstChild().getNodeValue());
    }
View Full Code Here

        if (names.size() == 2) {
            //join
            return new Expression[]{(Expression) names.get(0), (Expression) names.get(1)};
        }
       
        PropertyName name = (PropertyName) node.getChildValue(PropertyName.class);
        Expression spatial = null;

        if (node.hasChild(Geometry.class)) {
            spatial = ff.literal(node.getChildValue(Geometry.class));
        } else if (node.hasChild(Envelope.class)) {
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        PropertyName name = (PropertyName) node.getChildValue(PropertyName.class);
        Literal literal = (Literal) node.getChildValue(Literal.class);

        String wildcard = (String) node.getAttributeValue("wildCard");
        String single = (String) node.getAttributeValue("singleChar");
        String escape = (String) node.getAttributeValue("escape");
View Full Code Here

TOP

Related Classes of org.opengis.filter.expression.PropertyName

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.