Package org.opengis.filter

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


        Set<String> names = new HashSet<String>();
        // used to collect names from expression1, expression2, and filter
       
        expression1.accept(extract, names);
        expression2.accept(extract, names);
        filter.accept(extract, names);
       
        String array[] = extract.getAttributeNames();
        Set<String> attributes = extract.getAttributeNameSet();
        Set<PropertyName> properties = extract.getPropertyNameSet();
       
View Full Code Here


        }

        public void encode(Object o) throws IllegalArgumentException {
            if (o instanceof Filter) {
                Filter filter = (Filter) o;
                filter.accept( this, null);
            }
            else if (o instanceof Expression) {
                Expression expression = (Expression) o;
                expression.accept( this, null );
            }
View Full Code Here

        if (invertXY) {
            Filter filter = query.getFilter();
   
            FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
            InvertAxisFilterVisitor visitor = new InvertAxisFilterVisitor(ff, new GeometryFactory());
            filter = (Filter) filter.accept(visitor, null);
   
            query.setFilter(filter);
        }
    }
View Full Code Here

        assertEquals(Filter.EXCLUDE, result);   
    }
   
    public void testRecurseAnd() {
        Filter test = ff.and(Filter.INCLUDE, ff.or(property, Filter.EXCLUDE));
        assertEquals(property, test.accept(visitor, null));
    }
   
    public void testRecurseOr() {
        Filter test = ff.or(Filter.EXCLUDE, ff.and(property, Filter.INCLUDE));
        assertEquals(property, test.accept(visitor, null));
View Full Code Here

        assertEquals(property, test.accept(visitor, null));
    }
   
    public void testRecurseOr() {
        Filter test = ff.or(Filter.EXCLUDE, ff.and(property, Filter.INCLUDE));
        assertEquals(property, test.accept(visitor, null));
    }
   
    public void testFidValidity() {
        visitor.setFIDValidator(new SimplifyingFilterVisitor.FIDValidator() {
            public boolean isValid(String fid) {
View Full Code Here

        assertEquals(Filter.INCLUDE, or.accept(visitor, null));
    }
   
    public void testDualFilterAnd() {
        Filter original = ff.and(Arrays.asList(ff.not(ff.equal(ff.property("a"), ff.literal(3), true)), ff.equal(ff.property("a"), ff.literal(3), true)));
        assertEquals(Filter.EXCLUDE, original.accept(visitor, null));
    }
   
    public void testDualFilterNullAnd() {
        Filter original = ff.and(Arrays.asList(ff.not(ff.isNull(ff.property("a"))), ff.isNull(ff.property("a"))));
        assertEquals(Filter.EXCLUDE, original.accept(visitor, null));
View Full Code Here

        assertEquals(Filter.EXCLUDE, original.accept(visitor, null));
    }
   
    public void testDualFilterNullAnd() {
        Filter original = ff.and(Arrays.asList(ff.not(ff.isNull(ff.property("a"))), ff.isNull(ff.property("a"))));
        assertEquals(Filter.EXCLUDE, original.accept(visitor, null));
    }
   
    public void testDualFilterNullOr() {
        Filter original = ff.or(Arrays.asList(ff.not(ff.isNull(ff.property("a"))), ff.isNull(ff.property("a"))));
        assertEquals(Filter.INCLUDE, original.accept(visitor, null));
View Full Code Here

        assertEquals(Filter.EXCLUDE, original.accept(visitor, null));
    }
   
    public void testDualFilterNullOr() {
        Filter original = ff.or(Arrays.asList(ff.not(ff.isNull(ff.property("a"))), ff.isNull(ff.property("a"))));
        assertEquals(Filter.INCLUDE, original.accept(visitor, null));
    }
   
    public void testRepeatedFilter() {
        Filter f1 = ff.equal(ff.property("a"), ff.literal(3), false);
        Filter f2 = ff.equal(ff.property("a"), ff.literal(3), false);
View Full Code Here

        PropertyIsEqualTo filter2 = ff.equals(ff.property("name"), filterFunction_abs);
   
    Filter filter=ff.and(filter1,filter2);

        visitor = newVisitor(new FilterCapabilities());
        filter.accept(visitor, null);
   
    assertEquals(Filter.INCLUDE, visitor.getFilterPre());
    assertEquals(filter, visitor.getFilterPost());
       
        FilterCapabilities filterCapabilitiesMask = new FilterCapabilities();
View Full Code Here

    filterCapabilitiesMask.addType(FilterFunction_abs.class);
    filterCapabilitiesMask.addAll(FilterCapabilities.SIMPLE_COMPARISONS_OPENGIS);
        filterCapabilitiesMask.addAll(FilterCapabilities.LOGICAL_OPENGIS);
    visitor=newVisitor(filterCapabilitiesMask);

        filter.accept(visitor, null);
   
    assertEquals(Filter.INCLUDE, visitor.getFilterPost());
    assertEquals(filter, visitor.getFilterPre());
  }
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.