Package org.opengis.filter

Examples of org.opengis.filter.Or


    // creates the query with a bbox filter
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);

    Filter filter = selectedLayer.createBBoxFilter(bbox.get(0), null);
    Filter mergedFilter;
    Or filterOR = null;
    for (int index = 0; index < bbox.size(); index++) {

      mergedFilter = selectedLayer.createBBoxFilter(bbox.get(index), null);
      filterOR = ff.or(filter, mergedFilter);
    }
View Full Code Here


        assertNotNull(unrolled);
        assertNotSame(complexFilter, unrolled);

        assertTrue(unrolled.getClass().getName(), unrolled instanceof org.opengis.filter.Or);

        Or oredFilter = (Or) unrolled;
        List children = oredFilter.getChildren();
        assertEquals(4, children.size());

        assertTrue(children.get(0) instanceof PropertyIsEqualTo);
        assertTrue(children.get(1) instanceof PropertyIsEqualTo);
        assertTrue(children.get(2) instanceof PropertyIsEqualTo);
View Full Code Here

                throw new IllegalArgumentException(
                    "Could not extract an Explicit Style Expression from the CompareFilter");
            }
        } else if (filter instanceof Or) {
            // descend into the child elements of this filter
            Or parentFilter = (Or) filter;
            Iterator iterator = parentFilter.getChildren().iterator();

            while (iterator.hasNext()) {
                // recursive call
                styleExpression += toExplicitStyleExpression((Filter) iterator.next());
View Full Code Here

        And f = (And) parse();
        assertNotNull(f);
        assertEquals(2, f.getChildren().size());
       
        Or f1 = (Or) f.getChildren().get(0);
        assertEquals(2, f1.getChildren().size());
       
        PropertyIsEqualTo f11 = (PropertyIsEqualTo) f1.getChildren().get(0);
        assertEquals("FIELD1", ((PropertyName)f11.getExpression1()).getPropertyName());
        assertEquals("10", ((Literal)f11.getExpression2()).evaluate(null, String.class));
       
        PropertyIsEqualTo f12 = (PropertyIsEqualTo) f1.getChildren().get(1);
        assertEquals("FIELD1", ((PropertyName)f12.getExpression1()).getPropertyName());
        assertEquals("20", ((Literal)f12.getExpression2()).evaluate(null, String.class));
       
        PropertyIsEqualTo f2 = (PropertyIsEqualTo) f.getChildren().get(1);
        assertEquals("STATUS", ((PropertyName)f2.getExpression1()).getPropertyName());
View Full Code Here

    }

    public void testOrParse() throws Exception {
        FilterMockData.or(document, document);

        Or or = (Or) parse();

        assertEquals(2, or.getChildren().size());
    }
View Full Code Here

    }

    public void testOrParse() throws Exception {
        FilterMockData.or(document, document);

        Or or = (Or) parse();

        assertEquals(2, or.getChildren().size());
    }
View Full Code Here

        After right = this.filterFactory.after(property, filterFactory.literal(period.getEnding()));
       
        // makes the during filter
        During left = this.filterFactory.during(property, this.filterFactory.literal(period));

      Or filter = this.filterFactory.or(left, right);
     
      return filter;
    }
View Full Code Here

        Before right = this.filterFactory.before(property, filterFactory.literal(period.getBeginning()));
       
        // makes the during filter
        During left = this.filterFactory.during(property, this.filterFactory.literal(period));
       
        Or filter = this.filterFactory.or(right, left);
       
        return filter;
    }
View Full Code Here

    During during = FACTORY.during(property, FACTORY.literal(period));

    final Date lastDate = period.getEnding().getPosition().getDate();
   
    After after = FACTORY.after(property, FACTORY.literal(lastDate));
    Or filter = FACTORY.or(during, after);
    return filter;
  }
View Full Code Here

        final Date lastDate) {
      Before before = FACTORY.before(property, FACTORY.literal(firstDate));
     
      Period period = createPeriod(firstDate, lastDate);
      During during  = FACTORY.during(property, FACTORY.literal(period));
      Or filter = FACTORY.or(before, during  );
      return filter;
  }
View Full Code Here

TOP

Related Classes of org.opengis.filter.Or

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.