Package org.opengis.filter

Examples of org.opengis.filter.PropertyIsBetween.accept()


    @Test
    public void testBetween() {
        PropertyIsBetween between = ff.between(ff.property("a"), ff.property("b"), ff.property("c"));
        NullHandlingVisitor visitor = new NullHandlingVisitor();
        Filter result = (Filter) between.accept(visitor, null);
        assertTrue(result instanceof And);
        Filter expected = ff.and(Arrays.asList(between, propertyNotNull("a"), propertyNotNull("b"), propertyNotNull("c")));
        assertEquals(expected, result);
       
        between = ff.between(ff.property("a"), ff.property("b"), ff.literal(10));
View Full Code Here


        assertTrue(result instanceof And);
        Filter expected = ff.and(Arrays.asList(between, propertyNotNull("a"), propertyNotNull("b"), propertyNotNull("c")));
        assertEquals(expected, result);
       
        between = ff.between(ff.property("a"), ff.property("b"), ff.literal(10));
        result = (Filter) between.accept(visitor, null);
        assertTrue(result instanceof And);
        expected = ff.and(Arrays.asList(between, propertyNotNull("a"), propertyNotNull("b")));
        assertEquals(expected, result);
       
        between = ff.between(ff.property("a"), ff.literal(5), ff.literal(10));
View Full Code Here

        assertTrue(result instanceof And);
        expected = ff.and(Arrays.asList(between, propertyNotNull("a"), propertyNotNull("b")));
        assertEquals(expected, result);
       
        between = ff.between(ff.property("a"), ff.literal(5), ff.literal(10));
        result = (Filter) between.accept(visitor, null);
        assertTrue(result instanceof And);
        expected = ff.and(Arrays.asList(between, propertyNotNull("a")));
        assertEquals(expected, result);
       
        between = ff.between(ff.literal(7), ff.literal(5), ff.literal(10));
View Full Code Here

        assertTrue(result instanceof And);
        expected = ff.and(Arrays.asList(between, propertyNotNull("a")));
        assertEquals(expected, result);
       
        between = ff.between(ff.literal(7), ff.literal(5), ff.literal(10));
        result = (Filter) between.accept(visitor, null);
        assertEquals(between, result);
    }
   
    @Test
    public void testLike() {
View Full Code Here

        tb.setName("test");
        SimpleFeatureType schema = tb.buildFeatureType();
       
        PropertyIsBetween between = ff.between(ff.property("a"), ff.property("b"), ff.property("c"));
        NullHandlingVisitor visitor = new NullHandlingVisitor(schema);
        Filter result = (Filter) between.accept(visitor, null);
        assertTrue(result instanceof And);
        Filter expected = ff.and(Arrays.asList(between, propertyNotNull("a"), propertyNotNull("c")));
        assertEquals(expected, result);
    }
   
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.