Package org.opengis.filter.temporal

Examples of org.opengis.filter.temporal.After


        "      </gml:TimeInstant> " +
        "   </fes:After> " +
        "</fes:Filter>";
        buildDocument(xml);
       
        After after = (After) parse();
        assertNotNull(after);
       
        assertTrue(after.getExpression1() instanceof PropertyName);
        assertEquals("timeInstanceAttribute", ((PropertyName)after.getExpression1()).getPropertyName());

        assertTrue(after.getExpression2() instanceof Literal);
        assertTrue(after.getExpression2().evaluate(null) instanceof Instant);
    }
View Full Code Here


  public After buildAfterDate() throws CQLException {
       
    Expression right = this.resultStack.popExpression();
        Expression left = this.resultStack.popExpression();
       
        After filter =  this.filterFactory.after(left, right);
       
        return filter;
  }
View Full Code Here

        Literal date = period.getEnding();

        Expression property = this.resultStack.popExpression();

        After filter = filterFactory.after(property, date);

        return filter;
   
View Full Code Here

        Period period = this.resultStack.popPeriod();
       
        PropertyName property = this.resultStack.popPropertyName();

        // makes the after filter
        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);
View Full Code Here

      throws ParseException {
    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

     * @return a filter
     * @throws CQLException
     */
    private After buildAfterPredicate()
            throws CQLException {
        After filter = null;

        // determines if the node is period or date
        Result result = this.builder.peekResult();

        switch (result.getNodeType()) {
View Full Code Here

  }

    private static void afterPredicate() throws Exception{
     
      // cql_afterPredicate start
        After filter = (After) CQL.toFilter("lastEarthQuake AFTER 2006-11-30T01:30:00Z");
      // cql_afterPredicate end
        Utility.prittyPrintFilter(filter);
       
        final SimpleFeature city = DataExamples.getInstanceOfCity();
        Expression leftExpr = filter.getExpression1();
        Expression rightExpr = filter.getExpression2();
        System.out.println("left expression value: " + leftExpr.evaluate(city));
        System.out.println("right expression value: " + rightExpr.evaluate(city));
       
        Boolean result = filter.evaluate(city);
        System.out.println("Result of filter evaluation: " + result);       
  }
View Full Code Here

  }
 
    private static void afterPredicateGMT3() throws Exception{
     
      // cql_afterPredicateGMT3 start
        After filter = (After) CQL.toFilter("lastEarthQuake AFTER 2006-11-30T01:30:00+03:00");
      // cql_afterPredicateGMT3 end
        Utility.prittyPrintFilter(filter);
       
        final SimpleFeature city = DataExamples.getInstanceOfCity();
        Expression leftExpr = filter.getExpression1();
        Expression rightExpr = filter.getExpression2();
        System.out.println("left expression value: " + leftExpr.evaluate(city));
        System.out.println("right expression value: " + rightExpr.evaluate(city));
       
        Boolean result = filter.evaluate(city);
        System.out.println("Result of filter evaluation: " + result);       
  }
View Full Code Here

    }

    public void testAfter() throws Exception {
        FilterFactory ff = dataStore.getFilterFactory();
       
        After after = ff.after(ff.property(aname("dt")), ff.literal("2009-02-01 00:00:00"));
        assertDatesMatch(after, "2009-06-28 15:12:41", "2009-09-29 17:54:23");
    }
View Full Code Here

    public void testAfterInterval() throws Exception {
        Period period = period("2009-02-01 00:00:00", "2009-07-01 00:00:00");
       
        FilterFactory ff = dataStore.getFilterFactory();
       
        After after = ff.after(ff.property(aname("dt")), ff.literal(period));
        assertDatesMatch(after, "2009-09-29 17:54:23");
       
        after = ff.after(ff.literal(period), ff.property(aname("dt")));
        assertDatesMatch(after, "2009-01-15 13:10:12");
    }
View Full Code Here

TOP

Related Classes of org.opengis.filter.temporal.After

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.