Package org.opengis.filter.expression

Examples of org.opengis.filter.expression.Add


    }

    public void testAddParse() throws Exception {
        FilterMockData.add(document, document);

        Add add = (Add) parse();

        assertNotNull(add.getExpression1());
        assertNotNull(add.getExpression2());
    }
View Full Code Here


public class FilterBuilderTest {
    protected FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);

    @Test
    public void add() {
        Add expected = ff.add(ff.literal(1), ff.literal(1));
    }
View Full Code Here

    }

    public void testAddParse() throws Exception {
        FilterMockData.add(document, document);

        Add add = (Add) parse();

        assertNotNull(add.getExpression1());
        assertNotNull(add.getExpression2());
    }
View Full Code Here

        assertTrue(rbe.isEstimateAccurate());
    }
   
    @Test
    public void testMath() {
        Add add = ff.add(ff.literal("5"), ff.literal("-2"));
        Symbolizer ls = sb.createLineSymbolizer(sb.createStroke(sb.colorExpression(Color.BLACK), add));
        Rule r = sb.createRule(new Symbolizer[] { ls });
        MetaBufferEstimator rbe = new MetaBufferEstimator();
       
        // 5-2 = 3
View Full Code Here

        Expression expression = CompilerUtil.parseExpression(language,
                "a + b + x.y.z");
        Assert.assertNotNull(expression);
        Assert.assertTrue(expression instanceof Add);

        Add add = (Add) expression;
        Expression e1 = add.getExpression1();
        Expression e2 = add.getExpression2();

        Assert.assertTrue(e1 instanceof Add);
        Assert.assertTrue(e2 instanceof PropertyName);
        Assert.assertEquals("x/y/z", ((PropertyName) e2).getPropertyName());
View Full Code Here

        encoder.encode(equals);
        assertEquals("WHERE attribute = 'A''A'", output.toString());
    }
   
    public void testExpression() throws Exception {
        Add a = filterFac.add(filterFac.property("testAttr"), filterFac.literal(5));
        encoder.encode(a);
        assertEquals("testAttr + 5", output.toString());
    }
View Full Code Here

        encoder.encode(equals);
        assertEquals("WHERE attribute = 'A''A'", output.toString());
    }
   
    public void testNumberEscapes() throws Exception {
        Add a = filterFac.add(filterFac.property("testAttr"), filterFac.literal(5));
        PropertyIsEqualTo equal = filterFac.equal(filterFac.property("testAttr"), a, false);
        StringWriter output = new StringWriter();
        FilterToSQL encoder = new FilterToSQL(output);
        // this test must pass even when the target feature type is not known
        // encoder.setFeatureType(integerFType);
View Full Code Here

TOP

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

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.