Examples of During


Examples of org.opengis.filter.temporal.During

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

        assertTrue(during.getExpression2() instanceof Literal);
        assertTrue(during.getExpression2().evaluate(null) instanceof Period);
    }
View Full Code Here

Examples of org.opengis.filter.temporal.During

        // retrieves date and duration from expression
    Period period = this.resultStack.popPeriod();

        Expression property = this.resultStack.popExpression();

        During filter = this.filterFactory.during(property, this.filterFactory.literal(period));

        return filter;
    }   
View Full Code Here

Examples of org.opengis.filter.temporal.During

        // 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);
     
      return filter;
    }
View Full Code Here

Examples of org.opengis.filter.temporal.During

        // makes the after filter
        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

Examples of org.opengis.filter.temporal.During

        }
    } // end static initialization

  private static Or buildDuringOrAfterFilter(final PropertyName property, Period period)
      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);
View Full Code Here

Examples of org.opengis.filter.temporal.During

        final Date firstDate,
        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

Examples of org.opengis.filter.temporal.During

     *
     * @return Filter
     * @throws CQLException
     */
    private During buildDuring() throws CQLException {
        During filter = null;

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

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

Examples of org.opengis.filter.temporal.During

  }
 
    private static void duringPredicate() throws Exception{
     
      // cql_duringPredicate start
        During filter = (During) CQL.toFilter("lastEarthQuake DURING 1700-01-01T00:00:00/2011-01-01T00:00:00");
      // cql_duringPredicate 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

Examples of org.opengis.filter.temporal.During

        Utility.prittyPrintFilter(filter);
       
        Boolean result = filter.evaluate(null);
        System.out.println("Result of filter evaluation: " + result);

        During during = (During) filter;
        Literal literal = (Literal)during.getExpression1();
        Date date = (Date)literal.getValue();
       
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ");
        TimeZone tz = TimeZone.getTimeZone("GMT+0300");
        sdf.setTimeZone(tz);
View Full Code Here

Examples of org.opengis.filter.temporal.During

    }

    private static void duringPredicateWithLefHandtAttribute() throws Exception{
     
      // duringPredicateWithLefHandtAttribute start
        During filter = (During) ECQL.toFilter("lastEarthQuake DURING 1700-01-01T00:00:00Z/2011-01-01T00:00:00Z");
      // duringPredicateWithLefHandtAttribute 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
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.