Package org.opengis.filter

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


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

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


    public void testBeforeInterval() throws Exception {
        init();
        Period period = period("2000-12-11 00:00:00", "2011-05-21 00:00:00");
        FilterFactory ff = dataStore.getFilterFactory();
        Filter f = ff.before(ff.property("installed_tdt"), ff.literal(period));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(1, features.size());
    }

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

    }
   
    public void testBefore() throws Exception {
        FilterFactory ff = dataStore.getFilterFactory();
       
        Before before = ff.before(ff.property(aname("dt")), ff.literal("2009-02-01 00:00:00"));
        assertDatesMatch(before, "2009-01-15 13:10:12");
    }

    public void testBeforeInterval() throws Exception {
        Period period = period("2009-07-01 00:00:00", "2009-12-01 00:00:00");
View Full Code Here

    public void testBeforeInterval() throws Exception {
        Period period = period("2009-07-01 00:00:00", "2009-12-01 00:00:00");
       
        FilterFactory ff = dataStore.getFilterFactory();
       
        Before before = ff.before(ff.property(aname("dt")), ff.literal(period));
        assertDatesMatch(before, "2009-01-15 13:10:12", "2009-06-28 15:12:41");

        period = period("2009-07-01 00:00:00", "2009-08-01 00:00:00");
        before = ff.before(ff.literal(period), ff.property(aname("dt")));
        assertDatesMatch(before, "2009-09-29 17:54:23");
View Full Code Here

       
        Before before = ff.before(ff.property(aname("dt")), ff.literal(period));
        assertDatesMatch(before, "2009-01-15 13:10:12", "2009-06-28 15:12:41");

        period = period("2009-07-01 00:00:00", "2009-08-01 00:00:00");
        before = ff.before(ff.literal(period), ff.property(aname("dt")));
        assertDatesMatch(before, "2009-09-29 17:54:23");
    }

    public void testBegins() throws Exception {
        Period period = period("2009-01-15 13:10:12", "2009-06-28 15:12:41");
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.