Package org.opengis.filter.temporal

Examples of org.opengis.filter.temporal.After


    }

    public void testTemporalJoin() throws Exception {
        FilterFactory ff = dataStore.getFilterFactory();

        After after = ff.after(ff.property(aname("dt")), ff.property("other." + aname("dt")));
        Query q = new Query(tname("dates"));
        q.getJoins().add(new Join(tname("dates"), after).alias("other"));
        q.setSortBy(new SortBy[]{ff.sort(aname("dt"), SortOrder.ASCENDING)});
       
        assertDatesMatch(q, "2009-06-28 15:12:41", "2009-09-29 17:54:23", "2009-09-29 17:54:23");
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 node = this.builder.peekResult();

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

        final String predicate = "2006-11-30T01:00:00Z AFTER 2006-11-30T01:30:00Z";
        Filter resultFilter = CompilerUtil.parseFilter(this.language, predicate);

        Assert.assertTrue( resultFilter instanceof After);

        After lessFilter = (After) resultFilter;
       
        Literal expr1 = (Literal)lessFilter.getExpression1();
        Date leftHandDate = (Date) expr1.getValue();
        Assert.assertTrue(leftHandDate instanceof Date);

        Literal expr2 = (Literal) lessFilter.getExpression2();
        Date rightHandDate = (Date) expr2.getValue();
        Assert.assertTrue(rightHandDate instanceof Date);
       
        Assert.assertFalse(resultFilter.evaluate(null));
    }
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.