Package org.opengis.filter

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


        PropertyIsBetween between = ff.between(ff.property("a"), ff.property("b"), ff.property("c"));
        PropertyIsEqualTo equal = ff.equal(ff.property("a"), ff.property("b"), false);
        And and = ff.and(between, equal);
       
        NullHandlingVisitor nh = new NullHandlingVisitor();
        Filter nhResult = (Filter) and.accept(nh, null);
        SimplifyingFilterVisitor simplifier = new SimplifyingFilterVisitor();
        Filter simplified = (Filter) nhResult.accept(simplifier, null);
        assertTrue(simplified instanceof And);
        Filter expected = ff.and(Arrays.asList(between, equal, propertyNotNull("a"), propertyNotNull("b"), propertyNotNull("c")));
        assertEquals(expected, simplified);
View Full Code Here


        PropertyIsGreaterThan greater = ff.greater(ff
                .property("measurement/determinand_description"), ff.literal("desc1"));

        And logicFilter = ff.and(equals, greater);

        Filter unrolled = (Filter) logicFilter.accept(visitor, null);
        assertNotNull(unrolled);
        assertTrue(unrolled instanceof And);
        assertNotSame(equals, unrolled);

        And sourceAnd = (And) unrolled;
View Full Code Here

      PropertyIsLessThan less = fac.less(fac.literal(3), fac.literal(4));
      And and = fac.and(greater, less);
     
      //duplicate it
      DuplicatingFilterVisitor visitor = new DuplicatingFilterVisitor();
      Filter newFilter = (Filter) and.accept(visitor, fac);

      //compare it
      assertNotNull(newFilter);
      assertEquals( and, newFilter );
    }   
View Full Code Here

        filters.add(filter2);

        And oldFilter = fac.and(filters);
        //duplicate it
      DuplicatingFilterVisitor visitor = new DuplicatingFilterVisitor((FilterFactory2) fac);
      Filter newFilter = (Filter) oldFilter.accept(visitor, null);

      //compare it
      assertNotNull(newFilter);
      //TODO: a decent comparison
    }
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.