Package org.opengis.filter

Examples of org.opengis.filter.FilterFactory.after()


    public void testAfterFilter() throws Exception {
        init();
        Date testDate = df.parse("2009-28-06 00:00:00");
        FilterFactory ff = dataStore.getFilterFactory();
        Filter f = ff.after(ff.property("installed_tdt"), ff.literal(testDate));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(5, features.size());
    }

    public void testAfterInterval() throws Exception {
View Full Code Here


    public void testAfterInterval() throws Exception {
        init();
        Period period = period("2011-21-05 00:00:00", "2011-15-09 00:00:00");
        FilterFactory ff = dataStore.getFilterFactory();
        Filter f = ff.after(ff.property("installed_tdt"), ff.literal(period));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(4, features.size());
    }

    public void testBeforeFilter() throws Exception {
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");
    }

    public void testAfterInterval() throws Exception {
        Period period = period("2009-02-01 00:00:00", "2009-07-01 00:00:00");
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

        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");
    }
   
    public void testBefore() throws Exception {
        FilterFactory ff = dataStore.getFilterFactory();
View Full Code Here

    }

    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

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.